2. Two-stage stochastic programming#
2.1. What is a two-stage stochastic programming (2SSP) model?#
Let us define more formally the structure behind the farmer’s problem decision-making. That is, let
\(x\) represent the first-stage decisions, i.e., those that are made before the uncertainty is revealed and as such, cannot be scenario-dependent;
\(y\) be the second-stage decisions, which have a corrective nature to them. These are our recourse decisions;
\(\xi \in \Xi\) represent the random variable with support \(\Xi\);
\(\brackets{q(\xi), T(\xi), W(\xi), h(\xi)}\) be the random vector containing all the data that is dependent on the random variable \(\xi\).
Definition of recourse
The Brittanica dictionary’s definition of recourse is: “an opportunity or choice to use or do something in order to deal with a problem or situation”.
With the above, we can formulate our two-stage stochastic programming (2SSP) model as
where \(\mathcal{Q}(x) = \mathbb{E}_\xi\brackets{Q(x, \xi)}\) and
Let us take a moment to appreciate the structure of (2.1). First notice how it has two optimisation problems nested within each other. It considers a set of decisions \(x\) and associated constraint set \(X = \braces{x : Ax = b, x \ge 0}\) that are made to also minimise the value of \(\mathcal{Q}(x)\), which is in itself an expected value among multiple optimisation problems. In turn, \(\mathcal{Q}(x)\) is an optimisation problem where, given the decision \(x\) and a value for \(\xi\), we optimise \(Q(x,\xi)\).
In essence, this structure encodes the following decision process
in which \(x\) is chosen to minimise the expected value \(\mathbb{E}_\xi\brackets{Q(x, \xi)}\) assuming a known probability distribution and that \(y\) is chosen to minimise \(Q(x, \xi)\) for each realisation of \(\xi \in \Xi\).
We can combine (2.3) and (2.2) into a single optimisation problem
(Semi-)infinite programming problems
Problems that have an infinite number of variables or constraints. If the problem has either one, but not both, it becomes a semi-infinite programming problem.
2.2. Tractable 2SSPs#
There are two complicating factors that prevent the solution of (2.3):
The evaluation of \(\mathbb{E}_\xi\brackets{Q(x, \xi)}\), which requires calculating an \(n\)-dimensional integral, assuming \(x \in \reals^n\);
Dealing with an infinite programming problem, as \(\forall \xi \in \Xi\) spans an infinite number of variables and constraints.
The standard way to address both issues in stochastic programming is to rely on the notion of discretisation. That is, we assume that \(\Xi\) is a finite and discrete support. This essentially means that we assume that \(\Xi\) can be characterised by the set \(S = \braces{1, \dots, |\Xi|}\), where each \(s \in S\) is called a scenario.
How to generate scenarios
Two main ideas:
assuming that the random variable \(\xi\) can be characterised by a discrete set of realisations \(\xi_s\), \(s \in S\), each with probability \(P_s\);
assuming that \(\xi \in \Xi\) can be sampled via, e.g., Monte Carlo sampling.
Both ideas will be discussed in more detail in the later sections.
Assuming that we are given a set of realisations (or scenarios) \(\xi_s\), \(\forall s \in S\), means that we are left with a discrete and finite set of parameters, i.e.,
With that scenario-based representation of the uncertainty, we are ready to state the so-called deterministic equivalent formulation of (2.3), which is given by
Linearity assumption in stochastic programming
Throughout our developments, we have an underlying assumption of linearity in our stochastic programming models. Clearly, that does not need to be the case and is as such to simplify the presentation.
Notice how the assumption of having a discrete set of scenarios immediately solves the two issues discussed above, that is:
the expected value becomes a weighted sum, which is trivial to evaluate. In other words, being \(P_s\) the probability associated with scenario \(s\) (\(P_s = P(\xi = \xi_s)\)), we have that \(\mathbb{E}_\xi\brackets{Q(x, \xi)} = \sum_{s\in S} P_s q_s^\top y_s\).
the number of variables and constraints that depend on \(\xi\) are now finite, albeit proportional to \(|\Xi|\)
Example 2.1 (The farmers problem revisited)
In the farmer’s problem, we assumed that \(S = \braces{1,2,3}\). Also, not all parameters of the model were assumed to be random, i.e., we had that
Thus, we had that \(Q(x,\xi) \equiv Q_s(x)\) was given by