Hi! I would like to have some examples of defdelayedrows application in Xpress-Mosel in order to understand how it works.

Thank you in advance for any help.

Hi! I would like to have some examples of defdelayedrows application in Xpress-Mosel in order to understand how it works.

Thank you in advance for any help.

- 1 person found this helpful
In Mosel, delayed rows are defined in a similar way as model cuts: you state linear constraints as usual (they need to be assigned names to be able to refer to them) and then mark their specific type using 'defdelayedrows' or 'setmodcut' respectively.

These 2 examples show how to use model cuts: https://examples.xpress.fico.com/example.pl?id=mosel_book_5_7 and https://examples.xpress.fico.com/example.pl?id=mosel_book_5_5 .

In the latter example, if you wished to state delayed rows instead of model cuts you could replace this portion of code:

declarations

modcut: array(DEPOTS,CUST) of linctr

end-declarations

forall(d in DEPOTS, c in CUST) do

modcut(d,c):= DEM(c) * fflow(d,c) <= CAP(d) * build(d)

setmodcut(modcut(d,c))

end-do

by the following (NB: the constraints stated here really are cuts, this is just to show how to use the functionality):

declarations

DelayedCtr: array(DEPOTS,CUST) of linctr

end-declarations

forall(d in DEPOTS, c in CUST) do

DelayedCtr(d,c):= DEM(c) * fflow(d,c) <= CAP(d) * build(d)

end-do

defdelayedrows(union(d in DEPOTS, c in CUST) {DelayedCtr(d,c)})

Both, model cuts and delayed rows, are loaded into the Optimizer as a part of the problem matrix.

**Model cuts**must be "true" model cuts, in the sense that they are redundant at the optimal MIP solution. During presolve the model cuts are removed from the matrix and added to an internal cut pool. During the global search, the Optimizer will regularly check this cut pool for any violated model cuts and add those that cut off a node LP solution.**Delayed rows**are actual constraints that are required for stating the full problem, they must be satisfied for any integer solution. Any delayed rows will be removed from the matrix after presolve and added to a special pool. A delayed row will be added back into the active matrix only when it is violated by an integer solution found by the Optimizer.

In Mosel, delayed rows are defined in a similar way as model cuts: you state linear constraints as usual (they need to be assigned names to be able to refer to them) and then mark their specific type using 'defdelayedrows' or 'setmodcut' respectively.

These 2 examples show how to use model cuts: https://examples.xpress.fico.com/example.pl?id=mosel_book_5_7 and https://examples.xpress.fico.com/example.pl?id=mosel_book_5_5 .

In the latter example, if you wished to state delayed rows instead of model cuts you could replace this portion of code:

declarations

modcut: array(DEPOTS,CUST) of linctr

end-declarations

forall(d in DEPOTS, c in CUST) do

modcut(d,c):= DEM(c) * fflow(d,c) <= CAP(d) * build(d)

setmodcut(modcut(d,c))

end-do

by the following (NB: the constraints stated here really are cuts, this is just to show how to use the functionality):

declarations

DelayedCtr: array(DEPOTS,CUST) of linctr

end-declarations

forall(d in DEPOTS, c in CUST) do

DelayedCtr(d,c):= DEM(c) * fflow(d,c) <= CAP(d) * build(d)

end-do

defdelayedrows(union(d in DEPOTS, c in CUST) {DelayedCtr(d,c)})

Both, model cuts and delayed rows, are loaded into the Optimizer as a part of the problem matrix.

Model cutsmust be "true" model cuts, in the sense that they are redundant at the optimal MIP solution. During presolve the model cuts are removed from the matrix and added to an internal cut pool. During the global search, the Optimizer will regularly check this cut pool for any violated model cuts and add those that cut off a node LP solution.Delayed rowsare actual constraints that are required for stating the full problem, they must be satisfied for any integer solution. Any delayed rows will be removed from the matrix after presolve and added to a special pool. A delayed row will be added back into the active matrix only when it is violated by an integer solution found by the Optimizer.