|
META TOPICPARENT |
name="TransshipmentProblem" |
The Transshipment Problem in AMPL |
|
The net demand is declared as an integer parameter (note there is no >= 0):
|
|
< < | param NetDemand {NODES} integer; |
> > | param NetDemand {NODES} integer, default 0; |
| |
|
> > | Setting the default NetDemand to be 0 means that no values need to be entered for transshipment nodes. |
|
Note that the set NODES and the parameter NetDemand can be easily created from SUPPLY_NODES , DEMAND_NODES , Supply , etc, e.g.,:
|
| param Supply {SUPPLY_NODES} >= 0, integer;
param Demand {DEMAND_NODES} >= 0, integer; |
|
< < | param NetDemand {n in NODES} integer |
> > | param NetDemand {n in NODES} integer, default 0 |
| := if n in SUPPLY_NODES then -Supply[n]
else if n in DEMAND_NODES then Demand[n]; # else 0 by default
|
|
META FILEATTACHMENT |
attachment="latex5da5abb9ccf4cbbc7eee6659924b1403.png" attr="h" comment="" date="1208854554" name="latex5da5abb9ccf4cbbc7eee6659924b1403.png" stream="GLOB(0xa748acc)" tmpFilename="latex5da5abb9ccf4cbbc7eee6659924b1403.png" user="BaseUserMapping_333" version="1" |
META FILEATTACHMENT |
attachment="latex56f76e376243ad67ee1d9ef33bf47490.png" attr="h" comment="" date="1208854554" name="latex56f76e376243ad67ee1d9ef33bf47490.png" stream="GLOB(0xa748aa8)" tmpFilename="latex56f76e376243ad67ee1d9ef33bf47490.png" user="BaseUserMapping_333" version="1" |
|
|
< < |
META FILEATTACHMENT |
attachment="transshipment.mod" attr="" comment="" date="1209348830" name="transshipment.mod" path="transshipment.mod" size="1568" stream="transshipment.mod" tmpFilename="" user="MichaelOSullivan" version="3" |
|
> > |
META FILEATTACHMENT |
attachment="transshipment.mod" attr="" comment="" date="1209349266" name="transshipment.mod" path="transshipment.mod" size="1568" stream="transshipment.mod" tmpFilename="" user="MichaelOSullivan" version="5" |
|