Could I please send my model and data file to your individual email address instead of posting in the group? As this is a work in progress.
Thank you.
On Tue, Nov 30, 2021 at 10:49 PM UTC, AMPL Modeling Language <am...@googlegroups.com> wrote:
Thank you very much for your reply, Professor Fourer.
May I update some findings:
Below is my cplex option settings:
option cplex_options 'feasibility=1e-9 \
presolve=0 \
integrality=1e-9 \
mipgap=0';
option presolve 0;
option solver cplex;
option display_precision 0;
1. If I remove option cplex_options 'presolve=0', I get objective=1. May I ask is that ok to disable both AMPL's and CPLEX's presolve at the same time? What do the two different presolves do exactly?
2. If I use an older version of cplex (12.6.3.0), the objective becomes 1. But version 12.9.0.0 still produces -0.08689655172.
3. After I add basis=0 to gurobi_options, the objective is 1 which is inconsistent with cplex.
Many thanks.
在2021年11月29日星期一 UTC 19:05:09<AMPL Google Group> 写道:
It can happen that an optimization problem has a solution that is feasible to within a tolerance of 1e-8, yet it has no feasible solution to within the stricter tolerance of 1e-9. In this situation, when you apply CPLEX with feasibility=1e-8, it will report an optimal solution, although with some constraints slightly violated; but when you change to feasibility=1e-9, CPLEX will not report a feasible solution.
You will have to use your knowledge of the problem to determine what feasibility tolerance is acceptable. I suggest that you start by making tests with the tolerances at their default values, and then only increase the feasibility (and integrality) tolerances if the solver is returning infeasibilities that are unacceptably large. (AMPL's display statement is useful for this.) To make comparisons between tests of similar models, or of the same model with different data, it is best to use the same feasibility tolerances in all runs.
CPLEX's report of "optimal integer solution; objective -0.08689655172" may be a bug of some kind, especially since the log makes it clear that no feasible solution was found. If you can post model and data files for this case, we can try to reproduce the incorrect message it and to see how it can be fixed.
The AMPL interface to Gurobi actually does a second solve, with all integer variables rounded and fixed to the nearest integer value. To get Gurobi results that are comparable to CPLEX results, you should add basis=0 to gurobi_options to suppress this second solve.
--
Robert Fourer
On Mon, Nov 29, 2021 at 7:04 PM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
It can happen that an optimization problem has a solution that is feasible to within a tolerance of 1e-8, yet it has no feasible solution to within the stricter tolerance of 1e-9. In this situation, when you apply CPLEX with feasibility=1e-8, it will report an optimal solution, although with some constraints slightly violated; but when you change to feasibility=1e-9, CPLEX will not report a feasible solution.
You will have to use your knowledge of the problem to determine what feasibility tolerance is acceptable. I suggest that you start by making tests with the tolerances at their default values, and then only increase the feasibility (and integrality) tolerances if the solver is returning infeasibilities that are unacceptably large. (AMPL's display statement is useful for this.) To make comparisons between tests of similar models, or of the same model with different data, it is best to use the same feasibility tolerances in all runs.
CPLEX's report of "optimal integer solution; objective -0.08689655172" may be a bug of some kind, especially since the log makes it clear that no feasible solution was found. If you can post model and data files for this case, we can try to reproduce the incorrect message it and to see how it can be fixed.
The AMPL interface to Gurobi actually does a second solve, with all integer variables rounded and fixed to the nearest integer value. To get Gurobi results that are comparable to CPLEX results, you should add basis=0 to gurobi_options to suppress this second solve.
--
Robert Fourer
am...@googlegroups.com
ampl: display {i in 1.._ncons: _con[i].slack < 0} (_conname[i],_con[i].slack);
: _conname[i] _con[i].slack :=
2 "input_volume['TE']" -2.842170943040401e-14
3 "input_volume['EX']" -1.3969838619232178e-09
27 'ratio_linearized[141992]' -4.440892098500626e-16
4459 equals -4.440892098500626e-16
;subject to input_volume {i in SETE}:
(1/Data[o,i]) * sum {j in SETA} lambda[j]*Data[j,i] <= 1;Thank you for your kind reply. I have sent my files to your support service.
On Thu, Dec 2, 2021 at 11:19 PM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
All presolve phases transform the optimization problem with the goal of making it smaller and easier to solve. AMPL's presolve is described in Experience with a Primal Presolve Algorithm. CPLEX's presolve uses the same ideas, but also others that are applicable when there are some integer variables. I do not know of specific documentation for CPLEX's presolve, but I expect it is a lot like what is described in the attached paper by Achterberg, Bixby, Gu, Rothberg, and Weninger.If you disable both AMPL's and CPLEX's presolve, then CPLEX will have to solve the original problem without presolve reductions, but there is nothing obviously wrong with that.
It does appear that something changed in CPLEX, no later than version 9.0, causing it to find a wrong solution for your problem under very specific option settings. If you can send the model and data file as attachments to sup...@ampl.com (which is private), we can try to reproduce and suggest how to fix it or work around it. But if we determine that the problem is due to a bug inside the CPLEX code, then we would have to report it to the CPLEX team at IBM, and it would be up to them whether to try to fix it.
--
Robert Fourer
am...@googlegroups.com
On Thu, Dec 2, 2021 at 11:04 PM UTC, AMPL Modeling Language <am...@googlegroups.com> wrote:
Could I please send my model and data file to your individual email address instead of posting in the group? As this is a work in progress.
Thank you.
On Tue, Nov 30, 2021 at 10:49 PM UTC, AMPL Modeling Language <am...@googlegroups.com> wrote:
Thank you very much for your reply, Professor Fourer.
May I update some findings:
Below is my cplex option settings:
option cplex_options 'feasibility=1e-9 \
presolve=0 \
integrality=1e-9 \
mipgap=0';
option presolve 0;
option solver cplex;
option display_precision 0;
1. If I remove option cplex_options 'presolve=0', I get objective=1. May I ask is that ok to disable both AMPL's and CPLEX's presolve at the same time? What do the two different presolves do exactly?
2. If I use an older version of cplex (12.6.3.0), the objective becomes 1. But version 12.9.0.0 still produces -0.08689655172.
3. After I add basis=0 to gurobi_options, the objective is 1 which is inconsistent with cplex.
Many thanks.