Ignore:
Timestamp:
Sep 17, 2002 9:15:14 AM (18 years ago)
Author:
forrest
Message:

Synchronizing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/devel-1/ClpSimplexPrimal.cpp

    r19 r20  
    293293  numberTimesOptimal_=0;
    294294
     295  // Progress indicator
     296  ClpSimplexProgress progress(this);
     297
    295298  // Say no pivot has occurred (for steepest edge and updates)
    296299  pivotRow_=-2;
     
    334337      factorType=3;
    335338    // may factorize, checks if problem finished
    336     statusOfProblemInPrimal(lastCleaned,factorType);
     339    statusOfProblemInPrimal(lastCleaned,factorType,progress);
    337340
    338341    // Say good factorization
     
    664667/* Checks if finished.  Updates status */
    665668void
    666 ClpSimplexPrimal::statusOfProblemInPrimal(int & lastCleaned,int type)
     669ClpSimplexPrimal::statusOfProblemInPrimal(int & lastCleaned,int type,
     670                               ClpSimplexProgress &progress)
    667671{
    668672  if (type==2) {
     
    710714  createRim(7);
    711715  gutsOfSolution(rowActivityWork_, columnActivityWork_);
     716  // Check if looping
     717  int loop = progress.looping();
     718  if (loop>=0) {
     719    problemStatus_ = loop; //exit if in loop
     720    return ;
     721  } else if (loop<-1) {
     722    // something may have changed
     723    gutsOfSolution(rowActivityWork_, columnActivityWork_);
     724  }
     725  progressFlag_ = 0; //reset progress flag
     726
    712727  handler_->message(CLP_SIMPLEX_STATUS,messages_)
    713728    <<numberIterations_<<objectiveValue();
     
    724739  // we may wish to say it is optimal even if infeasible
    725740  bool alwaysOptimal = (specialOptions_&1)!=0;
     741  // give code benefit of doubt
     742  if (sumOfRelaxedDualInfeasibilities_ == 0.0&&
     743      sumOfRelaxedPrimalInfeasibilities_ == 0.0) {
     744    // say optimal (with these bounds etc)
     745    numberDualInfeasibilities_ = 0;
     746    sumDualInfeasibilities_ = 0.0;
     747    numberPrimalInfeasibilities_ = 0;
     748    sumPrimalInfeasibilities_ = 0.0;
     749  }
    726750  if (dualFeasible()||problemStatus_==-4||(type==3&&problemStatus_!=-5)) {
    727751    if (nonLinearCost_->numberInfeasibilities()&&!alwaysOptimal) {
Note: See TracChangeset for help on using the changeset viewer.