# Solving Robust Optimization Models

Solving robust optimization models

After you have specified all uncertain parameters, random parameters, chance constraints and adjustable variables that specify your robust optimization model, your original mathematical program can now be solved as a robust optimization model. It is also still possible to solve it as a deterministic model by just calling the `SOLVE` statement (see also The SOLVE Statement).

Generate robust counterpart

To solve a robust optimization model for a `MathematicalProgram` MP, the first step is to generate its robust counterpart. This can be accomplished by calling the GMP function

• `GenerateRobustCounterpart`(MP,UncertainParameters,UncertaintyConstraints[,Name])

The function returns an element into the set `AllGeneratedMathematicalPrograms`, i.e., the generated mathematical program representing the robust counterpart of the given robust optimization model.

Specifying uncertain data

Through the UncertainParameters and UncertaintyConstraints arguments you can specify the collection of uncertain and random parameters, as well as the uncertainty constraints that you want to take into account when generating the robust counterpart. Together, these completely determine the uncertain data which AIMMS will use to translate the uncertain matrix coefficients, chance constraints and adjustable variables into the generated mathematical program representing the robust counterpart.

Name argument

With the optional Name argument you can explicitly specify a name for the generated mathematical program. If you do not choose a name, AIMMS will use the name of the underlying `MathematicalProgram` as the name of the generated mathematical program as well. Please note, that AIMMS will also use this name as the default name for solving the deterministic model. Therefore, if you do not want the generated mathematical program of the deterministic model to be deleted, then you have to choose a non-default name.

Solving the robust counterpart

You can solve the generated mathematical program gmp representing the robust counterpart by calling the regular GMP procedure

The `GMP::Instance::Solve` method is discussed in full detail in Managing Generated Mathematical Program Instances. Alternatively, you can use any of the other available functions available to solve generated mathematical programs discussed in Implementing Advanced Algorithms for Mathematical Programs. Note that AIMMS will not allow you to use the GMP modification functions on any `gmp` generated by `GenerateRobustCounterpart`.

The resulting solution

The solution resulting from solving the robust counterpart will satisfy all non-chance constraints in your model for all realizations of the uncertain parameters that you passed to the `GenerateRobustCounterPart` function, and will satisfy all chance constraints with the given probabilities and approximations, given the random parameters taken into account.