Progressive Hedging in AMPL

29 views
Skip to first unread message

shammo....@gmail.com

unread,
Apr 16, 2017, 12:13:42 PM4/16/17
to AMPL Modeling Language
Hey,
I am implementing a progressive hedging algorithm in AMPL.
I have 5 scenarios, and for each scenario I need to solve the same MILP problem, only one input parameter is different.
Now is there any way I can solve 5 scenarios at the same time in 5 separate threads and get the result and then do the post processing of data ?

Regards
Shammya Saha

Robert Fourer

unread,
Apr 17, 2017, 11:05:56 AM4/17/17
to am...@googlegroups.com
It is possible to write an AMPL loop that starts 5 separate single-threaded solver runs, and then another loop that reads the results of the runs and processes them. The details depend however on the operating system (Windows, Linux, or macOS) that you are using.

This may not be worth the trouble, however. If you solve one MILP at a time, the solver will use all of the available threads to speed up the processing. And if you solve 5 MILPs in parallel using only one thread each, you will have 5 times the memory requirement which may slow the solver processes due to competition for memory resources. So before deciding that you want to try the 5-in-parallel option, you should compare the solver running times for 1 thread to the times for all threads, and you should look at the memory requirements when running in 1 thread to be sure that 5 solver runs will fit into physical memory.

Bob Fourer
am...@googlegroups.com

=======

shammo....@gmail.com

unread,
Apr 18, 2017, 2:12:35 PM4/18/17
to AMPL Modeling Language

How can i create a loop that takes care of 5 individidual problems ? 
Any resources ?  

Robert Fourer

unread,
Apr 19, 2017, 11:01:57 AM4/19/17
to am...@googlegroups.com
The attached example gives the general idea.

Bob Fourer
am...@googlegroups.com

=======

From: am...@googlegroups.com [mailto:am...@googlegroups.com] On Behalf Of shammo....@gmail.com
Sent: Tuesday, April 18, 2017 11:14 AM
To: AMPL Modeling Language
submit.run
sched1.mod
sched.dat
Reply all
Reply to author
Forward
0 new messages