Changeset 1657 for trunk/Cbc


Ignore:
Timestamp:
May 31, 2011 8:52:49 AM (8 years ago)
Author:
forrest
Message:

correct objectiveValue_

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cbc/src/CbcNode.cpp

    r1650 r1657  
    22532253                // may just need resolve
    22542254                model->resolve(NULL, 11, saveSolution, saveLower, saveUpper);
    2255                 //double newObjValue = solver->getObjSense()*solver->getObjValue();
    2256                 //objectiveValue_ = CoinMax(objectiveValue_,newObjValue);
     2255                double newObjValue = solver->getObjSense()*solver->getObjValue();
     2256                objectiveValue_ = CoinMax(objectiveValue_,newObjValue);
    22572257                if (!solver->isProvenOptimal()) {
    22582258                    // infeasible
     
    23762376                    solver->setHintParam(OsiDoDualInResolve, false, OsiHintDo) ;
    23772377                    model->resolve(NULL, 11, saveSolution, saveLower, saveUpper);
    2378                     //double newObjValue = solver->getObjSense()*solver->getObjValue();
    2379                     //objectiveValue_ = CoinMax(objectiveValue_,newObjValue);
     2378                    double newObjValue = solver->getObjSense()*solver->getObjValue();
     2379                    objectiveValue_ = CoinMax(objectiveValue_,newObjValue);
    23802380                    solver->setHintParam(OsiDoDualInResolve, takeHint, strength) ;
    23812381                    if (!solver->isProvenOptimal()) {
     
    25972597                        solver->unmarkHotStart();
    25982598                        model->resolve(NULL, 11, saveSolution, saveLower, saveUpper);
    2599                         //double newObjValue = solver->getObjSense()*solver->getObjValue();
    2600                         //objectiveValue_ = CoinMax(objectiveValue_,newObjValue);
     2599                        double newObjValue = solver->getObjSense()*solver->getObjValue();
     2600                        objectiveValue_ = CoinMax(objectiveValue_,newObjValue);
    26012601                        solver->markHotStart();
    26022602                        problemFeasible = solver->isProvenOptimal();
     
    29032903                                    model->resolve(NULL, 11, saveSolution, saveLower, saveUpper);
    29042904                                    newObjectiveValue = solver->getObjSense() * solver->getObjValue();
    2905                                     //objectiveValue_ = CoinMax(objectiveValue_,newObjectiveValue);
     2905                                    objectiveValue_ = CoinMax(objectiveValue_,newObjectiveValue);
    29062906                                    objectiveChange = CoinMax(newObjectiveValue  - objectiveValue_, 0.0);
    29072907                                    model->feasibleSolution(choice.numIntInfeasDown,
     
    29372937                        needHotStartUpdate = false;
    29382938                        model->resolve(NULL, 11, saveSolution, saveLower, saveUpper);
    2939                         //double newObjValue = solver->getObjSense()*solver->getObjValue();
    2940                         //objectiveValue_ = CoinMax(objectiveValue_,newObjValue);
     2939                        double newObjValue = solver->getObjSense()*solver->getObjValue();
     2940                        objectiveValue_ = CoinMax(objectiveValue_,newObjValue);
    29412941                        //we may again have an integer feasible solution
    29422942                        int numberIntegerInfeasibilities;
     
    29572957                                                   solver->getColSolution()) ;
    29582958                            model->resolve(NULL, 11, saveSolution, saveLower, saveUpper);
    2959                             //double newObjValue = solver->getObjSense()*solver->getObjValue();
    2960                             //objectiveValue_ = CoinMax(objectiveValue_,newObjValue);
     2959                            double newObjValue = solver->getObjSense()*solver->getObjValue();
     2960                            objectiveValue_ = CoinMax(objectiveValue_,newObjValue);
    29612961                            cutoff = model->getCutoff();
    29622962                        }
     
    30643064                                    model->resolve(NULL, 11, saveSolution, saveLower, saveUpper);
    30653065                                    newObjectiveValue = solver->getObjSense() * solver->getObjValue();
    3066                                     //objectiveValue_ = CoinMax(objectiveValue_,newObjectiveValue);
     3066                                    objectiveValue_ = CoinMax(objectiveValue_,newObjectiveValue);
    30673067                                    objectiveChange = CoinMax(newObjectiveValue  - objectiveValue_, 0.0);
    30683068                                    model->feasibleSolution(choice.numIntInfeasDown,
     
    30983098                        needHotStartUpdate = false;
    30993099                        model->resolve(NULL, 11, saveSolution, saveLower, saveUpper);
    3100                         //double newObjValue = solver->getObjSense()*solver->getObjValue();
    3101                         //objectiveValue_ = CoinMax(objectiveValue_,newObjValue);
     3100                        double newObjValue = solver->getObjSense()*solver->getObjValue();
     3101                        objectiveValue_ = CoinMax(objectiveValue_,newObjValue);
    31023102                        //we may again have an integer feasible solution
    31033103                        int numberIntegerInfeasibilities;
     
    31123112                                                   solver->getColSolution()) ;
    31133113                            model->resolve(NULL, 11, saveSolution, saveLower, saveUpper);
    3114                             //double newObjValue = solver->getObjSense()*solver->getObjValue();
    3115                             //objectiveValue_ = CoinMax(objectiveValue_,newObjValue);
     3114                            double newObjValue = solver->getObjSense()*solver->getObjValue();
     3115                            objectiveValue_ = CoinMax(objectiveValue_,newObjValue);
    31163116                            cutoff = model->getCutoff();
    31173117                        }
     
    32573257                        solver->unmarkHotStart();
    32583258                        model->resolve(NULL, 11, saveSolution, saveLower, saveUpper);
    3259                         //double newObjValue = solver->getObjSense()*solver->getObjValue();
    3260                         //objectiveValue_ = CoinMax(objectiveValue_,newObjValue);
     3259                        double newObjValue = solver->getObjSense()*solver->getObjValue();
     3260                        objectiveValue_ = CoinMax(objectiveValue_,newObjValue);
    32613261                        solver->markHotStart();
    32623262                        // may be infeasible (if other way stopped on iterations)
     
    32993299                        solver->unmarkHotStart();
    33003300                        model->resolve(NULL, 11, saveSolution, saveLower, saveUpper);
    3301                         //double newObjValue = solver->getObjSense()*solver->getObjValue();
    3302                         //objectiveValue_ = CoinMax(objectiveValue_,newObjValue);
     3301                        double newObjValue = solver->getObjSense()*solver->getObjValue();
     3302                        objectiveValue_ = CoinMax(objectiveValue_,newObjValue);
    33033303                        solver->markHotStart();
    33043304                        // may be infeasible (if other way stopped on iterations)
     
    33833383                    solver->setHintParam(OsiDoInBranchAndCut, true, OsiHintDo, &easy) ;
    33843384                    model->resolve(NULL, 11, saveSolution, saveLower, saveUpper) ;
    3385                     //double newObjValue = solver->getObjSense()*solver->getObjValue();
    3386                     //objectiveValue_ = CoinMax(objectiveValue_,newObjValue);
     3385                    double newObjValue = solver->getObjSense()*solver->getObjValue();
     3386                    objectiveValue_ = CoinMax(objectiveValue_,newObjValue);
    33873387                    solver->setHintParam(OsiDoInBranchAndCut, true, OsiHintDo, NULL) ;
    33883388                    feasible = solver->isProvenOptimal();
Note: See TracChangeset for help on using the changeset viewer.