错误是提示语法错误如下:
程序如下
Title Location Problem
sets:
demand/1..6/:a,b,d;
supply/1..2/:x,y,e;
link(demand,supply):c;
endsets
data:
a=1.25,8.75,0.5,5.75,3,7.25;
b=1.25,0.75,4.75,5,6.5,7.25;
d=3,5,4,7,6,11;
e=20,20;
enddata
init:
x,y=5,1,2,7;
endinit
[obj]min=@sum(link(i,j):c(i,j)*((x(j)-a(i))^2+(y(j)-b(i))^2)^(1/2));
@for(demand(i):[DEMAND_CON] @sum(supply(j):c(i,j))= d(i););
@for(supply(i):[SUPPLY_CON] @sum(demand(j):c(j,i)) <=e(i););
@for(supply:@free(x);@free(y););
end
附:运行一些简单的程序如下,就没问题
max=72*x+64*y;
x+y<50;
12*x+8*y<480;
3*x<100;
谁用过lingo10啊,帮忙看看程序那儿错了
答案:1 悬赏:20 手机版
解决时间 2021-05-05 03:25
- 提问者网友:沦陷
- 2021-05-04 05:29
最佳答案
- 五星知识达人网友:平生事
- 2021-05-04 06:00
model:
Title Location Problem;
sets:
demand/1..6/:a,b,d;
supply/1..2/:x,y,e;
link(demand,supply):c;
endsets
data:
a=1.25,8.75,0.5,5.75,3,7.25;
b=1.25,0.75,4.75,5,6.5,7.25;
d=3,5,4,7,6,11;
e=20,20;
enddata
init:
x,y=5,1,2,7;
endinit
[obj]min=@sum(link(i,j):c(i,j)*((x(j)-a(i))^2+(y(j)-b(i))^2)^(1/2));
@for(demand(i):[DEMAND_CON] @sum(supply(j):c(i,j))= d(i););
@for(supply(i):[SUPPLY_CON] @sum(demand(j):c(j,i)) <=e(i););
@for(supply:@free(x);@free(y););
end
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯