Originally posted by: SystemAdmin
[EdKlotz said:]
> This is with reference to my earlier post "Error Recovering Solution".
> I tried all your suggestions and finally I turned off AMPL Presolve (options presolve 0;) and
> the issue seemed to have been resolved. But I am trying some other data set and it is still
> giving me the same issue.
If your MIP model is ill conditioned, turning AMPL's presolve off probably just changed the
path CPLEX took and avoided the source of round off error on the first data set. But, it
didn't address the real source of the problem, so it will not consistently resolve the problem.
That would explain why a subsequent run on a similar dataset resulted in the same trouble
with the fixed problem.
The reason the fixed problem can be infeasible after CPLEX found a feasible integer solution
is that the fixed problem can differ slightly from the node LP during the MIP optimization that
gave rise to the associated integer feasible solution. The fixed problem fixes all discrete objects in your model. That may be the case for the associated node LP, but it may not;
a node LP can yield an integer feasible solution without having all discrete objects fixed.
Sometimes some of the unfixed discrete variables get pushed to discrete values by the node
LP optimization. If the model is ill conditioned or numerically unstable, this slight difference can be enough to yield different results. After all, by definition, ill conditioning means that
a small change to the problem data can yield a big changes in the computed results.
That said, you don't want to assume that a model is ill conditioned; you want to verify it.
With this in mind, try to assess whether your model has numerical issues. Does it have
mixtures of small and large coefficients in the constraints? If so, try and rescale the
model or modify the coefficients so that you improve the ratio of largest to smallest constraints without compromising the meaning of the model. If you are not sure about
the coefficients in the model, try using the 'writeprob'
directive in your cplex_options or AMPL's expand command to examine the constraints
in the model to look for mixtures of large and small coefficients. The writeprob directive allows you to export an LP, MPS or SAV file that you can examine using interactive CPLEX.
If you need more information on how to diagnose and correct ill conditioning and numerical
instability, try starting with
https://support.ilog.com/public/products/faq.cfm?FAQ=75&Product=CPLEXin the publicly available ILOG CPLEX FAQ web site.
> One thing to note is that specifying "options presolve 0;" to turn off AMPL presolve seems to > be working only for the first data set and not for the other. I could tell that because of the > following message in the logs (2nd data set):
>
> Presolve eliminates 0 constraints and 564 variables.
> Adjusted problem:
> 54117 variables:
> 52300 binary variables
> 1817 integer variables
> 44739 constraints, all linear; 505340 nonzeros
> 1 linear objective; 43655 nonzeros.
As I said above, turning AMPL's presolve off didn't really address the fundamental issue; it
just changed the path on one instance of your models so that some troublesome behavior was avoided. I don't think you should worry about this issue much. However, I believe AMPL's
presolve always removes fixed variables from the model, regardless of the setting of the presolve option. CPLEX has a similar behavior itself; it removes fixed variables regardless of the presolve setting because fixed variables can cause numerical trouble for the barrier method. Since AMPL is a solver independent modeling language, it cannot assess ahead of time which solver or algorithm is in use, so removing explicitly fixed variables is reasonable. They are essentially data in the model instance anyways.
Note that in the above presolve statistics, AMPL's presolve removed variables but not
constraints; this tends to confirm that presolve merely removed fixed variables and nothing
else.
#CPLEXOptimizers#DecisionOptimization