帮忙看看lingo的问题在哪?
来源:学生作业帮 编辑:神马作文网作业帮 分类:综合作业 时间:2024/11/23 22:42:04
帮忙看看lingo的问题在哪?
model:
sets:
food/1:7/:pro,fat,cbd,sal;
endsets
min= @ABS( @SUM( food:pro)/ @SUM( pro+fat+cbd+sal)-0.498));
@FOR( food(i):pro=450);
@FOR( food(i):fat=404.9);
@FOR( food(i):cbd=16.34);
@FOR( food(i):sal=16.262);
data:
pro=564,2439,339,100,70,1056,821;
fat=117,530,34,9,22,820,730;
cbd=36.917,29.667,8.75,2.667,10.5,1.458,0.175;
sal=0.163,0.586,0.4,0.094,0.13,0.143,0.092;
enddata
end
model:
sets:
food/1:7/:pro,fat,cbd,sal;
endsets
min= @ABS( @SUM( food:pro)/ @SUM( pro+fat+cbd+sal)-0.498));
@FOR( food(i):pro=450);
@FOR( food(i):fat=404.9);
@FOR( food(i):cbd=16.34);
@FOR( food(i):sal=16.262);
data:
pro=564,2439,339,100,70,1056,821;
fat=117,530,34,9,22,820,730;
cbd=36.917,29.667,8.75,2.667,10.5,1.458,0.175;
sal=0.163,0.586,0.4,0.094,0.13,0.143,0.092;
enddata
end
你后面都把数据给出来了,还用运算么?再者你给的数据本身就不符合你的约束条件.
model:
sets:
food/1..7/:pro,fat,cbd,sal;
endsets
min= @ABS(@SUM(food:pro)/@SUM(food:pro+fat+cbd+sal)-0.498);
@FOR( food(i):pro=450);
@FOR( food(i):fat=404.9);
@FOR( food(i):cbd=16.34);
@FOR( food(i):sal=16.262);
data:
pro=564,2439,339,100,70,1056,821;
fat=117,530,34,9,22,820,730;
cbd=36.917,29.667,8.75,2.667,10.5,1.458,0.175;
sal=0.163,0.586,0.4,0.094,0.13,0.143,0.092;
enddata
end
model:
sets:
food/1..7/:pro,fat,cbd,sal;
endsets
min= @ABS(@SUM(food:pro)/@SUM(food:pro+fat+cbd+sal)-0.498);
@FOR( food(i):pro=450);
@FOR( food(i):fat=404.9);
@FOR( food(i):cbd=16.34);
@FOR( food(i):sal=16.262);
data:
pro=564,2439,339,100,70,1056,821;
fat=117,530,34,9,22,820,730;
cbd=36.917,29.667,8.75,2.667,10.5,1.458,0.175;
sal=0.163,0.586,0.4,0.094,0.13,0.143,0.092;
enddata
end