I have an issue displaying the results, and I hope you can help me. I have a MILP model with two binary variables (y, w) and one continuous variable (x). Despite using the command:
Specifies the amount by which an integer variable can be different from an integer and still be considered feasible.
A value of zero is permitted, and the optimizer will attempt to meet this tolerance.
However, in some models, computer round-off may still result in small, nonzero deviations from integrality.
There is no further explanation as to why small devations like 4.44089e-16 occur in this situation, but here are two AMPL options that you can use to suppress these values when using the display statement:
solution_round causes all values returned by the solver to be rounded at a specified number of digits past the decimal point. Thus, for example, option solution_round 10; will cause any solution value less than 5e-11 to be changed to zero.
display_round causes all values shown by the display statement to be rounded at a specified number of digits past the decimal point. Thus option display_round 10; will cause any displayed value less than 5e-11 to be shown as zero.
I would try solution_round first, since it does not affect the display command’s formatting of fractional values.