早教吧 育儿知识 作业答案 考试题库 百科 知识分享

lingo求解model:sets:p1/1..10/:x,a;endsetsdata:a=12,21,31,40,49,58,69,79,90,101;enddatamin=@sum(p1:a*x);@sum(p1:i*x)>=15;@for(p1:i*x目标函数:min=a*x∑i*x(i)>15;x(i)*i=0为整数;为什么我这样不对???

题目详情
lingo求解
model:
sets:
p1/1..10/:x,a;
endsets
data:
a=12, 21, 31, 40 ,49 ,58 ,69, 79, 90 ,101;
enddata
min=@sum(p1:a*x);
@sum(p1:i*x)>=15;
@for(p1:i*x
目标函数:min=a*x
∑ i *x(i)>15;
x(i)*i=0为整数;
为什么我这样不对???
▼优质解答
答案和解析
model:
sets:
p1/1..10/:x,a;
endsets
data:
a=12,21,31,40 ,49 ,58 ,69,79,90 ,101;
enddata
min=@sum(p1:a*x);
@sum(p1(i):i*x(i))>=15;
@for(p1(i):i*x(i)