求大神:数学模型第四版第四章第11题的答案加lingo程序。。。非诚感谢。。。
答案:1 悬赏:20 手机版
解决时间 2021-03-26 21:51
- 提问者网友:斑駁影
- 2021-03-26 09:45
求大神:数学模型第四版第四章第11题的答案加lingo程序。。。非诚感谢。。。
最佳答案
- 五星知识达人网友:英雄的欲望
- 2021-03-26 11:22
记tij为第i名同学参加第j阶段面试需要的时间(已知),令xij表示第i名同学参加第j阶段面试的开始时刻(不妨记早上8:00面试开始为0时刻)(i=1, 2, 3, 4;j=1, 2, 3),T为完成全部面试所花费的最少时间。
目标为:min t =(max(xi3+ti3))
约束条件:
a. 时间先后次序约束(每人只有参加完前一个阶段的面试后才能进入下一个阶段):
xij+ tij <= xi,j+1 (i=1, 2, 3, 4;j=1, 2)
b.每个阶段j同一时间只能面试1名同学:用0-1变量yik表示第k名同学是否排在第i名同学前面(1表示是,0表示否),则
xij+ tij–xk <= T*yik (i, k=1, 2, 3, 4; j=1, 2, 3; i xkj+ tkj–xij <= T*(1–yik) (i, k=1, 2, 3, 4; j=1, 2, 3; i 可以将非线性的优化目标改写为如下线性优化目标:
Min T
s.t. T >= x13+ t13
T >= x23+ t23
T >= x33+ t33
T >= x43+ t43
这个问题的0-1非线性规划模型(当然所有变量还有非负约束,变量yik还有0-1约束) :
Min T
s.t. xij+ tij <= xi, j+1 (i=1, 2, 3, 4;j=1, 2)
xij+ tij–xkj <= T*yik (i, k=1, 2, 3, 4; j=1, 2, 3; i xkj+ tkj–xij <= T*(1–yik) (i, k=1, 2, 3, 4; j=1, 2, 3; i xi3+ ti3 <= T (i=1, 2, 3, 4)
模型的LINGO:
Model:min =T;
T >= x13+ t13;T >= x23+ t23;T >= x33+ t33;T >= x43+ t43;x11+ t11 <= x12;x12+ t12 <= x13;x21+ t21 <= x22;x22+ t22 <= x23;x31+ t31 <= x32;x32+ t32 <= x33;x41+ t41 <= x42;x42+ t42 <= x43;x11+ t11 - x21<= T*y12;x21+ t21 - x11<= T*(1-y12);x12+ t12 - x22<= T*y12;x22+ t22 - x12<= T*(1-y12);x13+ t13 - x23<= T*y12;x23+ t23 - x13<= T*(1-y12);x11+ t11 - x31<= T*y13;x31+ t31 - x11<= T*(1-y13); x12+ t12 - x32<= T*y12;x32+ t32 - x12<= T*(1-y13);x13+ t13 - x33<= T*y13;x33+ t33 - x13<= T*(1-y13);x11+ t11 - x41<= T*y14;x41+ t41 - x11<= T*(1-y14);x12+ t12 - x42<= T*y14;x42+ t42 - x12<= T*(1-y14);x13+ t13 - x43<= T*y14;x43+ t43 - x13<= T*(1-y14);x21+ t21 - x31<= T*y23;x31+ t31 - x21<= T*(1-y23);x22+ t22 - x32<= T*y23;x32+ t32 - x32<= T*(1-y23);x23+ t23 - x33<= T*y23;x33+ t33 - x23<= T*(1-y23);x21+ t21 - x41<= T*y24;x41+ t41 - x21<= T*(1-y24);x22+ t22 - x42<= T*y24;x42+ t42 - x22<= T*(1-y24);x23+ t23 - x43<= T*y24;x43+ t43 - x23<= T*(1-y24);x31+ t31 - x41<= T*y34; x41+ t41 - x31<= T*(1-y34);x32+ t32 - x42<= T*y34;x42+ t42 - x32<= T*(1-y34);x33+ t33 - x43<= T*y34;x43+ t43 - x33<= T*(1-y34);t11=13;t12=15;t13=20;t21=10;t22=20;t23=18;t31=20;t32=16;t33=10;t41=8;t42=10;t43=15;@bin(y12);@bin(y13);@bin(y14);@bin(y23);@bin(y24);@bin(y34);
end
即所有面试完成至少需要84分钟,面试顺序为4-1-2-3 (即丁-甲-乙-丙)。早上8:00面试开始,最早9:24面试可以全部结束。
目标为:min t =(max(xi3+ti3))
约束条件:
a. 时间先后次序约束(每人只有参加完前一个阶段的面试后才能进入下一个阶段):
xij+ tij <= xi,j+1 (i=1, 2, 3, 4;j=1, 2)
b.每个阶段j同一时间只能面试1名同学:用0-1变量yik表示第k名同学是否排在第i名同学前面(1表示是,0表示否),则
xij+ tij–xk <= T*yik (i, k=1, 2, 3, 4; j=1, 2, 3; i
Min T
s.t. T >= x13+ t13
T >= x23+ t23
T >= x33+ t33
T >= x43+ t43
这个问题的0-1非线性规划模型(当然所有变量还有非负约束,变量yik还有0-1约束) :
Min T
s.t. xij+ tij <= xi, j+1 (i=1, 2, 3, 4;j=1, 2)
xij+ tij–xkj <= T*yik (i, k=1, 2, 3, 4; j=1, 2, 3; i
模型的LINGO:
Model:min =T;
T >= x13+ t13;T >= x23+ t23;T >= x33+ t33;T >= x43+ t43;x11+ t11 <= x12;x12+ t12 <= x13;x21+ t21 <= x22;x22+ t22 <= x23;x31+ t31 <= x32;x32+ t32 <= x33;x41+ t41 <= x42;x42+ t42 <= x43;x11+ t11 - x21<= T*y12;x21+ t21 - x11<= T*(1-y12);x12+ t12 - x22<= T*y12;x22+ t22 - x12<= T*(1-y12);x13+ t13 - x23<= T*y12;x23+ t23 - x13<= T*(1-y12);x11+ t11 - x31<= T*y13;x31+ t31 - x11<= T*(1-y13); x12+ t12 - x32<= T*y12;x32+ t32 - x12<= T*(1-y13);x13+ t13 - x33<= T*y13;x33+ t33 - x13<= T*(1-y13);x11+ t11 - x41<= T*y14;x41+ t41 - x11<= T*(1-y14);x12+ t12 - x42<= T*y14;x42+ t42 - x12<= T*(1-y14);x13+ t13 - x43<= T*y14;x43+ t43 - x13<= T*(1-y14);x21+ t21 - x31<= T*y23;x31+ t31 - x21<= T*(1-y23);x22+ t22 - x32<= T*y23;x32+ t32 - x32<= T*(1-y23);x23+ t23 - x33<= T*y23;x33+ t33 - x23<= T*(1-y23);x21+ t21 - x41<= T*y24;x41+ t41 - x21<= T*(1-y24);x22+ t22 - x42<= T*y24;x42+ t42 - x22<= T*(1-y24);x23+ t23 - x43<= T*y24;x43+ t43 - x23<= T*(1-y24);x31+ t31 - x41<= T*y34; x41+ t41 - x31<= T*(1-y34);x32+ t32 - x42<= T*y34;x42+ t42 - x32<= T*(1-y34);x33+ t33 - x43<= T*y34;x43+ t43 - x33<= T*(1-y34);t11=13;t12=15;t13=20;t21=10;t22=20;t23=18;t31=20;t32=16;t33=10;t41=8;t42=10;t43=15;@bin(y12);@bin(y13);@bin(y14);@bin(y23);@bin(y24);@bin(y34);
end
即所有面试完成至少需要84分钟,面试顺序为4-1-2-3 (即丁-甲-乙-丙)。早上8:00面试开始,最早9:24面试可以全部结束。
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯