lingo程序运行不出来,求教model:sets:dmu/1..5/:w;!定义了5个dmunai/1..3/:xr;!3个类型A投入nbi/1..2/:zr;!2个类型B投入ngo/1/:gr;!1个产出gi(nai,dmu):x;!A投入矩阵3*5bi(nbi,dmu):z;!B投入矩阵2*5go(ngo,dmu):y;!产出矩阵1*5en
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/23 17:33:22
lingo程序运行不出来,求教model:sets:dmu/1..5/:w;!定义了5个dmunai/1..3/:xr;!3个类型A投入nbi/1..2/:zr;!2个类型B投入ngo/1/:gr;!1个产出gi(nai,dmu):x;!A投入矩阵3*5bi(nbi,dmu):z;!B投入矩阵2*5go(ngo,dmu):y;!产出矩阵1*5en
lingo程序运行不出来,求教
model:
sets:
dmu/1..5/:w;!定义了5个dmu
nai/1..3/:xr;!3个类型A投入
nbi/1..2/:zr;!2个类型B投入
ngo/1/:gr;!1个产出
gi(nai,dmu):x;!A投入矩阵3*5
bi(nbi,dmu):z;!B投入矩阵2*5
go(ngo,dmu):y;!产出矩阵1*5
endsets
data:
x=5.69 4.93 6.7 0.51 4.11
17.25 16.56 25.71 27.70 16.34
170.58 159.03 154.01 118.56 124.79 ;
z=29.59 20.06 30.55 10.60 25.48
11.72 8.91 6.92 4.29 23.72;
y=374.19 249.49 329.24 285.27 376.65;
xr=4.93 16.56 159.03;
zr=20.06 8.91;
yr=249.49;
enddata
max=ddf;
@for(nai(n):
@sum(dmu(i):w(i)*x(n,i))=(1+ddf)yr(m));
End
lingo程序运行不出来,求教model:sets:dmu/1..5/:w;!定义了5个dmunai/1..3/:xr;!3个类型A投入nbi/1..2/:zr;!2个类型B投入ngo/1/:gr;!1个产出gi(nai,dmu):x;!A投入矩阵3*5bi(nbi,dmu):z;!B投入矩阵2*5go(ngo,dmu):y;!产出矩阵1*5en
改成这样
model:
sets:
dmu/1..5/:w,yr;!定义了5个dmu;
nai/1..3/:xr;!3个类型A投入;
nbi/1..2/:zr;!2个类型B投入;
ngo/1/:gr;!1个产出;
gi(nai,dmu):x;!A投入矩阵3*5;
bi(nbi,dmu):z;!B投入矩阵2*5;
go(ngo,dmu):y;!产出矩阵1*5;
endsets
data:
x=5.69 4.93 6.7 0.51 4.11
17.25 16.56 25.71 27.70 16.34
170.58 159.03 154.01 118.56 124.79 ;
z=29.59 20.06 30.55 10.60 25.48
11.72 8.91 6.92 4.29 23.72;
y=374.19 249.49 329.24 285.27 376.65;
xr=4.93 16.56 159.03;
zr=20.06 8.91;
yr=249.49;
enddata
max=ddf;
@for(nai(n):
@sum(dmu(i):w(i)*x(n,i))=(1+ddf)*yr(m));
End