Maximum value for a parameter

121 views
Skip to first unread message

dmo...@gmail.com

unread,
Dec 26, 2021, 1:11:10 AM12/26/21
to AMPL Modeling Language
Hi AMPL team,

I am working on an Integer Programming Model. I have a few constraints that use the Big M parameter. I just realised that it depends on the Big M value, the result is different. So, ¿what is the maximum value that I can define in an AMPL .dat file?

Regards,

AMPL Google Group

unread,
Dec 26, 2021, 7:08:32 PM12/26/21
to AMPL Modeling Language
There is no maximum value that you can write in an AMPL .dat file. However, if you write a value that is larger than what can be represented in the computer, then when you try to display the value, AMPL will show it as "Infinity". AMPL uses the computer's "double precision" representation for data values, which gives a largest representable value of approximately 10 to the power 308.

But you should never use such a large "big M" value in your data. In general, you want to choose M to be large enough to make your results correct, but not too much larger than that. See my discussion of The Big M for a more detailed explanation.


--
Robert Fourer
am...@googlegroups.com
{#HS:1739511079-107826#}
Reply all
Reply to author
Forward
0 new messages