Change a MILP to an LP #2904
Closed
erling-d-andersen started this conversation in General
Replies: 1 comment
-
| I should add highs.passModel(lp); Sorry. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi
I want to solve the
I read the MILP from a MPS file.
ChatGPT told me to use the command
void changeToContinous(Highs &highs)
{
// Assume model already loaded
HighsLp lp = highs.getLp();
// Remove integrality from all variables
for (int i = 0; i < lp.num_col_; i++) {
lp.integrality_[i] = HighsVarType::kContinuous;
}
}
but it did do the trick.
In CPLEX you can use
CPXchgprobtype(env, lp, CPXPROB_LP);
to do what I want.
Thanks for any suggestions.
Beta Was this translation helpful? Give feedback.
All reactions