Initializing help system before first use

mmrobust

Topics covered in this chapter:

The mmrobust module extends the Mosel language with new types for representing robust constraints and describe the associated uncertainty sets. To use this module the following line must be included in the header of the Mosel model file:

 uses 'mmrobust'

This is the reference manual of mmrobust. It is highly recommended to study the Xpress white paper on robust optimization found under docs/robust in the Xpress installation.

The first section presents the new functionality for the Mosel language provided by mmrobust, namely the new types uncertain, robustctr and uncertainctr and a set of subroutines that may be applied to objects of these types.

The following sections give detailed documentation of the subroutines (other than mathematical operators) defined by this module.

New functionality for the Mosel language

The problem type mpproblem.xprs.robust

This module exposes its functionality through an extension to the mpproblem.xprs problem type. As a consequence, all routines presented here are executed in the context of the current problem.

The type uncertain

An uncertain is a quantity whose value is not known, but carries a level of uncertainty. The type uncertain is used in the robust constraints of type robctr to express constraints that are subject to uncertainty, and in uncertainctr constraints that describe the set of values that the uncertain can take. The values of the uncertain quantity will take the possible worst case against the optimality and feasibility of the problem. An uncertain can be intuitively thought of as a variable that is not under our control, but which has a value defined by an opponent to be the worst with respect to the model.

It is important to note that an uncertain does not have a default lower bound of zero imposed by Mosel, in contrast to mpvars. This difference in default behavior is to reflect the most typical use cases.

An uncertain can be assigned a nominal value using the assignement operator :=. The working of the nominal value is discussed in the Xpress robust optimization white paper found under docs/robust in the Xpress installation.

The actual value of uncertains and robust constraints can be obtained after the solution of the robust problem through getsol and getact. The usage of getsol is extended as explained below.

If an uncertain u is used in a single robust constraint or only in the objective function, then getsol(u) returns one of the possible realizations of the uncertainty set that induced the optimal solution found by Mosel.

If the same uncertain is used in two robust constraints named RCon1 and RCon2 respectively, the optimal solution of the problem may imply that the uncertain has different values for RCon1 and RCon2. Then its value can be obtained for the two constraints via the command getsol(u,RCon1) and getsol(u,RCon2).

Finally, the left-hand side of a robust constraint (e.g. RCon1) can simply be obtained via the command getact(RCon1), whereas getsol(RCon1) returns the evaluation of left-hand side - right-hand side.

The type robustctr and its operators

The module mmrobust defines the type robustctr to represent robust constraints in the Mosel Language. It also defines the standard arithmetic operations that are required for working with objects of this type. By and large, these are the same operations as for linear expressions (type linctr of the Mosel language) with additionally the possibility to include uncertain terms (i.e. of type uncertain).

The type uncertainctr and its operators

An uncertainty constraint uncertainctr describes the possible values of the uncertain data, or in other words defines the feasible set of the uncertains. Intuitively, if we visualize the role of an uncertain as a value under the control of an opponent, then the set of uncertainctrs defines the limitations under which the opponent is operating when choosing the worst possible values in respect of the optimality and feasibility of the model.

Example: using mmrobust for solving a robust problem

Consider the following example

model BaseModel
uses "mmrobust";

declarations
 x, y, z : mpvar
end-declarations

 x + 2*y + 3*z <= 10

 maximize(x+y+z)

 writeln("x = ", getsol(x), "  y = ", getsol(y), "  z = ", getsol(z))

end-model

This problem will solve to "x = 10 y = 0 z = 0".

Let us now assume that we only know that the sum of the first two coefficients is 3, and we need a solution that is valid for all realizations within this assumption.

model RobustModel
uses "mmrobust";

declarations
 x, y, z : mpvar
 u, v : uncertain
end-declarations

 u*x + v*y + 3*z <= 10

 u+v <= 4

 setparam("xprs_verbose", true)
 maximize(x+y+z)

 writeln("x = ", getsol(x), "  y = ", getsol(y), "  z = ", getsol(z), "; u = ", getsol(u), "  v = ", getsol (v))

end-model

This problem will solve to "x = 2.5 y = 2.5 z = 0; u = 2 v = 2".

It is easy to check that any realization of the uncertains u and v will keep the solution vector feasible, and that it is optimal within this assumption.

© 2001-2025 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.