Ignore:
Timestamp:
Aug 5, 2002 11:57:49 AM (18 years ago)
Author:
forrest
Message:

Improving reliability using IBM Burlington problems (Primal)

File:
1 edited

Legend:

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

    r7 r8  
    263263    if (internalFactorize(0+10*ifValuesPass))
    264264      return 1; // some error
    265 
    266265    // for this we need clean basis so it is after factorize
    267266    numberThrownOut=gutsOfSolution(rowActivityWork_,columnActivityWork_,
     
    289288  // This says whether to restore things etc
    290289  int factorType=0;
     290  // Save iteration number
     291  int saveNumber = -1;
    291292  /*
    292293    Status of problem:
     
    319320      perturb();
    320321#endif
     322    // If we have done no iterations - special
     323    if (saveNumber==numberIterations_)
     324      factorType=3;
    321325    // may factorize, checks if problem finished
    322326    statusOfProblemInPrimal(lastCleaned,factorType);
     
    329333
    330334    // Save iteration number
    331     int saveNumber = numberIterations_;
     335    saveNumber = numberIterations_;
    332336
    333337    // status stays at -1 while iterating, >=0 finished, -2 to invert
     
    446450                <<OsiMessageEol;
    447451              setFlagged(sequenceIn_);
     452              lastBadIteration_ = numberIterations_; // say be more cautious
    448453              rowArray_[1]->clear();
    449454              pivotRow_=-1;
     
    458463#endif
    459464        if (saveDj*dualIn_<1.0e-20||
    460             fabs(saveDj-dualIn_)>1.0e-7*(1.0+fabs(dualIn_))) {
     465            fabs(saveDj-dualIn_)>1.0e-5*(1.0+fabs(saveDj))) {
    461466          handler_->message(CLP_PRIMAL_DJ,messages_)
    462467            <<saveDj<<dualIn_
     
    477482                <<OsiMessageEol;
    478483              setFlagged(sequenceIn_);
     484              lastBadIteration_ = numberIterations_; // say be more cautious
    479485              rowArray_[1]->clear();
    480486              pivotRow_=-1;
     
    505511                <<OsiMessageEol;
    506512              setFlagged(sequenceIn_);
     513              lastBadIteration_ = numberIterations_; // say be more cautious
    507514              rowArray_[1]->clear();
    508515              pivotRow_=-1;
     
    619626  }
    620627
     628  // if infeasible get real values
     629  if (problemStatus_) {
     630    infeasibilityCost_=0.0;
     631    createRim(7);
     632    nonLinearCost_->checkInfeasibilities(true);
     633    sumPrimalInfeasibilities_=nonLinearCost_->sumInfeasibilities();
     634    numberPrimalInfeasibilities_= nonLinearCost_->numberInfeasibilities();
     635  }
    621636  // at present we are leaving factorization around
    622637  // maybe we should empty it
     
    690705  // we may wish to say it is optimal even if infeasible
    691706  bool alwaysOptimal = (specialOptions_&1)!=0;
    692   if (dualFeasible()||problemStatus_==-4) {
     707  if (dualFeasible()||problemStatus_==-4||type==3) {
    693708    if (nonLinearCost_->numberInfeasibilities()&&!alwaysOptimal) {
    694709      //may need infeasiblity cost changed
Note: See TracChangeset for help on using the changeset viewer.