Value of the Stochastic Solution (VSS)

The Value of the Stochastic Solution measures how much is gained by modeling the uncertainty instead of collapsing it to a single “average” future and solving that deterministic problem. It compares two here-and-now (first-stage) decisions: the one from the full stochastic program, and the one from the mean-value problem (replace every random parameter by its expected value and solve the resulting deterministic model). VSS is the expected extra cost of using the mean-value decision once the real uncertainty shows up. A large VSS justifies building a stochastic model; a near-zero VSS says the deterministic shortcut was almost as good.

Note

Computing VSS does extra work. RP comes for free from the run and the mean-value solve is cheap, but EEV re-solves the recourse problem for every scenario once with the first stage fixed. Fixing the first stage decouples the scenarios and usually makes each solve easier than the original, so how much wall-clock this adds is hard to predict: for many problems it is a modest fraction of the run, but with very many scenarios or expensive recourse it can be significant. --vss is off by default.

The three numbers (minimization)

Write the two-stage program with first-stage vector \(x\), random data \(\xi\), and second-stage value function \(Q(x,\xi)\):

\[RP = \min_x \; \big\{\, c\cdot x + \mathbb{E}_\xi[\,Q(x,\xi)\,] \,\big\}.\]
  • RP — the Recourse Problem optimum: the here-and-now solution the run already computes. From an --EF run it is exact when the EF is solved to a zero gap — always the case for an LP — and otherwise the incumbent bracketed by the solver’s dual bound (see Exact vs. bracketed RP below). From a decomposition run it is the incumbent (with a bracket).

  • EV — the mean-value problem \(\min_x \{ c\cdot x + Q(x,\bar\xi)\}\) with \(\bar\xi\) the average of the data over the scenario set. Its first-stage solution is \(\bar x\).

  • EEV — the Expected result of the EV solution: pin the first stage at \(\bar x\) and evaluate honestly across every scenario, \(EEV = c\cdot\bar x + \mathbb{E}_\xi[\,Q(\bar x,\xi)\,]\).

Then

\[VSS = EEV - RP \;\; (\ge 0 \text{ at optimality}).\]

For a maximization model the sign flips: \(VSS = RP - EEV\) (again \(\ge 0\) at optimality). mpi-sppy reads the model sense and reports VSS as the “cost of using the average.”

Note

The \(\ge 0\) guarantee holds when RP is the true optimum. When RP is only an incumbent — a MIP left with a nonzero gap, or a decomposition run stopped before convergence — the evaluated mean-value policy can beat that incumbent, and the reported VSS can come out slightly negative. That is a statement about the run, not about the model: it means RP was not solved tightly enough for the VSS to be resolved. mpi-sppy reports the signed value as computed rather than clamping it at zero, and prints the VSS bracket alongside it whenever the run left a gap, so the uncertainty is visible. A negative point value with a bracket that straddles zero is the signal to tighten the gap and re-run.

VSS is not EVPI (Expected Value of Perfect Information, \(RP - WS\)), which measures the value of knowing the future rather than modeling that you do not. --vss reports VSS only.

Usage

Add --vss to a generic_cylinders run. The scenario module must define average_scenario_creator (the same contract used by Jensen’s Bound as potential starting bound); it builds the mean-value scenario whose first-stage solution VSS evaluates. The report is printed at the end and does not change the solution.

cd examples/farmer
python ../../mpisppy/generic_cylinders.py --module-name farmer \
    --num-scens 3 --EF --EF-solver-name gurobi --solver-name gurobi --vss

produces:

================= VSS report =================
  RP  (stochastic solution, here-and-now):        -108390   [EF, exact]
  EV  (mean-value problem objective)     :        -118600
  EEV (EV first stage over scenarios)    :        -107240
  VSS = EEV - RP (sense=min)             :           1150   (1.06% of |RP|)
=============================================

Solver options and mipgap

The EV and EEV solves reuse the run’s solver and solver options so that all three numbers are solved the same way. After an --EF run they use --EF-solver-options (falling back to --solver-options if the former is unset); after a decomposition run they use --solver-options. Any mipgap in that option string therefore applies to the VSS solves too.

Because VSS = EEV - RP is a difference of two optimized values, the mipgap matters: if you solve with a loose gap, a small VSS can be dominated by that gap and is not trustworthy. When VSS is small relative to RP, solve tightly, for example --EF-solver-options "mipgap=1e-7". (VSS inherits only the solver-options string; it does not read the separate --EF-mipgap / --*-iter*-mipgap knobs or a --*-solver-options-file.)

Exact vs. bracketed RP

From an --EF run that reaches a zero gap, RP is exact. But an EF MIP solved to a nonzero mipgap returns only an incumbent, known to lie between the solver’s dual bound and that incumbent — so RP is then reported the same way as the decomposition case: a conservative point value (the incumbent) plus a bracket, with the label naming the gap:

RP  (stochastic solution, here-and-now):        -108389   [EF incumbent, gap=0.001]
    optimality bracket [outer, inner]  : [-108508, -108389]
...
VSS = EEV - RP (sense=min)             :        1149.33   (1.06% of |RP|)
    VSS bracket from RP bracket        : [1149.33, 1268.39]

A decomposition (cylinders) run that did not close its optimality gap brackets RP the same way (labelled [decomposition incumbent]). In both cases the width of the VSS bracket is exactly the unclosed optimality gap; solve the EF to a tighter mipgap (or an LP) for a sharper VSS. When the solver reports no dual bound, RP is labelled [EF, exact] and no bracket is shown.

Infeasible mean-value solution

If the mean-value first stage \(\bar x\) is infeasible when fixed in some scenario (the model lacks relatively complete recourse), then that scenario’s recourse cost is \(+\infty\), so EEV and VSS are +inf. This is a meaningful result — the deterministic shortcut is unusable — and the report names the offending scenarios. See Per-scenario-feasible candidate xhat for the related “fix a candidate, repair if needed” concern; VSS deliberately does not repair \(\bar x\), since a repaired point would no longer be the mean-value decision.

Limitations

This version is two-stage only and cannot be combined with proper bundles, ADMM, or --cvar (each rewrites the objective or the scenario/first-stage structure, so RP and EEV would no longer be comparable). --vss fails fast at setup if the model or configuration is unsupported, so a long run is never wasted.