Replies: 2 comments 1 reply
-
|
That's a very good question. These commands have been there for a long time and the CPLEX_CMD has always solved the problem once (except very weird unexplained cases). Do you have a reference URL that clearly shows which options to send to CPLEX in each case? I see https://www.ibm.com/docs/en/cofz/12.10.0?topic=optimizer-invoking-mip-model and https://www.ibm.com/docs/en/cofz/12.10.0?topic=cplex-table-commands-interactive-optimizer but the documentation is not very explicit. Would you care to make a PR? Unfortunately we do not have CPLEX set up in the github CI so there's no way to easily test the differences though. If you know of a way to add cplex to the github CI that would be welcome too! |
Beta Was this translation helpful? Give feedback.
-
|
Firstly, thanks a lot for this library with an expressive syntax. And thanks for asking the exact question I have @twissocq :) and providing the links to recommendations. I see the benefit but I think I receive misleading results on the solution status due to the second run. Please let me know if I am missing something. The ProblemI experienced this while working with CPLEX and a mip model. I have a timelimit, say 600 sec. And the solver cannot find the optimal solution within the timelimit. I have used As far as I understand from the read model.lp
set timelimit 600
mipopt
change problem fixed
optimize
write solution.txtFirst PartThe first three lines initiates and solves the mip, finalizing with the following log: So far so good, I get an integer feasible solution with 32.65% gap. Second PartBut then, the execution continues with: change problem fixed
optimizeThis gives the following Final StatusAnd the final status of the execution is Question
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
When using the CPLEX_CMD solver (i.e., without relying on the CPLEX API), I noticed a peculiar behavior in how it handles MILP problems. Three commands are sent to cplex :
mipopt,change problem fixedand finallyoptimize.See on file cplex_apy.py starting at line 97
If
self.mipisTrue, then we runmipopt(line 97) thenoptimize(at line 103).To my knowledge, when using the official cplex python api, (with solver= CPLEX_PY()), only a single solve is performed.
My questions are:
Thank you in advance for any insights!
Beta Was this translation helpful? Give feedback.
All reactions