LINGO程序问题sets:product /1..7/:capcity,value;need /1..14/:demand;link(product,need):cost,number;endsetsmin=@sum(link:cost*number)+@sum(product(i):value(i)*@sum(need(j):number(i,j));@for(link(i,j):@sum(link(i,j):number(i,j)=5171));@for(product(1):@sum(need(j):number(1,j)>=500));省略了data;请问两点(1):我想计算value(i)*数据每行和,这个目标函数写的对吗?(2)第二条约束条件报错,错误为50

问题描述:

LINGO程序问题
sets:
product /1..7/:capcity,value;
need /1..14/:demand;
link(product,need):cost,number;
endsets
min=@sum(link:cost*number)+@sum(product(i):value(i)*@sum(need(j):number(i,j));
@for(link(i,j):@sum(link(i,j):number(i,j)=5171));
@for(product(1):@sum(need(j):number(1,j)>=500));
省略了data;请问两点
(1):我想计算value(i)*数据每行和,这个目标函数写的对吗?
(2)第二条约束条件报错,错误为50