Skip to content

Commit

Permalink
fix for people doing their own crossover after barrier
Browse files Browse the repository at this point in the history
  • Loading branch information
jjhforrest committed Dec 14, 2023
1 parent 2f97a4d commit ae94d6e
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/ClpSolve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4051,7 +4051,25 @@ int ClpSimplex::initialBarrierNoCrossSolve()
ClpSolve options;
// Use primal
options.setSolveType(ClpSolve::useBarrierNoCross);
return initialSolve(options);
int returnCode = initialSolve(options);
// clean for simplex and put slacks in basis
for (int i=0;i<numberRows_;i++)
status_[i+numberColumns_] = ClpSimplex::basic;
for (int i=0;i<numberColumns_;i++) {
if (columnLower_[i]==columnUpper_[i]) {
columnActivity_[i] = columnLower_[i];
status_[i] = ClpSimplex::isFixed;
} else if (columnActivity_[i]<=columnLower_[i]) {
columnActivity_[i] = columnLower_[i];
status_[i] = ClpSimplex::atLowerBound;
} else if (columnActivity_[i]>=columnUpper_[i]) {
columnActivity_[i] = columnUpper_[i];
status_[i] = ClpSimplex::atUpperBound;
} else {
status_[i] = ClpSimplex::superBasic;
}
}
return returnCode;
}

// General barrier solve
Expand Down

0 comments on commit ae94d6e

Please sign in to comment.