lingo 非线性规划哪位高手能用lingo或matlab解这个问题?我把意思写出来了,可能不符合语法,model:sets:empoly/1..6/:e;fire/1..6/:f;jh/1..6/:h;prov/1..6/:p;wb/1..6/:w;demand/1..6/:d;storage/1..6/:s;endsetsdata:demand=1200,1400,
来源:学生作业帮助网 编辑:作业帮 时间:2024/06/21 14:48:54
![lingo 非线性规划哪位高手能用lingo或matlab解这个问题?我把意思写出来了,可能不符合语法,model:sets:empoly/1..6/:e;fire/1..6/:f;jh/1..6/:h;prov/1..6/:p;wb/1..6/:w;demand/1..6/:d;storage/1..6/:s;endsetsdata:demand=1200,1400,](/uploads/image/z/3140470-46-0.jpg?t=lingo+%E9%9D%9E%E7%BA%BF%E6%80%A7%E8%A7%84%E5%88%92%E5%93%AA%E4%BD%8D%E9%AB%98%E6%89%8B%E8%83%BD%E7%94%A8lingo%E6%88%96matlab%E8%A7%A3%E8%BF%99%E4%B8%AA%E9%97%AE%E9%A2%98%3F%E6%88%91%E6%8A%8A%E6%84%8F%E6%80%9D%E5%86%99%E5%87%BA%E6%9D%A5%E4%BA%86%2C%E5%8F%AF%E8%83%BD%E4%B8%8D%E7%AC%A6%E5%90%88%E8%AF%AD%E6%B3%95%2Cmodel%3Asets%3Aempoly%2F1..6%2F%3Ae%3Bfire%2F1..6%2F%3Af%3Bjh%2F1..6%2F%3Ah%3Bprov%2F1..6%2F%3Ap%3Bwb%2F1..6%2F%3Aw%3Bdemand%2F1..6%2F%3Ad%3Bstorage%2F1..6%2F%3As%3Bendsetsdata%3Ademand%3D1200%2C1400%2C)
lingo 非线性规划哪位高手能用lingo或matlab解这个问题?我把意思写出来了,可能不符合语法,model:sets:empoly/1..6/:e;fire/1..6/:f;jh/1..6/:h;prov/1..6/:p;wb/1..6/:w;demand/1..6/:d;storage/1..6/:s;endsetsdata:demand=1200,1400,
lingo 非线性规划
哪位高手能用lingo或matlab解这个问题?
我把意思写出来了,可能不符合语法,
model:
sets:
empoly/1..6/:e;
fire/1..6/:f;
jh/1..6/:h;
prov/1..6/:p;
wb/1..6/:w;
demand/1..6/:d;
storage/1..6/:s;
endsets
data:
demand=1200,1400,1550,1500,1600,1500;
enddata
init:
x(0)=1;
s(0)=400;
endinit
min=@sum(12*168*(12+e(i)-f(i)))+@sum(18*h(i)*(12+e(i)-f(i)))+@sum(50*e(i)+100*f(i))+@sum(100*(168+h(i))/1.6+200)+@sum((30*x(i)-20)*(2*x(i-1)-1)*(p(i)+s(i-1)-d(i));
@for(s(i)=x(i-1)*(p(i)+s(i-1)-d(i))+(1-x(i-1))*(p(i)-s(i-1)-d(i)));
@for(p(i)=(168+h(i))/1.6+w(i));
@sum(p(i)=8350);
s(6)=0;
@for(h(i)
lingo 非线性规划哪位高手能用lingo或matlab解这个问题?我把意思写出来了,可能不符合语法,model:sets:empoly/1..6/:e;fire/1..6/:f;jh/1..6/:h;prov/1..6/:p;wb/1..6/:w;demand/1..6/:d;storage/1..6/:s;endsetsdata:demand=1200,1400,
帮你改好了:
model:
sets:
hr/1..6/:empoly,fire,jh,prov,wb,demand,storage,x;
endsets
data:
demand=1200,1400,1550,1500,1600,1500;
enddata
x(1)=1;
storage(1)=400;
storage(6)=0;
calc:
@for(hr(i)|i#ge#2 #and# i#lt#6:storage(i)=x(i-1)*(prov(i)+storage(i-1)-demand(i))+(1-x(i-1))*(prov(i)-storage(i-1)-demand(i)));
@for(hr(i):prov(i)=(168+jh(i))/1.6+wb(i));
endcalc
min=@sum(hr(i):12*168*(12+empoly(i)-fire(i)))+@sum(hr(i):18*jh(i)*(12+empoly(i)-fire(i)))+@sum(hr(i):50*empoly(i)+100*fire(i))+@sum(hr(i):100*(168+jh(i))/1.6+200)+@sum(hr(i)|i#ge#2:(30*x(i)-20)*(2*x(i-1)-1)*(prov(i)+storage(i-1)-demand(i)));
@sum(hr(i):prov(i))=8350;
@for(hr(i):jh(i)<=10);
@for(hr:@gin(empoly));
@for(hr:@gin(fire));
@for(hr:@gin(wb));
@for(hr:@gin(storage));
@for(hr:@bin(x));
end
程序运行以后没有错,就是找不到可行解,你再看看表达式或者数据有没有错改一下就行了.