Two-stage RO: part 1
Author: Liu Xinglu, PhD candidate at Tsinghua University
2021.09.28
Special thanks to Teacher Zeng Bo for answering my questions very patiently. Your answers are very important to me.
This article provides a very detailed and complete introduction to an accurate algorithm for solving Two-stage Robust Optimization Model: Column and Constraint Generation Algorithm. This algorithm was first proposed by Zeng Bo and Zhao Long in 2013. The related paper was published in the journal "Operations Research Letters" and the title of the paper is "Solving two-stage robust optimization problems using a column-and-constraint generation method". This article provides a very detailed interpretation of the paper, including:
- Robust optimization problems are classified;
- The two-stage robust optimization model is analyzed in detail;
- The Bender-dual algorithm is explained;
- A very detailed interpretation, complete derivation and complete explanation of the Column-and-constraint generation method;
- The cases in the paper are derived in considerable detail;
- Complete code reproduction of the Column-and-constraint generation method (implemented by calling Gurobi in Python).
Two-stage robust optimization problem (Two-stage Robust Optimization)
鲁棒优化
It is a type of mathematical programming problem that considers parameter uncertainty, and is a relatively high-level method in operations research. In recent years, 鲁棒优化
research on it has become increasingly popular. Common robust optimization problems include 基本的鲁棒优化
, 多阶段鲁棒优化
, 分布式鲁棒优化
etc.
鲁棒优化
worst case
It is designed to deal with the challenge of parameter uncertainty in optimization problems, and is committed to optimizing the solution under the worst case ( ), or the solution under the worst parameter distribution ( 对应分布式鲁棒优化
), so that 最终得到的解具有非常强的抵抗不确定性或者风险的能力
.
There is another method for dealing with optimization problems with uncertain parameters, called 随机规划
. For the difference between the two, see previous tweets.
两阶段鲁棒优化
The problem is a special case of multi-stage robust optimization ( multi-stage robust optimization
). In a two-stage robust optimization problem, it generally contains two different levels of decision variables, also known as the first-stage decision ( first-stage decision
) and the second-stage decision ( second-stage decision
). For example: a joint optimization problem, considering at the same time
战略层
decisions and战术层
decisions;战术层
decisions and操作层
decisions- …
A typical example is 选址-配送规划问题
. 选址决策
It is a strategic-level decision-making 配送
problem and can be regarded as a tactical-level or operational-level decision-making.
The two-stage robust optimization problem is described as follows:
- The parameters relevant to the first stage of decision making are
确定的
, and the first stage of decision making requires首先做出
;- There are some relevant parameters for the decision-making in the second stage
不确定的
. The decision-making in the second stage needs to be made after the decision-making in the first stage is determined and the parameters of the second stage are determined揭示
before making the corresponding second-stage decision.- The goals of the two-stage robust optimization are:
对两阶段决策进行联合优化,同时考虑第二阶段参数的不确定性。也就是优化在第二阶段参数取到最坏情况下的两个阶段决策对应的总的目标值。
Below we use standard mathematical language to describe the two-stage robust optimization problem. The mathematical model of the two-stage robust optimization problem is as follows (referenced from literature [1])
min yc T y + max u ∈ U min x ∈ F ( y , u ) b T x ( 1 ) s t A y ⩾ d , ( 2 ) G x ⩾ h − E y − M u , u ∈ U ( 3 ) S y ⊆ R + n ( 4 ) S x ⊆ R + m ( 5 ) \begin{aligned} \min_ {\mathbf{y}} \quad & \mathbf{c^Ty} +\max_{u \in \mathcal{U}} \min_{ \mathbf{x}\in {\mathbf{F}(\mathbf{ y}, u )}} \mathbf{b}^T \mathbf{x} && (1) \\ st\quad & \mathbf{Ay \geqslant d}, && (2) \\ & \mathbf{Gx\ geqslant h - Ey - M}u , \quad u \in \mathcal{U} && (3) \\ & \mathbf{S_y} \subset \mathbb{R}_{+}^{n} && (4) \\ & \mathbf{S_x} \subset \mathbb{R}_{+}^{m} && (5) \end{aligned}ymins.t.cTy+u∈Umaxx∈F(y,u)minbTxA y⩾d,Gx⩾h−Ey−M u ,u∈USy⊆R+nSx⊆R+m(1)(2)(3)(4)(5)
in:
- y \mathbf{y}y is the decision variable in the first stage;
- x \mathbf{x} x is the decision variable in the second stage;
- c \mathbf{c}c is the parameter related to the decision variable in the first stage, which is
确定的
; - u u u is the parameter related to the decision variable in the second stage,
不确定的
and the value range of its uncertain parameter is determined by the uncertainty setU \mathcal{U}U characterization; see previous tweets for specific examples; - In the objective function, the first term min y c T y \min_{\mathbf{y}} \,\mathbf{c^Ty}minycT yis the objective function corresponding to the first stage decision-making.
该部分决策需要首先确定
; - As a function of this, let max u ∈ U min x ∈ F ( y , u ) b T x \max_{u \in \mathcal{U}} \min_{ \mathbf{x}\in {\mathbf {F}(\mathbf{y}, u )}} \mathbf{b}^T \mathbf{x}maxu∈Uminx∈F(y,u)bT xis the objective function corresponding to the second stage decision-making. This part of the decision needs to be made after the first stage decision is determined; this part of the objective function is designed to find
worst case
; that is, in the worst case, the target value of the second stage; - The entire objective function is to
优化在最坏情况下的总目标函数
make the worst case the best, so that the solution has very good robustness. - Constraint (2) is only relevant to the decision-making in the first stage;
- Constraint (3) is related to the decision-making in the first stage and the second stage, and contains the uncertain parameter uuu。
The above is a brief introduction to two-stage robust optimization. We will give a more popular interpretation of mathematical symbols that are currently relatively obscure.
- Note that if uuThere are very few value possibilities for u , so we can exhaustively enumerateuuThe value of u , explicitly convert each possibleuuThe constraints corresponding to u are added to the model, and then the two-stage robust optimization model is equivalent to a one-stage mathematical programming model that can be directly solved, so that the purpose of directly solving the above Two-stage robust optimization model can be achieved. Because the worst case scenario must correspond to a certain kind ofuuThe value of u , and we have exhausted alluuThe value of u is possible and is explicitly written into the model, so the original two-stage robust optimization model can be solved directly. But usually,uuu
的取值非常多(组合数级别或者无穷多)
,穷举uuu is often inefficient or even infeasible, so some other methods need to be used to solve the Two-stage robust optimization model. The Column and Constraint Generation algorithm to be introduced in this article is one of them (in addition, the Benders-dual algorithm mentioned in the literature [1] is also one).
Detailed interpretation of the two-stage robust optimization problem
Reference [1] mentioned:
The calculation of Two-stage RO is very difficult, and even a simple Two-stage RO problem may be NP-Hard. To overcome the computational burden, two solution strategies are currently popular. The first is to use approximation algorithms , which assume that the second-stage decision is a simple function of uncertainty, such as an affine function. The second type of algorithm uses the Benders decomposition method to find the exact solution, that is, using the dual solution of the second-stage decision-making problem to gradually construct the value function of the first-stage decision-making. Therefore, we call them Benders-dual cutting plane algorithms .
The description of the two-stage robust optimization problem model in literature [1] is as follows:
The problem discussed in this paper is based on the following assumptions:
- Decision variable type assumptions:
first-stage
andsecond-stage
are linear optimization - Parameter uncertainty (
uncertainty
): is either a finite discrete set or a polyhedron. In other words, change the uncertainty set considered in the paper to be一个有限的离散集合
or一个多面体集合
, such asa finite discrete set
: The possible values of the uncertain parameters are a limited optional set, for example: u ∈ U = { scenario 1 , scenario 2 , scenario 3 } u \in \mathcal{U} = \{ \text{scenario}_1, \ text{scenario}_2, \text{scenario}_3\}u∈U={ scenario1,scenario2,scenario3}.a polyhedron
: The range of possible values of the uncertain parameter is a polyhedron, for example u ∈ U = { 1 ⩽ u 1 ⩽ 2 , 3 ⩽ u 2 ⩽ 5 } u \in \mathcal{U} = \{ 1 \leqslant u_1 \ leqslant 2, 3 \leqslant u_2 \leqslant 5\}u∈U={ 1⩽u1⩽2,3⩽u2⩽5 } , the uncertain set is a rectangle, which is generally called academically盒子不确定集(box uncertainty set)
.
According to the figure above, in two-stage robust optimization, the decision in the first stage needs to be made first, and its optimization direction is min \minmin。
But the decision-making in the second stage is a two-level problem ( bi-level
). Specifically, the symbol of the second term of the objective function is
max u ∈ U min x ∈ F ( y , u ) b T x \max_{u \in \mathcal{U}} \min_{ \mathbf{x} \in {\mathbf{F}(\mathbf{y}, u )}} \mathbf{b}^T \mathbf{x}u∈Umaxx∈F(y,u)minbThe symbol T x
needs to be explained in detail:
- x ∈ F ( y , u ) \mathbf{x}\in {\mathbf{F}(\mathbf{y}, u )}x∈F(y,u ) means: indicates given uncertain parameteruuA value of u
first-stage
, and the given decision variabley \mathbf{y}For the value of y , we decidex \mathbf{x}x,使得 b T x \mathbf{b}^T \mathbf{x} bLet T x
be aligned with the function F ( y , u ) = { x ∈ S x : G x ⩾ h − E y − M u } \begin{aligned} \mathbf{F}(\mathbf{y}, u ) = \{ \mathbf{x} \in \mathbf{S}_{\mathbf{x}} : \mathbf{Gx \geqslant h - Ey - M}u \} \end{aligned}F(y,u)={ x∈Sx:Gx⩾h−Ey−M u }
with S y ⊆ R + n \mathbf{S_y} \subseteq \mathbb{R}_{+}^{n} Sy⊆R+n and S x ⊆ R + m \mathbf{S_x} \subseteq \mathbb{R}_{+}^{m} Sx⊆R+m。
State S y ⊆ R + n \mathbf{S_y} \subset \mathbb{R}_{+}^{n}Sy⊆R+n and S x ⊆ R + m \mathbf{S_x} \subseteq \mathbb{R}_{+}^{m} Sx⊆R+mThat is, x \mathbf{x}x和y \mathbf{y}y are n × 1 n\times 1respectivelyn×1 dimension andm × 1 m\times 1m×It is just a 1- dimensional non-negative continuous decision variable.
We expand the model in the picture above and write it into a form that is easier to understand:
min yc T y + max u ∈ U min x ∈ F ( y , u ) b T x ( 1 ) s t A y ⩾ d , ( 2 ) G x ⩾ h − E y − M u , u ∈ U ( 3 ) S y ⊆ R + n ( 4 ) S x ⊆ R + m ( 5 ) \begin{aligned} \min_ {\mathbf{y}} \quad & \mathbf{c^Ty} +\max_{u \in \mathcal{U}} \min_{ \mathbf{x}\in {\mathbf{F}(\mathbf{ y}, u )}} \mathbf{b}^T \mathbf{x} && (1) \\ st\quad & \mathbf{Ay \geqslant d}, && (2) \\ & \mathbf{Gx\ geqslant h - Ey - M}u , \quad u \in \mathcal{U} && (3) \\ & \mathbf{S_y} \subset \mathbb{R}_{+}^{n} && (4) \\ & \mathbf{S_x} \subset \mathbb{R}_{+}^{m} && (5) \end{aligned}ymins.t.cTy+u∈Umaxx∈F(y,u)minbTxA y⩾d,Gx⩾h−Ey−M u ,u∈USy⊆R+nSx⊆R+m(1)(2)(3)(4)(5)
However, in the screenshot of the paper y ∈ S y \mathbf{y \in S_y}y∈Sy, which is equivalent to y \mathbf{y}y is a feasible solution of the following model
min yc T y + max u ∈ U min x ∈ F ( y , u ) b T xs t A y ⩾ d , S y ⊆ R + n \begin {aligned} \min_{\mathbf{y}} \quad & \mathbf{c^Ty} +\max_{u \in \mathcal{U}} \min_ { \mathbf{x}\in {\mathbf{F}(\mathbf{y}, u )}} \mathbf{b}^T \mathbf{x} \\ st\quad & \mathbf{Ay \geqslant d }, \\ & \mathbf{S_y} \subset \mathbb{R}_{+}^{n} \end{aligned}ymins.t.cTy+u∈Umaxx∈F(y,u)minbTxA y⩾d,Sy⊆R+n
Among them u , xu, \mathbf{x}u,x is a given value.
The above-mentioned Two-stage Robust Optimization model generally cannot be solved by directly calling the optimization solver, and a corresponding algorithm needs to be designed to solve it. The algorithm for solving this model is introduced below.
Two-stage RO和Benders-dual cutting plane method
Similar to using the standard Benders Decomposition algorithm to solve deterministic problems, Two-stage RO can also be solved using the Benders Decomposition algorithm. This algorithm is called Benders-dual cutting plane method in the literature.
This article only gives a brief introduction to the Benders-dual cutting plane method. In fact, the editor has already written the complete notes and code of Benders-dual cutting plane method, but I just want to save it for later, so please look forward to it!
Solving the Two-stage RO problem using the Benders-dual cutting plane method can be compared to solving the deterministic problem using Benders Decomposition. We can break down Two-stage RO into:
- A master problem (Master Problem), mainly including the first stage decision y \mathbf{y}y and only followed byy \mathbf{y}Constraints related to y , the cut returned by the sub-problem, and the auxiliary variableeta \etaη (similar to qqin Benders Decomposition algorithmq);
- A subproblem, mainly including the second stage decision x \mathbf{x}x and uncertain variableuuu , aims to give a bound on the value of the second-stage objective function (similar to the standard Benders Decomposition algorithm).
The Benders-dual cutting plane method 初始主问题
is similar to the Benders Decomposition algorithm and is
min yc T y + η ( 1 ) s t A y ⩾ d , ( 2 ) S y ⊆ R + n , ( 3 ) η ⩾ 0. ( 4 ) \begin{aligned} \min_{\mathbf{y}} \quad & \mathbf{c^Ty} + \eta && (1) \\ st\quad & \mathbf{Ay \geqslant d}, && (2) \\ & \mathbf{S_y} \subset \mathbb{R}_{+}^{n}, && (3) \\ &\eta \geqslant 0. && (4) \end{aligned}ymins.t.cTy+theA y⩾d,Sy⊆R+n,the⩾0.(1)(2)(3)(4)
The original main issue did not have any Benders cut added.
Let's roughly derive the cutting plane in the Benders-dual cutting plane method. The first second-stage
part to look at is the
max u ∈ U min x ∈ F ( y , u ) b T xs t G x ⩾ h − E y − M u , u ∈ US x ⊆ R + m \begin{aligned} \max_{u \in \mathcal{U}} \min_{\mathbf{x}\in {\mathbf{ F}(\mathbf{y}, u )}} \quad & \mathbf{b}^T \mathbf{x} \\ st\quad& \mathbf{Gx \geqslant h - Ey - M}u , \qquad u \in \mathcal{U} \\ & \mathbf{S_x} \subset \mathbb{R}_{+}^{m}\end{aligned}u∈Umaxx∈F(y,u)mins.t.bTxGx⩾h−Ey−M u ,u∈USx⊆R+m
This is how the original text describes it
Consider the case where the second-stage decision problem is a linear programming (LP) problem in x \mathbf{x} x. We first take the relatively complete recourse assumption that this LP is feasible for any given y \mathbf{y} y and u u the _ Letπ \piπ be its dual variables. Then, we obtain its dual problem, which is a maximization problem and can be merged with the maximization over u u u. As a result, we have the following problem, which yields the subproblem in the Benders-dual method.
Since in the above formula, the outer layer is max u ∈ U \max_{u \in \mathcal{U}}maxu∈U, the outer decision variable is the uncertain variable uuu , so for the inner layer,min x ∈ F ( y , u ) \min_{ \mathbf{x}\in {\mathbf{F}(\mathbf{y}, u )}}minx∈F(y,u)In terms of y \mathbf{y}y和uuu are all known (given
), that is,inner level
the model of is actuallygiven
uuu ,given
y \mathbf{y}y,
min x ∈ F ( y ˉ , u ˉ ) b T xs t G x ⩾ h − E y ˉ − M u ˉ , → π S x ⊆ R + m \begin{aligned} \min_{ \mathbf{x}\in {\mathbf{F}(\mathbf{\bar{y }}, \bar{u} )}} \quad & \mathbf{b}^T \mathbf{x} \\st\quad& \mathbf{Gx \geqslant h - E\bar{y} - M}\bar {u} , \qquad \rightarrow \mathbf{\pi} \\ & \mathbf{S_x} \subset \mathbb{R}_{+}^{m} \end{aligned}x∈F(yˉ,uˉ)mins.t.bTxGx⩾h−Eyˉ−Muˉ,→PiSx⊆R+m
where y ˉ \mathbf{\bar{y}}yˉisfirst-stage
the solution obtained by solving the model, and u ˉ \bar{u}uˉ isthe value of the uncertain quantity that has been fixed insecond-stage
.outer-level
In addition,π \mathbf{\pi}π is a column vector, not a scalar. Therefore,h − E y ˉ − M u ˉ h - E\bar{y} - \mathbf{M}\bar{u}h−Eyˉ−Muˉ is a known constant column vector and is the right-hand constant term of the constraint.
Since the above inner level
model is a linear programming, we directly write the dual problem of the above model as
max π ( h − E y ˉ − M u ˉ ) T π s t GT π ⩽ b , π ⩾ 0. \begin{aligned} \max_{ \pi} \quad & (\mathbf{h - E\bar{y} - M}\bar{u} )^T \pi \\ st\quad& \mathbf{G^T \pi \leqslant b} , \\ & \pi \geqslant \mathbf{0}. \end{aligned}Pimaxs.t.(h−Eyˉ−Muˉ)T πGT π⩽b,Pi⩾0.
Note, π \mathbf{\pi}π is a column vector, not a scalar. and0 \mathbf{0}0 is a column vector whose elements are all zeros.
If we write the models of and second-stage
together , max max \max \,\, \maxouter-level
inner level
maxmax is equivalent tomax \maxmax . So webi-level
transformed the second-stage (double-layer) optimization model into a single-layer optimization model, that is,
max u max π ( h − E y ˉ − M u ) T π s t GT π ⩽ b , π ⩾ 0 u ∈ U \begin{aligned} \max_{u} \max_{ \pi} \quad & (\mathbf{h - E\bar{y} - M}u )^T \pi \\ st\quad& \mathbf{G^ T \pi \leqslant b} , \\ & \pi \geqslant \mathbf{0} \\ & u \in \mathcal{U}. \end{aligned}umaxPimaxs.t.(h−Eyˉ−m u )T πGT π⩽b,Pi⩾0u∈U.
Equivalent to
max π , u ( h − E y ˉ − M u ) T π s t GT π ⩽ b , π ⩾ 0 u ∈ U \begin{aligned} \max_{ \pi, u} \quad & (\mathbf{h - E\bar{y} - M}u )^T \pi \\ st\quad& \mathbf{G^T \pi \leqslant b} , \\ & \pi \geqslant \mathbf{0} \\ & u \in \mathcal{U}. \end{aligned}p , umaxs.t.(h−Eyˉ−m u )T πGT π⩽b,Pi⩾0u∈U.
- Note that since max max \max \,\, \maxmaxmax is equivalent tomax \maxmax , so
outer-level
the uncertain variableuuu is also included in the equivalent one-stage model. wherey ˉ \mathbf{\bar{y}}yˉis the value of fix obtained from the first stage.
Since in the above model, y ˉ \mathbf{\bar{y}}yˉhas been fixed, so ( h − E y ˉ − M u ) T π (\mathbf{h - E\bar{y} - M}u )^T \pi(h−Eyˉ−m u )T πis最优解中第二阶段的目标函数提供了一个下界
.
关事( h − E y ˉ − M u ) T π (\mathbf{h − E\bar{y} − M}u )^T \pi(h−Eyˉ−m u )What is T πfor
最优解中第二阶段的目标函数提供了一个下界
? Because, ify \mathbf{y}and in the case ofmax π , u ( h − E y − M u ) T π ⩾ max π , u ( h − E y ˉ − M u ) T π \max_{ \pi, u} \, (\mathbf{h - Ey - M}u )^T \pi \geqslant \max_{ \pi, u} \, (\mathbf{h - E\bar{y} - M}u )^T \pimaxp , u(h−Ey−m u )T π⩾maxp , u(h−Eyˉ−m u )T πmust be true, therefore( h − E y ˉ − M u ) T π (\mathbf{h - E\bar{y} - M}u )^T \pi(h−Eyˉ−m u )T πis为第二阶段的目标函数提供了一个下界
.
We briefly write the above model as
SP 1 : Q ( y ) = max π , u { ( h − E y ˉ − M u ) T π : GT π ⩽ b , u ∈ U , π ⩾ 0. } \begin{aligned} \mathbf{SP_1 }: \mathcal{Q}(\mathbf{y}) = \max_{ \pi, u} \{ (\mathbf{h - E\bar{y} - M}u )^T \pi : \mathbf{ G^T \pi \leqslant b} ,u \in \mathcal{U}, \pi \geqslant \mathbf{0}.\} \end{aligned}SP1:Q(y)=p , umax{ (h−Eyˉ−m u )T π:GT π⩽b,u∈U,Pi⩾0.}
This is equivalent to writing the above mathematical programming model into a functional form. It is actually equivalent, but it is just another simple and space-saving way of writing. This part, also known as yesrecourse problem
, can be understood as the decision-making in the first stage is determined, and in the second stage, when the uncertain parameters are revealed, we make the decision-making in the second stage to pursue the entire problem and settle accounts after the fall.
Wrote the sub-problem model SP 1 \mathbf{SP_1}SP1, then the next important work is of course: 求解
SP 1 \mathbf{SP_1}SP1。
SP 1 \mathbf{SP_1}SP1How to solve it? :
Note that SP 1 \mathbf{SP_1}SP1is a bilinear optimization problem (because u ⋅ π u\cdot \piu⋅π is a quadratic term, and both are decision variables). According to the references in document [1], it can be seen that:
- SP 1 \mathbf{SP_1}
启发式算法
can be solved with someSP1; This method does not necessarily result in SP 1 \mathbf{SP_1}SP1The optimal solution, so the convergence speed of the algorithm may be slower; - Additionally, if U \mathcal{U}U
具有特殊的结构,可以构造精确性算法进行精确求解
; comparison, as resultuuu is a 0-1 variable, which can be equivalently linearized and turned into MIP for solution; - Of course, according to the author's experience,
还可以使用Gurobi,COPT等求解器来求解
SP 1 \mathbf{SP_1}SP1; - Finally, you can also use the method introduced in literature [1]:
使用KKT条件来求解
SP 1 \mathbf{SP_1}SP1. This tweet also uses KKT conditions to solve SP 1 \mathbf{SP_1}SP1, see the super detailed introduction below;
To sum up, there are roughly four methods that can be used to solve SP 1 \mathbf{SP_1}SP1:
启发式算法
- U \mathcal{U} U
具有特殊的结构,可以构造精确性算法进行精确求解
; 使用Gurobi,COPT等求解器来求解
;使用KKT条件来求解
。
This is how the original text describes it
Note that the resulting problem in (2) is a bilinear optimization problem. Several solution strategies have been developed, either in a heuristic fashion or for instances with specially-structured U \mathcal{U} U.
Solved SP 1 \mathbf{SP_1}SP1After that, what's the use?
the answer is:为主问题提供割平面,从而改进全局界限,改进当前解。
Assume that in the Benders-dual algorithm, for a given kkthyk ∗ \mathbf{y}_k^{*}obtained in the first stage (Master Problem) of k -step iterationyk∗, we can all get a corresponding Q ( yk ∗ ) \mathcal{Q}(\mathbf{y}_k^{*})Q(yk∗) second-stage solution( uk ∗ , π k ∗ ) (u_k^*, \pi_k^*)(uk∗,Pik∗) , we can generate a cutting plane of the following form:
- 下载下载以介绍过,max π , u ( h − E y ˉ − M u ) T π \max_{ \pi, u} \, (\mathbf{h - E\bar{y} - M}u )^ T \pimaxp , u(h−Eyˉ−m u )T πprovides a lower bound for the value of the objective function in the second stage of the optimal solution)
Therefore, the cutting plane is of the form:
η ⩾ ( h − E y − M uk ∗ ) T π k ∗ \begin{aligned} \eta \geqslant \mathbf{(h - Ey - M}u_k^* )^T \pi_k^* \end{aligned}the⩾(h−Ey−M uk∗)T πk∗
Among them, η \etaeta represents the value of the objective function in the second stage of the optimal solution. This cutting plane can actually be regarded as Benders decompositionoptimality cut
.Cut 5
(For a more intuitive understanding, please refer to the last sumin our previous tweets explaining Benders decompositionCut 7
)
This cutting plane can be added to the main problem, and the main problem changes to
MP 1 : min y , η c T y + η s t A y ⩾ d η ⩾ ( h − E y − M ul ∗ ) T π l ∗ , ∀ l ⩽ ky ∈ S y , η ∈ R \begin{aligned} \mathbf{MP_1}: \quad &\min_{\mathbf{y}, \eta}\quad \mathbf{c^T y + \eta} \\ st\quad& \mathbf{Ay \geqslant d} \\ & \eta \geqslant \mathbf{(h - Ey - M}u_l^* )^T \pi_l^*, \qquad \forall l \leqslant k \\ & \mathbf{y \in S_y}, \\&\eta\in\mathbb{R}. \end{aligned}MP1:s.t.y , hmincTy+theA y⩾dthe⩾(h−Ey−M ul∗)T πl∗,∀l⩽ky∈Sy,the∈R.
Note that in the second constraint, ∀ l ⩽ k \forall \ l \leqslant k∀l ⩽k refers to the previouskkIn k iterations,the cutting plane generated each time is added toMP 1 \mathbf{MP_1}MP1in . and eta \etaeta is equivalent to an auxiliary variable, which is used to identifythe costs incurred (also calledworst-case
).second-stage
recourse
Using the above model, we can calculate the current optimal solution ( yk + 1 ∗ , η k + 1 ∗ ) (\mathbf{y_{k+1}^{*}}, \eta_{k+1} ^{*})(yk+1∗,thek+1∗) , which isthe k + 1 k+1k+The values of both in one iteration.
In other words, in the case of ⩾ ( h − E y − M ul ∗ ) T π l ∗ , ∀ l ⩽ k \eta \geqslant \mathbf{(h - Ey - M}u_l^* )^T \pi_l ^*, \,\,\, \forall l \leqslant kthe⩾(h−Ey−M ul∗)T πl∗,∀l⩽As k continues to be added,MP 1 \mathbf{MP_1}MP1中η \etaThe value of eta will continue to increase (at least not decrease), soMP 1 \mathbf{MP_1}MP1The objective function will continue to rise. As will be discussed below, MP 1 \mathbf{MP_1}MP1The objective function is a lower bound of the global optimal solution.
The same as in the traditional Benders Decomposition algorithm, during the iterative process of the Benders-dual algorithm, you can also calculate the changes in the global upper and lower bounds at any iteration process to judge the quality of the current solution and whether it has reached the optimal level. untie.
The original description of the main problem under the Benders-dual method in the literature [1] is as follows:
NOTE: Some very crucial information is mentioned in the article, viz Benders-dual method迭代过程中,全局上界和下界的计算
. According to the original text:
- c T yk ∗ + Q ( yk ∗ ) \mathbf{c^Ty_k^* + \mathcal{Q}(y_k^*)}cTyk∗+Q(yk∗)为
原始问题目标值
Obj = { min yc T y + max u ∈ U min x ∈ F ( y , u ) b T x ∣ A y ⩾ d , y ∈ S y } \text{Obj} = \{\min_ {\mathbf{y}} \mathbf{c^Ty} +\max_{u \in \mathcal{U}} \min_{ \mathbf{x}\in {\mathbf{F}(\mathbf{y}, u )}} \mathbf{b}^T \mathbf{x} | \mathbf{Ay} \geqslant \mathbf{d}, \mathbf{y} \in \mathbf{S}_{\mathbf{y}}\}Obj={ minycTy+maxu∈Uminx∈F(y,u)bTx∣Ay⩾d,y∈Sy} (i.e.原始问题
) provides an upper bound; - 而MP 1 : c T yk + 1 ∗ + η k + 1 ∗ \mathbf{MP_1}: \,\, \mathbf{c^Ty_{k+1}^{*}} + \eta_{k+1} ^{*}MP1:cTyk+1∗+thek+1∗
原始问题
provides a lower bound for . - In
Benders-dual method
the process of algorithm iteration, the upper and lower bounds will be continuously improved. And, solve the main problem MP 1 \mathbf{MP_1} cyclicallyMP1, get fixed y ˉ \mathbf{\bar{y}}yˉ, and change y ˉ \mathbf{\bar{y}}yˉPassed to subproblem SP 1 \mathbf{SP_1}SP1, update subproblem SP 1 \mathbf{SP_1}SP1, and then solve SP 1 \mathbf{SP_1}SP1, according to SP 1 \mathbf{SP_1}SP1Solve, infinitesimal ⩾ ( h − E y − M uk ∗ ) T π k ∗ \eta \geqslant \mathbf{(h - Ey - M}u_k^* )^T \pi_k^*the⩾(h−Ey−M uk∗)T πk∗, and add it to MP 1 \mathbf{MP_1}MP1middle. - At the same time, the global upper and lower bounds are updated. By looping this process, eventually the upper and lower bounds can converge within a finite number of steps.
To summarize, during the iterative process of the Benders-dual algorithm, the global upper and lower bounds in any iteration can be calculated using the following formula:
L B = max { c T y k + 1 ∗ + η k + 1 ∗ , L B } U B = min { c T y k ∗ + Q ( y k ∗ ) , U B } \begin{aligned} &LB = \max\{\mathbf{c^Ty_{k+1}^{*}} + \eta_{k+1}^{*}, \quad LB\} \\ &UB=\min\{\mathbf{c^Ty_k^* + \mathcal{Q}(y_k^*)}, \quad UB\} \end{aligned} LB=max{ cTyk+1∗+thek+1∗,LB}UB=min{ cTyk∗+Q(yk∗),UB}
This is easy to understand:
- LB = c T yk + 1 ∗ + η k + 1 ∗ LB = \mathbf{c^Ty_{k+1}^{*}} + \eta_{k+1}^{*}LB=cTyk+1∗+thek+1∗, only a part of random scenarios are considered and some constraints are relaxed, so min \min is calculated for itmin must be smaller (or equal to the minimum), so it provides a lower bound for the global optimal solution; the intuitive understanding is
少考虑了约束,又是min问题,因此是个下界
;- UB = c T yk ∗ + Q ( yk ∗ ) UB=\mathbf{c^Ty_k^* + \mathcal{Q}(y_k^*)}UB=cTyk∗+Q(yk∗) , is equivalent to splitting the original problem into two independent problems and solving them separately, and then adding the respective objective functions. The feasible solution of separate optimization must also be the feasible solution of joint optimization; and the solution of separate optimization, For joint optimization, it is just a feasible solution, not necessarily the optimal solution. The solution of joint optimization must be better than or equal to the solution of separate optimization. Thereforec T yk ∗ + Q ( yk ∗ ) \mathbf{c^Ty_k^* + \mathcal{Q}(y_k^*)}cTyk∗+Q(yk∗) provides an upper bound for the optimal solution of the Two-stage RO original model.
- When the algorithm iterates, UB = LB UB=LB is reachedUB=L B , the algorithm terminates and the optimal solution is obtained.
Note that in the above algorithm description, π k ∗ \pi_k^*Pik∗和uk ∗ u_k^*uk∗They are all poles (or discrete points) in their respective feasible domains. In this way, the complexity of the Benders-dual algorithm is as follows: