-
Notifications
You must be signed in to change notification settings - Fork 269
Order path separator #2674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: latest
Are you sure you want to change the base?
Order path separator #2674
Changes from all commits
74a36d3
9d4b2e5
16b1c97
59a819f
5422136
6f62e0e
2004887
48be3da
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,6 +32,7 @@ HighsTransformedLp::HighsTransformedLp(const HighsLpRelaxation& lprelaxation, | |
| std::make_pair(-1, HighsImplications::VarBound())); | ||
| boundTypes.resize(numTransformedCol); | ||
| vectorsum.setDimension(numTransformedCol); | ||
| colFractionality.resize(lprelaxation.numCols()); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This vector does not have to be re-initialized (with zeros), correct? |
||
|
|
||
| for (HighsInt col : mipsolver.mipdata_->continuous_cols) { | ||
| mipsolver.mipdata_->implications.cleanupVarbounds(col); | ||
|
|
@@ -57,9 +58,26 @@ HighsTransformedLp::HighsTransformedLp(const HighsLpRelaxation& lprelaxation, | |
| if (ubDist[col] <= mipsolver.mipdata_->feastol) ubDist[col] = 0.0; | ||
|
|
||
| boundDist[col] = std::min(lbDist[col], ubDist[col]); | ||
|
|
||
| if (lbDist[col] <= ubDist[col] && lbDist[col] == 0 && | ||
| bestVlb[col].first != -1) { | ||
| const double frac = | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is an utility
in |
||
| std::min(lpSolution.col_value[bestVlb[col].first], | ||
| 1 - lpSolution.col_value[bestVlb[col].first]); | ||
| colFractionality[col] = bestVlb[col].second.coef * frac; | ||
| } else if (ubDist[col] <= lbDist[col] && ubDist[col] == 0 && | ||
| bestVub[col].first != -1) { | ||
| const double frac = | ||
| std::min(lpSolution.col_value[bestVub[col].first], | ||
| 1 - lpSolution.col_value[bestVub[col].first]); | ||
| colFractionality[col] = bestVub[col].second.coef * frac; | ||
| } | ||
| } | ||
|
|
||
| for (HighsInt col : mipsolver.mipdata_->integral_cols) { | ||
| double frac = | ||
| lpSolution.col_value[col] - std::floor(lpSolution.col_value[col]); | ||
| colFractionality[col] = std::min(frac, 1 - frac); | ||
| double bestub = mipsolver.mipdata_->domain.col_upper_[col]; | ||
| double bestlb = mipsolver.mipdata_->domain.col_lower_[col]; | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you have
double absval = std::abs(lp.a_matrix_.value_[i]);here and use this in the following two lines (instead of having the
std::abstwice)?