1 / 23

EMIS 8373: Integer Programming

EMIS 8373: Integer Programming. Introduction to AMPL updated 10 January 2006. Starting AMPL. Entering the GT Railroad Problem. Solving the GT Railroad Problem. h. f. O. T. i. i. t. e. s. e. o. o. r. g. n. s. h. f. d. D. T. i. i. t. t. t. e. s.

paloma
Download Presentation

EMIS 8373: Integer Programming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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. h f O T i i t e s e o o r g n s h f d D T i i t t t e s e o e s n a o n s X i b f l b l i i i i i t t m n c x a n u m e r o u n s a v a a e a o r g n i j i j i b f d d i i i i j t t t t O D i j 2 2 r n u m e r o u n s r e q u r e a e s n a o n j ; h f h f d i i i i i i i i j t t t t t t X c e c o s o s p p n g o n e e m r o m o r g n o e s n a o n i j b 8 O j i · t t 2 s u e c o x a i j i h b f h d f d i i i i i i i j t t t t t x e n u m e r o u n s s p p e r o m o r g n o e s n a o n i j D j 2 X 8 D j ¸ 2 x r i j j O i 2 8 O D i j 0 ¸ 2 2 x i j ; A General Transportation Model

  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     13              35              42              9 Centerville     6               61              18              30 Wayover_City    15       10 5 9 ; 

  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. Solving the Model

  19. Solving the Model with CPLEX

  20. Edit GT_data.txt with WordPad

  21. Find New Solution and Save Results

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

More Related