Dear all,

I recently started working with Xpress and I am trying to solve a branch and price model with two distinct pricing problems, where one submodel corresponds to variables k if k is smaller than a particular value and the other if k is greater than a particular value. Is it possible to create such two models and let them run and correspond to the master model simultaneously? For instance, (a part of the code of) what I tried to do is:

*parameters: *

*NCRANEL = 2*

*NCRANER = 2*

*SUBMOD1 = "Sub1"*

*SUBMOD2 = "Sub2"*

*end-parameters*

*declarations *

*CRANEL=1..NCRANEL*

*CRANER=NCRANEL+1..NCRANER+NCRANEL*

*end-declarations*

*res1:= compile("g", SUBMOD1 + ".mos") **res2:= compile("g", SUBMOD2 + ".mos") *

*forall(k in CRANEL) do **load(submod(k), SUBMOD1 + ".bim") **modid(getid(submod(k))):=k **run(submod(k), "Crane=" + k + ", CRANEL=" + NCRANEL + ",BAY="+HBAY + ",BLOCK="+BBLOCK)**end-do**forall(k in CRANER) do **load(submod(k), SUBMOD2 + ".bim") **modid(getid(submod(k))):=k **run(submod(k), "Crane=" + k + ", CRANER=" + NCRANER + ",BAY="+HBAY + ",BLOCK="+BBLOCK)**end-do*

But that does not seem to be the right way. How do I need to tackle such a problem?

Thanking you in advance!

Marie-Anne

There are 2 ways of implementing subproblems with Mosel:

* within a model, you can create subproblems of the type "mpproblem": these problems will be stated and solved sequentially

* problems stated via separate models (the option you have chosen) can be run either sequentially or in parallel (the latter is the case here)

What seems to be missing in the code extract shown with your question is the coordination of the concurrent (sub)models:

if you wish to retrieve results from the submodels, you need to "wait" for their termination.

You will find a set of small examples illustrating the coordination and comunication with submodels following this link:

FICO Xpress Examples Repository: Working with multiple models: submodels, coordination, communication, and parallelizati…

An example implementation of a branch-and-price algorithm that uses several concurrent subproblems for the individual pricing subproblems can be found at:

FICO Xpress Examples Repository: Branch-and-Price for the Generalized Assignment Problem

Several alternative implementations (eg, subproblems in a single model or in separate model files) of a column generation example with a single subproblem are available for this example:

FICO Xpress Examples Repository: Column generation for a cutting stock problem

A typical example of sequential solving of several subproblems in a single model is:

FICO Xpress Examples Repository: Benders decomposition