AMPL commands for Sensitivity Analysis

AMPL commands for Sensitivity Analysis - Displays the...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
AMPL Commands for Sensitivity Analysis 1. Choose cplex solver and activate the sensitivity analysis package ampl: option solver cplex; ampl: option cplex_options ‘sensitivity’; 2. Upload the “.mod”, “.dat” file and solve it as usual 3. Type in the commands you need Commands Use display <var name>.rc; eg, display x1.rc; Displays the reduced cost of the variable named <var name>. display <var name>.up; Displays, respectively, the upper and lower endpoints of the range of the objective function coefficient of the variable named <var name> for which the current basis remains optimal. display <var name>.down; display <var name>.current; Displays the current value of the objective function coefficient of the variable named <var name>. display <constr name>;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Displays the shadow price of the constraint &lt;constr name&gt;. display &lt;constr name&gt;.up; eg, display time.up; Displays, respectively, the lower and upper endpoints of the range of the right-hand-side of the constraint named &lt;constr name&gt; for which the current basis remains feasible, and hence optimal. display &lt;constr name&gt;.down; display &lt;constr name&gt;.current; Displays the current value of the right-hand-side of the constraint named &lt;constr name&gt;. display &lt;constr name&gt;.slack; Displays the slack in the constraint named &lt;constr name&gt;. let &lt;name&gt;:=&lt;value&gt;; eg, let c:=1; Assigns the variable or parameter named &lt;name&gt; the value&lt;value&gt;; Useful for making small changes to the LP data. For larger changes, use &quot;reset data; data &lt;new data-file&gt;;&quot;...
View Full Document

Ask a homework question - tutors are online