Introduction
This post is a bit of a mathematical diversion from the previous post on robust optimisation. To follow along with the derivation of the Bertsimas and Sim robustness model we’re going to need to optimise an LP minimisation programme which contains a second ’nested’ LP maximisation programme in one of its constraints.
It isn’t possible to solve such a programme directly so we will have to find a way to reformulate it. The reformulation itself uses the interesting ‘duality’ result for LPs and is, at least in my opinion, interesting enough to not simply quote from the paper. In the end I decided that it was bulky enough that instead of jamming it midway through a piece focussing on different definitions and implementations of ‘robustness’ it should go into its own short post.
Nested optimisation problems
Suppose you’re solving a minimisation problem which contains a constraint like this:
where are some coefficients possibly depending on , and is our decision variable.
We’re faced with a maximisation problem nested inside a constraint of a minimisation problem. This creates a non-convex structure that off-the-shelf LP solvers (gurobi) can’t optimise: We’re asking “what’s the worst-case value of this ‘inner’ maximisation problem?” while simultaneously trying to minimise the outer problem.
Let’s label the ‘inner’ problem (1):
The approach taken in [1], which I will follow here, is to use duality to convert the inner maximisation into a minimisation. If we can find a dual representation of this problem, we can replace the maximisation with a minimisation over the resulting dual variables. Since both the outer problem and the inner problem are now minimisations, we can combine them: instead of “minimise over , where each requires solving a separate optimisation over ”, we can simply “minimise over both and jointly”. The inner minimisation gets absorbed by treating as additional decision variables alongside . Proceeding step-by-step:
Step 1: Convert to Standard Form
To take the dual of (1), we first need to rewrite it in standard LP form: only equality constraints are allowed and all variables must be constrained to be non-negative. There we replace the ‘budget’ constraint with equality by introducing a a slack variable
and we replace each upper bound with a slack variable :
The constraints can be written compactly as if we collect all of our variables into a single vector:
and we take and . Only the variables appear in the objective, so the cost vector is simply .
Thus (1) is equivalent to
Step 2: Take the Dual
A maximisation LP in standard form and its dual are given by, respecitively:
Where the dual variable, , has dimension : maps to the original constraint and corresponds back to .
The dual objective is given by
Next we need to look at the dual constraints .
For columns corresponding to : Column of has a 1 in row and 1 in the last row, so we get for all , and for columns corresponding to : Column of the second block has 1 in row and 0 in the last row, so we have for all . Lastly, the column corresponding to results in .
Putting this together, we can write the dual problem as
Phew, we made it.
Step 3: Reformulate the Original Constraint
We started out with the following awkward constraint
By strong duality, the optimal value of the primal problem, (1), is equal to the optimal value of the dual problem, (2). So we can replace the max. with the min.:
Recall that the outer problem was also an optimisation, a minimisation over , so we can pull out the minimisation over and treat the as additional decision variables. This gives us an equivalent formulation that’s purely linear:
The nested maximisation has gone and we’ve replaced it with additional variables and a few extra linear constraints.
In the next part (the last of this mini-series), we’ll use this reformulation to follow along with the Bertsimas and Sim robust optimisation model derivation. Then we’ll implement it and compare the results to the Soyster model from part 1.