Changeset 2255


Ignore:
Timestamp:
Jan 9, 2017 1:18:44 PM (3 years ago)
Author:
forrest
Message:

fix segfault on dual->primal when infeasible

File:
1 edited

Legend:

Unmodified
Added
Removed
  • stable/1.16/Clp/src/ClpSimplexPrimal.cpp

    r2237 r2255  
    13371337               double saveWeight = infeasibilityCost_;
    13381338               // save nonlinear cost as we are going to switch off costs
    1339                ClpNonLinearCost * nonLinear = nonLinearCost_;
     1339               //ClpNonLinearCost * nonLinear = nonLinearCost_;
    13401340               // do twice to make sure Primal solution has settled
    13411341               // put non-basics to bounds in case tolerance moved
     
    13451345               gutsOfSolution(NULL, NULL, ifValuesPass != 0);
    13461346
    1347                infeasibilityCost_ = 1.0e100;
     1347               //infeasibilityCost_ = 1.0e100;
    13481348               // put back original costs
    13491349               createRim(4);
     
    13561356                    nonLinearCost_->checkInfeasibilities(primalTolerance_);
    13571357               } else {
    1358                     nonLinearCost_ = NULL;
    1359                     // scale
    1360                     int i;
    1361                     for (i = 0; i < numberRows_ + numberColumns_; i++)
    1362                          cost_[i] *= 1.0e-95;
     1358                    infeasibilityCost_ = 1.0e30;
    13631359                    gutsOfSolution(NULL, NULL, ifValuesPass != 0 && firstFree_>=0);
    1364                     nonLinearCost_ = nonLinear;
    13651360                    infeasibilityCost_ = saveWeight;
    13661361                    if ((infeasibilityCost_ >= 1.0e18 ||
Note: See TracChangeset for help on using the changeset viewer.