lingo线性规划问题
来源:学生作业帮 编辑:神马作文网作业帮 分类:综合作业 时间:2024/11/14 18:25:21
lingo线性规划问题
sets:
jbxq/1..4/:a;
zgxq/1..4/:b;
xz/1..4/:e,f,g,h;
nf/1..5/;
jd/1..4/;
kc(nf,jd):s;
jbsc(nf,jd):c,x;
endsets
data:
e=1370,1380,1310,1390;
f=1250,1240,1200,1230;
g=1390,1370,1350,1420;
h=65,67,66,70;
a=18,24,33,19;
b=24,33,44,26;
c=11,12,13,15,15,
16,18,20,24,25,
25,26,27,30,32,
12,14,15,15,17;
enddata
max=@sum(jbsc(i,j):(c(i,j)+x(i,j)-s(i,j))*e(i)-c(i,j)*f(i)-x(i,j)*g(i)-s(i,j)*h(i));
@for(nf(i):@sum(jd(j):x(i,j)-s(i,j))>=a(i));
@for(nf(i):@sum(jd(j):x(i,j)-s(i,j))
sets:
jbxq/1..4/:a;
zgxq/1..4/:b;
xz/1..4/:e,f,g,h;
nf/1..5/;
jd/1..4/;
kc(nf,jd):s;
jbsc(nf,jd):c,x;
endsets
data:
e=1370,1380,1310,1390;
f=1250,1240,1200,1230;
g=1390,1370,1350,1420;
h=65,67,66,70;
a=18,24,33,19;
b=24,33,44,26;
c=11,12,13,15,15,
16,18,20,24,25,
25,26,27,30,32,
12,14,15,15,17;
enddata
max=@sum(jbsc(i,j):(c(i,j)+x(i,j)-s(i,j))*e(i)-c(i,j)*f(i)-x(i,j)*g(i)-s(i,j)*h(i));
@for(nf(i):@sum(jd(j):x(i,j)-s(i,j))>=a(i));
@for(nf(i):@sum(jd(j):x(i,j)-s(i,j))
kc是集名 你的kc(1,1)是什么东西
再问: 那应该怎么改
再答: 我都不知道你什么意思怎么可能知道怎么改
再问: 那应该怎么改
再答: 我都不知道你什么意思怎么可能知道怎么改