GAMS [ Home | Downloads | Documentation | Solvers | APIs | Tools | Model Libraries | Resources | Sales | Support | Contact Us | Search ]

Benders2StageMT Class Reference

This example demonstrates a parallel implementation of a simple Benders decomposition method for a stochastic linear program. More...

Detailed Description

This example demonstrates a parallel implementation of a simple Benders decomposition method for a stochastic linear program.

The underlying model implements a simple distribution system with stochastic demand data. The parallel version extends the Benders2Stage example by solving the independent subproblems in parallel. For that we need to instantiate a separate GAMSModelInstance for each parallel worker. We use the efficient GAMSModelInstance.copyModelInstance method to accomplish this in the most effective way. The number of demand scenarios can be larger than the number of parallel workers. The distribution of work is handles through a work queue. The parallel execution of the subproblems is done in separate threads (the MT in the name of the example stands for Multi Threading), so there is very little overhead from disk activity.

Definition at line 40 of file Benders2StageMT.java.