高手给看看哪错了 lingo 在这里谢谢了model:sets:part/1..7/:a;equipment/1..5/:g;time/1..6/:t;machine_hour(equipment,part):d;machine(equipment,time):h,n,m;pxt(time,part):c,v,x;endsetsdata:a=100 60 80 40 110 90 30;g=2 2 3 1 1;h=4 4 4 4 4 4 2
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/08 09:28:29
高手给看看哪错了 lingo 在这里谢谢了model:sets:part/1..7/:a;equipment/1..5/:g;time/1..6/:t;machine_hour(equipment,part):d;machine(equipment,time):h,n,m;pxt(time,part):c,v,x;endsetsdata:a=100 60 80 40 110 90 30;g=2 2 3 1 1;h=4 4 4 4 4 4 2
高手给看看哪错了 lingo 在这里谢谢了
model:
sets:
part/1..7/:a;
equipment/1..5/:g;
time/1..6/:t;
machine_hour(equipment,part):d;
machine(equipment,time):h,n,m;
pxt(time,part):c,v,x;
endsets
data:
a=100 60 80 40 110 90 30;
g=2 2 3 1 1;
h=4 4 4 4 4 4 2 2 2 2 2 2
3 3 3 3 3 3 1 1 1 1 1 1
1 1 1 1 1 1;
d=0.5 0.7 0 0 0.3 0.2 0.5
0.1 0.2 0 0.3 0 0.6 0
0.2 0 0.8 0 0 0 0.6
0.05 0.03 0 0.07 0.1 0 0.08
0 0 0.01 0 0.05 0 0.05;
c=500 1000 300 300 800 200 100
600 500 200 0 400 300 150
300 600 0 0 500 400 100
200 300 400 500 200 0 100
0 100 500 100 1000 300 0
500 500 100 300 1100 500 60;
enddata
max=@sum(pxt(t,i):x(t,i)*a(i)-5*v(t,i))-@sum(part(i):a(i)*50);
@for(pxt(t,i):v(t,i)
高手给看看哪错了 lingo 在这里谢谢了model:sets:part/1..7/:a;equipment/1..5/:g;time/1..6/:t;machine_hour(equipment,part):d;machine(equipment,time):h,n,m;pxt(time,part):c,v,x;endsetsdata:a=100 60 80 40 110 90 30;g=2 2 3 1 1;h=4 4 4 4 4 4 2
model:
sets:
part/1..7/:a;
equipment/1..5/:g;
time/1..6/; !t; !你又犯了一样的错误啦,你的t是下标的,不能那样写的;
machine_hour(equipment,part):d;
machine(equipment,time):h,n,m;
pxt(time,part):c,v,x;
endsets
data:
a=100 60 80 40 110 90 30;
g=2 2 3 1 1;
h=4 4 4 4 4 4 2 2 2 2 2 2
3 3 3 3 3 3 1 1 1 1 1 1
1 1 1 1 1 1;
d=0.5 0.7 0 0 0.3 0.2 0.5
0.1 0.2 0 0.3 0 0.6 0
0.2 0 0.8 0 0 0 0.6
0.05 0.03 0 0.07 0.1 0 0.08
0 0 0.01 0 0.05 0 0.05;
c=500 1000 300 300 800 200 100
600 500 200 0 400 300 150
300 600 0 0 500 400 100
200 300 400 500 200 0 100
0 100 500 100 1000 300 0
500 500 100 300 1100 500 60;
enddata
max=@sum(pxt(t,i):x(t,i)*a(i)-5*v(t,i))-@sum(part(i):a(i)*50);
@for(pxt(t,i):v(t,i)