我有一个数学模型,由于规模有点大,想用lingo求解,在此求教
发布网友
发布时间:2024-10-13 20:45
我来回答
共1个回答
热心网友
时间:2024-10-18 03:35
model:
sets:
production/1..5/:;
factory/1..8/:;
market/1..8/:;
season/1..4/:;
link1(market,season,production):d;
link2(factory,season):p;
link3(factory,production):u,m,h;
link4(factory,market):r,g;
link5(production,factory,season):x,c;
link6(production,factory,market,season):s;
endsets
min=@sum(link5(i,j,t):x(i,j,t)*m(j,i))+@sum(link6(i,j,k,t):s(i,j,k,t)*(r(j,k)+g(j,k)))+@sum(link5(i,j,t):c(i,j,t)*h(j,i));
@for(link2(j,t):@sum(production(i):x(i,j,t)*u(j,i))<=p(j,t));
@for(production(i):@for(factory(j):c(i,j,1)=x(i,j,1)-@sum(market(k):s(i,j,k,1))));
@for(link5(i,j,t)|t#gt#1:c(i,j,t)=c(i,j,t-1)+x(i,j,t)-@sum(market(k):s(i,j,k,t)));
@for(production(i):@for(factory(j):c(i,j,4)=0));
@for(link1(k,t,i):@sum(factory(j):s(i,j,k,t))=d(k,t,i));
data:
d=
657 600 314 195 250 669 700 493 195 300 675 800 576 206 300 669 700 557 187 250
0 8 286 468 73 0 8 297 477 80 0 8 306 492 90 0 8 311 501 90
0 119 200 32 102 0 119 200 31 109 0 180 166 32 102 0 150 168 31 125
0 174 77 39 8 0 39 64 20 8 0 116 74 12 8 0 260 72 49 10
207 155 32 13 21 207 204 32 15 19 207 214 32 10 18 207 193 32 20 18
0 0 30 78 11 0 0 30 79 9 0 0 30 78 11 0 0 30 79 9
0 40 10 10 50 0 40 10 10 50 0 40 10 10 50 0 40 10 10 50
0 10 10 50 20 0 10 10 50 20 0 10 10 50 20 0 10 10 50 20;
p=
1000 1000 1000 1000
1600 1600 1600 1600
250 250 250 250
200 200 200 200
650 650 650 650
1000 1000 1000 1000
600 600 600 600
500 500 500 500 ;
u=
99999.0 99999.0 1.1 1.1 99999.0
1.4 1.2 99999.0 99999.0 1.2
99999.0 1.1 99999.0 99999.0 1.1
99999.0 1.2 99999.0 1.1 1.2
99999.0 1.3 1.1 99999.0 1.3
99999.0 99999.0 99999.0 1.3 99999.0
1.4 1.3 1.3 1.3 1.3
99999.0 1.3 1.2 1.2 1.2 ;
m=
9999999.0 9999999.0 3.5 4.0 9999999.0
8.0 4.0 9999999.0 9999999.0 4.0
9999999.0 5.0 9999999.0 9999999.0 5.0
9999999.0 10.0 9999999.0 10.0 10.0
9999999.0 4.5 4.0 9999999.0 4.5
9999999.0 9999999.0 9999999.0 5.0 9999999.0
10.0 6.0 6.0 6.5 6.0
9999999.0 6.5 5.5 6.0 6.5 ;
h=
999.0 999.0 0.9 1.0 999.0
2.0 1.0 999.0 999.0 1.0
999.0 1.3 999.0 999.0 1.3
999.0 2.5 999.0 2.5 2.5
999.0 1.1 1.0 999.0 1.1
999.0 999.0 999.0 1.3 999.0
2.5 1.5 1.5 1.6 1.5
999.0 1.6 1.4 1.5 1.6 ;
r=
0.1 0.2 0.2 0.2 0.2 0.3 0.4 0.4
0.1 0.2 0.2 0.2 0.2 0.3 0.4 0.4
0.1 0.2 0.2 0.2 0.2 0.3 0.4 0.4
0.3 0.2 0.2 0.1 0.2 0.3 0.4 0.4
0.3 0.2 0.1 0.2 0.2 0.3 0.4 0.4
0.3 0.1 0.2 0.2 0.2 0.3 0.3 0.3
0.4 0.3 0.3 0.4 0.4 0.4 0.1 0.2
0.4 0.3 0.3 0.4 0.4 0.4 0.2 0.1;
g=
0 0.5 1.5 0.9 0.54 0.9 1.8 2.25
0 0.5 1.5 0.9 0.54 0.9 1.8 2.25
0 0.5 1.5 0.9 0.54 0.9 1.8 2.25
0.52 0.5 1.5 0 0.54 0.9 1.8 2.25
0.24 0.5 0 0.9 0.54 0.9 1.8 2.25
0.52 0 1.5 0.9 0.54 0.9 1.8 2.25
0.52 0.5 1.5 0.9 0.54 0.9 0 2.25
0.52 0.5 1.5 0.9 0.54 0.9 1.8 0;
enddata
end