问题标题:
有关lingo的一个错误程序model;sets:row/1,2,3,4/:b;arrange/1,2,3,4,5/:x,p;numb/1,2,3/:c;link1(row,arrange):a1;link2(numb,arrange):a2;endsetsdata:p=16,13,15,20,20;b=30,35,30,40;c=20,25,20;a1=7,1,3,5,2,3,4,4,2,5,3,2,3,5,3,2,5,6,3,5;a2=1,2,3,1,2
问题描述:

有关lingo的一个错误程序

model;

sets:

row/1,2,3,4/:b;

arrange/1,2,3,4,5/:x,p;

numb/1,2,3/:c;

link1(row,arrange):a1;

link2(numb,arrange):a2;

endsets

data:

p=16,13,15,20,20;

b=30,35,30,40;

c=20,25,20;

a1=7,1,3,5,2,3,4,4,2,5,3,2,3,5,3,2,5,6,3,5;

a2=1,2,3,1,2,2,2,1,3,1,2,1,2,1,2;

enddata

[ObJ]min=@sum(arrange(j):p(j)*x(j));

@for(row(i):@sum(arrange(j):a1(i,j)*x(j))>=b(i););

@for(numb(i):@sum(arrange(j):a2(i,j)*x(j))

林兆花回答:
  model后面应该是:
查看更多
其它推荐
热门其它推荐