Presentation is loading. Please wait.

Presentation is loading. Please wait.

EMIS 8373: Integer Programming

Similar presentations


Presentation on theme: "EMIS 8373: Integer Programming"— Presentation transcript:

1 EMIS 8373: Integer Programming
Introduction to AMPL updated 10 January 2006

2 Starting AMPL

3 Entering the GT Railroad Problem

4 Solving the GT Railroad Problem

5 A General Transportation Model
h e s t o f r i g n D d a u m b v l j q c p x m i n X 2 O ; j D c x s u b e t o a 8 r

6 transport_model.txt set O; set D; param a {i in O}; param r {j in D};
param c {i in O, j in D}; var x {i in O, j in D} >= 0; minimize cost: sum {i in O, j in D} c[i,j] * x[i,j]; subject to supply {i in O}: sum {j in D} x[i,j] <= a[i]; subject to demand {j in D}: sum {i in O} x[i,j] >= r[j];

7 GT_data.txt set O := IE_Junction, Centerville, Wayover_City;
set D := A_Station, Fine_Place, Goodville, Somewhere_Street; # supply param a := IE_Junction     4 Centerville     1 Wayover_City    2; # demand param r := A_Station       1 Fine_Place      1 Goodville       1 Somewhere_Street        1;

8 GT_data.txt param c :                A_Station       Fine_Place      Goodville       Somewhere_Street := IE_Junction                                               Centerville                    61                            Wayover_City            ;      

9 Solving the Model with GT_data.txt

10 The expand Command

11 The expand Command

12 Editing the Data File

13 Edited GT_data.txt set O := IE_Junction, Centerville, Wayover_City;
set D := A_Station, Fine_Place, Goodville, Somewhere_Street; # supply param a := IE_Junction     3 Centerville     3 Wayover_City    3; # demand param r := A_Station       2 Fine_Place      2 Goodville       2 Somewhere_Street        2;

14 Resolving the Model

15 New Optimal Solution

16 Display the Results to a File

17 Using AMPL Student Edition on Windows
Download AMPL Student Edition Download model and data file from Blackboard transport_model.txt GT_data.txt Save the files in the amplcml directory created in step 1 Double click on the AMPL icon to start AMPL

18

19 Solving the Model

20 Solving the Model with CPLEX

21 Edit GT_data.txt with WordPad

22 Find New Solution and Save Results

23 Viewing the Results Quit AMPL Open results.txt with WordPad or Word


Download ppt "EMIS 8373: Integer Programming"

Similar presentations


Ads by Google