Difference: LoopingInAMPL (3 vs. 4)

Revision 42008-03-18 - TWikiAdminUser

Line: 1 to 1
 
META TOPICPARENT name="AMPLSyntax"
<-- Under Construction -->
Line: 24 to 24
 }
Changed:
<
<
Examples coming soon!
>
>
Examples coming soon!
  Return to top
Line: 35 to 35
 let {e in SET} <parameter, usually involving e> := <expression, often involving e>;
Changed:
<
<
Consider the following possibility for the American Steel . American Steel can get a 5% discount with their transportation provider out of Chicago as long as they commit to at least 1000 tonnes along each route. This change can be easily incorporated using two “looping” let statements. let {n in NODES : (‘Chicago’, n) in ARCS} Cost[‘Chicago’, n] := 0.95 * Cost[‘Chicago’, n]; let {n in NODES : (‘Chicago’, n) in ARCS} Min[‘Chicago’, n] := max(1000, Min[‘Chicago’, n]);
>
>
Consider the following possibility for the American Steel problems (the American Steel transshipment problem and the American Steel planning problem respectively). American Steel can get a 5\% discount with their transportation provider out of Chicago as long as they commit to at least 1000 tonnes along each route. This change can be easily incorporated using two looping let statements:
let {n in NODES : ('Chicago', n) in ARCS} Cost['Chicago', n] := 0.95 * Cost['Chicago', n];
let {n in NODES : ('Chicago', n) in ARCS} Min['Chicago', n] := max(1000, Min['Chicago', n]);
 
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback