Skip to content

Commit

Permalink
try and be a bit safer at end of dual (partly for TwoMir)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjhforrest committed Aug 31, 2023
1 parent 8294096 commit b68f51f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ClpSimplex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5588,7 +5588,6 @@ int ClpSimplex::dualDebug(int ifValuesPass, int startFinishOptions)

This is to stop classes becoming too unwieldy and so I (JJF) can use e.g. "perturb"
in primal and dual.

As far as I can see this is perfectly safe.
*/
#ifdef COIN_DEVELOP
Expand Down Expand Up @@ -5683,7 +5682,8 @@ int ClpSimplex::dualDebug(int ifValuesPass, int startFinishOptions)
#endif
//int lastAlgorithm = -1;
if ((specialOptions_ & 2048) != 0 && problemStatus_ == 10 && !numberPrimalInfeasibilities_
&& sumDualInfeasibilities_ < 50.0 * dualTolerance_ && perturbation_ >= 100)
&& sumDualInfeasibilities_ < 50.0 * dualTolerance_
&& perturbation_ >= 100 && objectiveValue_ >= bestObjectiveValue_)
problemStatus_ = 0; // ignore
if (problemStatus_ == 1 && ((specialOptions_ & (1024 | 4096)) == 0 || (specialOptions_ & 32) != 0)
&& (static_cast< ClpSimplexDual * >(this))->checkFakeBounds()) {
Expand Down
2 changes: 2 additions & 0 deletions src/ClpSimplexDual.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,8 @@ int ClpSimplexDual::startupSolve(int ifValuesPass, double *saveDuals, int startF
usePrimal = perturb();
// Can't get here if values pass
gutsOfSolution(NULL, NULL);
// save for later check
bestObjectiveValue_=objectiveValue_;
#ifdef CLP_INVESTIGATE
if (numberDualInfeasibilities_)
printf("ZZZ %d primal %d dual - sumdinf %g\n",
Expand Down

0 comments on commit b68f51f

Please sign in to comment.