两阶段随机规划背包问题
关键字:COPT,Gurobi,Benders Decomposition,Integer-L-shaped Algorithm, stochastic program摘要:本文提供了两阶段随机规划背包问题的数学模型和4种求解方法,方法1:python + COPT;方法2:python + COPT + Benders Cut + L-Shaped;方法3:python + Gurobi;方法4:python + Gurobi + Benders Cut + L-Shaped。
不知道大家是否和小编一样,在学习数学模型求解方面的知识时,找到的资料要么太简单无法拓展,要么太难无法深入,要么………
今天的推文极有可能正中大家下怀,它相比简单问题进了1个台阶,比复杂问题退了不止5个台阶,今天继续为大家带来两阶段随机规划的推文,想想距离上次随机规划的推文还是在…………上次
我们之前MATLAB数学建模(十二) | 随机规划这篇推文初步介绍了随机规划,今天我们在此基础上讲解随机规划的其中一部分研究内容——期望值模型。后续的推文我们将围绕本篇推文以及本篇的参考文献以视频的方式进一步介绍随机规划,欢迎大家前来学习。
问题描述
疫情结束后,仪同学计划背着他的好几个极地背包开心的去骑行,他准备在背包里装一些物品以保证骑行所需,待装的每个物品都具有一定的重量以及骑行收益,但有一部分物品的收益是随机的,且概率已知,于是他计划分两个阶段将物品装进他的极地背包,且要保证在不超过背包容量的前提下使骑行收益最大,问他都需要装哪些物品?
<hr/>随机规划模型
https://www.zhihu.com/equation?tex=%5Cbegin%7Balign%2A%7D++%5Cmax_%7B%7D+%5Cquad+%26+%5Csum_%7Bi%5Cin+M%7D%5Csum_%7Bj%5Cin+N%7Dc_ix_%7Bij%7D+%2B+E_%7B%7D%28Q%28x%2Cw%29%29%5C%5C+++s.t.%5Cquad+%26+%5Csum_%7Bi%5Cin+M%7Da_ix_%7Bij%7D+%E2%A9%BD+b_j+%5Cquad+%5Cquad+%5Cforall+j%5Cin+N%5C%5C++%26+%5Csum_%7Bj%5Cin+N%7Dx_%7Bij%7D+%E2%A9%BD+1%5Cquad+%5Cquad+%5Cquad+%5Cforall+i+%5Cin+M%5C%5C++%26+x_%7Bij%7D+%3D+0%2C+1++%5Cquad+%5Cforall+i+%5Cin+M%2C%5C+j%5Cin+N%5C%5C+%5C%5C++%09%09Q%28x%2Cw%29+%3D+%26+%5Cmax_%7B%7D+%5Csum_%7Bk%5Cin+K%7D%5Csum_%7Bj%5Cin+N%7Dq_%7Bwk%7Dy_%7Bwkj%7D+%5C%5C+++++s.t.%5Cquad+%26+%5Csum_%7Bi%5Cin+M%7Da_ix_%7Bij%7D%2B%5Csum_%7Bk%5Cin+K%7Dw_ky_%7Bwkj%7D+%E2%A9%BD+b_j+%5Cquad+%5Cquad+%5Cforall+j%5Cin+N%2C+%5C+w%5Cin++%5COmega%5C%5C+++++%26+%5Csum_%7Bj%5Cin+N%7Dy_%7Bwkj%7D+%E2%A9%BD+1%5Cquad+%5Cquad+%5Cquad+%5Cforall+i%5Cin+M%2C+%5C+w%5Cin++%5COmega%5C%5C+++++%26+y_%7Bwkj%7D+%3D+0%2C+1++%5Cquad+%5Cforall+k+%5Cin+K%2C%5C+j%5Cin+N++%5Cend%7Balign%2A%7D+%5C%5C
其中,各个变量的含义如下所示:
<hr/>随机规划模型的拓展形式
https://www.zhihu.com/equation?tex=%5Cbegin%7Balign%2A%7D++%5Cmax_%7B%7D+%5Cquad+%26+%5Csum_%7Bi%5Cin+M%7D%5Csum_%7Bj%5Cin+N%7Dc_ix_%7Bij%7D+%2B+%5Csum_%7Bw%5Cin+%5COmega%7D%5Csum_%7Bj%5Cin+N%7D%5Csum_%7Bk%5Cin+K%7Dp_wq_%7Bwk%7Dy_%7Bwkj%7D%5C%5C+++s.t.%5Cquad+%26+%5Csum_%7Bi%5Cin+M%7Da_ix_%7Bij%7D+%E2%A9%BD+b_j+%5Cquad+%5Cquad+%5Cforall+j%5Cin+N%5C%5C++%26+%5Csum_%7Bj%5Cin+N%7Dx_%7Bij%7D+%E2%A9%BD+1%5Cquad+%5Cquad+%5Cquad+%5Cforall+i+%5Cin+M%5C%5C++%5Cquad+%26+%5Csum_%7Bi%5Cin+M%7Da_ix_%7Bij%7D%2B%5Csum_%7Bk%5Cin+K%7Dw_ky_%7Bwkj%7D+%E2%A9%BD+b_j+%5Cquad+%5Cquad+%5Cforall+j%5Cin+N%2C+%5C+w%5Cin++%5COmega%5C%5C+++++%26+%5Csum_%7Bj%5Cin+N%7Dy_%7Bwkj%7D+%E2%A9%BD+1%5Cquad+%5Cquad+%5Cquad+%5Cforall+i%5Cin+M%2C+%5C+w%5Cin++%5COmega%5C%5C+%26+x_%7Bij%7D+%3D+0%2C+1++%5Cquad+%5Cforall+i+%5Cin+M%2C%5C+j%5Cin+N%5C%5C+%26+y_%7Bwkj%7D+%3D+0%2C+1++%5Cquad+%5Cforall+k+%5Cin+K%2C%5C+j%5Cin+N++%5Cend%7Balign%2A%7D+%5C%5C
随机规划模型转化为拓展形式的本质就是对期望转化为可以求解的形式,即
https://www.zhihu.com/equation?tex=E_%7B%7D%28X%29+%3D+%5Csum_%7Bi%7Dp_ix_i%5C%5C+%5C%5C
对应论文中的
https://www.zhihu.com/equation?tex=E_%7B%7D%28Q%28x%2Cw%29%29+%3D+%5Csum_%7Bw%5Cin+%5COmega%7D%5Csum_%7Bj%5Cin+N%7D%5Csum_%7Bk%5Cin+K%7Dp_wq_%7Bwk%7Dy_%7Bwkj%7D%5C%5C+%5C%5C
<hr/>算法步骤
<hr/>学习步骤推荐
Step1: 结合本推文通读参考文献-->论文比较简单;
页:
[1]