lingo @for 我的LINGO程式码在@FOR的地方卡住了,希望大大可以帮我解答一下,万分感激,以下是程式码的部份SETS:SET_PT /1..2/:PT_i; Node i...J average production time/day;SET_TiJ /1..2/:TiJ; Node i...J average transportatio
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/27 10:28:41
lingo @for 我的LINGO程式码在@FOR的地方卡住了,希望大大可以帮我解答一下,万分感激,以下是程式码的部份SETS:SET_PT /1..2/:PT_i; Node i...J average production time/day;SET_TiJ /1..2/:TiJ; Node i...J average transportatio
lingo @for
我的LINGO程式码在@FOR的地方卡住了,希望大大可以帮我解答一下,万分感激,以下是程式码的部份
SETS:
SET_PT /1..2/:PT_i; Node i...J average production time/day;
SET_TiJ /1..2/:TiJ; Node i...J average transportation time/day;
SET_LT /1..2/:LT_i; Node i...J average lead time/day;
SET_HC /1..2/:HC_i; Node i...J average holding cost/day;
SET_X /1..2/:X_i; Node i...J/day;
ENDSETS
DATA:
D=20; mean deman/day;
SD=2; Std.Dev./day;
PT_i=4,7; Nodei...J average production time/day;
TiJ=0,3; Nodei...J average transportation time/day;
HC_i=2,3; Nodei...J average holding cost/day;
Z=1.65; Safety Factor;
P=10; Nodei...J average penalty cost/day;
ENDDATA
The objective Guaranteed Serviced Tiem;
MIN=seq1+seq2+seq3;
seq1=Z*HC_i(1)*SD*(LT_i(1)-X_i(1))^.5;
seq2=Z*HC_i(2)*SD*(LT_i(2)-X_i(2))^.5;
seq3=P*(LT_i(2)-X_i(2));
The constraints;
@FOR(LT_i(1)=PT_i(1));
@FOR(LT_i(1)>X_i(1));
@FOR(LT_i(2)>X_i(2));
@FOR(X_i(1)>0);
@FOR(X_i(2)>0);
END
lingo @for 我的LINGO程式码在@FOR的地方卡住了,希望大大可以帮我解答一下,万分感激,以下是程式码的部份SETS:SET_PT /1..2/:PT_i; Node i...J average production time/day;SET_TiJ /1..2/:TiJ; Node i...J average transportatio
格式错误,@FOR(集合:约束条件); 对集合的定义了解不足,以下是更改过的程序,删掉了一些注释,请自行补上.
LINGO默认变量均是非负的,所以此处将X_(1)>0,X_(2)>0约束删掉.
如果是严格>0,的话,请在末尾加上@FOR(SET:X_i>10^(-10));
SETS:
SET/1..2/:PT_i,TiJ,LT_i,HC_i,X_i;
ENDSETS
DATA:
D=20; !mean deman/day;
SD=2; !Std.Dev./day;
PT_i=4,7; !Nodei...J average production time/day;
TiJ=0,3; !Nodei...J average transportation time/day;
HC_i=2,3; !Nodei...J average holding cost/day;
Z=1.65; !Safety Factor;
P=10; !Nodei...J average penalty cost/day;
ENDDATA
!The objective Guaranteed Serviced Tiem;
MIN=seq1+seq2+seq3;
seq1=Z*HC_i(1)*SD*(LT_i(1)-X_i(1))^.5;
seq2=Z*HC_i(2)*SD*(LT_i(2)-X_i(2))^.5;
seq3=P*(LT_i(2)-X_i(2));
!The constraints;
@FOR(SET:LT_i(1)=PT_i(1));
@FOR(SET:LT_i>X_i);
END