# Difference: TransportationProblemInAMPL (4 vs. 5)

#### Revision 52008-04-02 - MichaelOSullivan

Line: 1 to 1

 META TOPICPARENT name="AMPLGuide"

# The Transportation Problem in AMPL

## AMPL Formulation

Changed:
<
<
The formulation of the transportation problem is AMPL is a straightforward translation of the mathematical programme for the transportation problem.
>
>
The formulation of the transportation problem is AMPL is a straightforward translation of the mathematical programme for the transportation problem. We will build the file transportation.mod.
The sets and are declared as SUPPLY_NODES and DEMAND_NODES respectively:


Line: 55 to 55

## Balancing Transportation Problems

Changed:
<
<
Balanced transportation models are preferred as there is no confusion about the relational operators for the supply and demand constraints. We can use script file to balance any transportation problem automatically:
>
>
Balanced transportation models are preferred as there is no confusion about the relational operators for the supply and demand constraints. We can use a script file (transportation.run) to balance any transportation problem automatically:

reset;


Line: 96 to 96
Note the check statement to ensure that the balancing has been done properly before solving. Also, note that costToDummy and costFromDummy allow for the definition of costs on any flow from/to a dummy node in the data file.
Deleted:
<
<
Both the AMPL model file transportation.mod and script file transportation.run are attached.
-- MichaelOSullivan - 02 Apr 2008

 META FILEATTACHMENT attachment="latex526e21edb215dffbfdb5ee74dd06358b.png" attr="h" comment="" date="1207132191" name="latex526e21edb215dffbfdb5ee74dd06358b.png" stream="GLOB(0xa44d1b8)" tmpFilename="latex526e21edb215dffbfdb5ee74dd06358b.png" user="MichaelOSullivan" version="1"

Copyright © 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback