The U.S. Department of Transportation (DOT) is planning to build a new interstate to run from Detroit (Michigan) to Charleston (South Carolina). Several different routes have been proposed. They are summarized in the figure below, where node 1 represents Detroit and node 12 represents Charleston.
The numbers on the arcs indicate the estimated construction costs of the various links (in millions of dollars). It is estimated that all of the routes will require approximately the same total driving time to make the trip from Detroit to Charleston. Thus, the DOT is interested in identifying the least costly alternative.
1. Formulate an ILP model to determine the least costly construction plan.
2. Implement the model using the modeling language AMPL, and solve it by means of CPLEX.
3. Formulate an ILP model to determine the least costly route in case there are the following additional constraints: if arc (1,4) is used, then also arc (4,6) must be used; on the other hand, if arc (1,4) is not used, then the route must pass through node 9.
4. Implement the model in 3. using AMPL and CPLEX, and compare its optimal solution with the one found at point 2.
I figured out how to determine the least costly route in this way:
this is the file .mod
here there is the file.dat
while here there is the solution
So, give this, what should I change in these 2 files for resolve these 2 points?
3. Formulate an ILP model to determine the least costly route in case there are the following additional constraints: if arc (1,4) is used, then also arc (4,6) must be used; on the other hand, if arc (1,4) is not used, then the route must pass through node 9.
4. Implement the model in 3. using AMPL and CPLEX, and compare its optimal solution with the one found at point 2.
Really much apprecciate.
(Ps: Due Tre Quattro Cinque Sei Sette Otto Nove Dieci Undici are italian words for nombers, in english they are respectively Two Three Four Five Six Seven Eight Nine Ten Eleven)
--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampl+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ampl/de78b39c-54f3-44f6-a898-27f4fdb7e925n%40googlegroups.com.
this is actually a project from my university.
I need to solve an ILP through programming language AMPL using the solver CPLEX.
I tried to resolve the points 3 and 4 in this way.
file.mod
file .dat
Solution:
As you can see in this case It uses another route because I added the 2 constraints .
Is this correct? Or it s not and I m missing something?
(P.s Due Tre Quattro Cinque Sei Sette Otto Nove Dieci Undici are numbers from 1 to 11 in italian, respectively 1,2 ,3 ...)
On Sun, Dec 20, 2020 at 3:11 PM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
Is this an exercise assigned to your class? (There are already several adequate interstate highway routes from Detroit to Charleston.) I would not want to give away the answer. If you have a more narrow concern, however, such as how to write a certain AMPL statement correctly, or interpret a particular error message, or use a particular solver, then you can ask your question in this forum. Be sure to include a copy of the most recent version of your AMPL statements (or attach your model and data files) and provide the full text of any error messages that you are seeing.
--
Robert Fourer
am...@googlegroups.com