Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
<-- Under Construction --> | ||||||||
Line: 9 to 9 | ||||||||
Changed: | ||||||||
< < | How many decimal places? | |||||||
> > | How many decimal places? | |||||||
Changed: | ||||||||
< < | ??? Up to here ???
When solving mathematical programming problems, the accuracy of your solutions should *never* be more than the
accuracy of your data. You can set the precision that AMPL displays values via the {\tt display_precision} option.
For example, if your inputs are specified to 4 significant digits, e.g., {\tt 0.013}, you can use
\begin{verbatim} | |||||||
> > | When solving mathematical programming problems, the accuracy of your solutions should never be more than the
accuracy of your data. You can set the precision that AMPL displays values via the display_precision option. For example, if your inputs are specified to 4 significant digits, e.g., 0.013 , you can use
| |||||||
option display_precision 4; | ||||||||
Changed: | ||||||||
< < | \end{verbatim} | |||||||
> > | ||||||||
to get your solution values to the same number of significant digits. | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | src="four_dp.jpg" | |||||||
Note that AMPL still keeps its numbers at full precision, so you need to be careful with your objective function values. | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | src="five_dp.jpg" | |||||||
Changed: | ||||||||
< < | When we change the {\tt display_precision} to 5 significant digits, the displayed {\tt TotalCost} and the cost calculated by using the displayed {\tt Amount} values differ. If you are using rounded solution values, make sure to *check* the *objective value* before quoting your solution. | |||||||
> > | When we change the display_precision to 5 significant digits, the displayed TotalCost and the cost calculated by using the displayed Amount values differ. If you are using rounded solution values, make sure to check the objective value before quoting your solution.
??? Up to here ??? | |||||||
Displaying InformationYou have already seen how to display a variable using the {\tt display} command. We can also display {a href="Expressioins in AMPL">AMPL expressions the same way, e.g., we might want to see how supply we are using in a transportation problem. | ||||||||
Line: 97 to 97 | ||||||||
\end{verbatim} -- MichaelOSullivan - 02 Mar 2008 \ No newline at end of file | ||||||||
Added: | ||||||||
> > |
|