猪粉肠的做法大全图片:lingo问题

来源:百度文库 编辑:高校问答 时间:2024/04/28 19:16:05
power(generator,section):p,cost;
change/1..8/:current,current1,x;
speed/1..8/:maxv,minv;
line/1..6/:safe,a;
c/1..9/;
link(line,c):func;
endsets
data:
p = 70 0 50 0 0 30 0 0 0 40
30 0 20 8 15 6 2 0 0 8
110 0 40 0 30 0 20 40 0 40
55 5 10 10 10 10 15 0 0 1
75 5 15 0 15 15 0 10 10 10
95 0 10 20 0 15 10 20 0 10
50 15 5 15 10 10 5 10 3 2
70 0 20 0 20 0 20 10 15 5;

cost = -505 0 124 168 210 252 312 330 363 489
-560 0 182 203 245 300 320 360 410 495
-610 0 152 189 233 258 308 356 415 500
-500 150 170 200 255 302 325 380 435 800
-590 0 116 146 188 215 250 310 396 510
-607 0 159 173 205 252 305 380 405 520
-500 120 180 251 260 306 315 335 348 548
-800 153 183 233 253 283 303 318 400 800;

maxv = 153 88 228 99.5 152 155 102.1 117;
minv = 87 58 132 60.5 98 95 60.1 63;
safe = 165 150 160 155 132 162;
current = 150 79 180 99.5 125 140 95 113.9;
!current =6 6 6 6 7 6 5 7;
func = 0.0829 0.0484 0.0530 0.1200 -0.0254 0.1221 0.1215 0 110.1500
-0.0547 0.1276 0 0.0332 0.0867 -0.1126 -0.0187 0.0986 131.3000
-0.0700 0.0607 -0.1570 -0.0101 0.1240 0 0 -0.2020 -108.4800
-0.0346 -0.1028 0.2050 -0.0209 -0.0120 0.0057 0.1452 0.0763 77.6100
0 0.2427 -0.0648 -0.0412 -0.0655 0.0699 -0.0038 -0.0093 133.2200
0.2375 -0.0607 -0.0781 0.0929 0.0466 0 0.1664 0 120.8600;
enddata

@sum(change(i):x)=0;
@for(change(i):current1(i)=current(i)+x(i));

! @for(generator(i):endcl(i)=@sum(power(i,j) |j#le#current1(i) :p(i,j)));
! @for(generator(i):endcl(i) < maxv(i));
! @for(generator(i):endcl(i) > minv(i));
@for(generator(i):@bnd(minv(i),current1(i), maxv(i)));

!@for(line(i):t(i)=@abs(const(i)+@sum(generator(j):a(i,j)*x(j))));
@for(line(i):a(i)=@sum(link(i,j)|j #le# 8:current1(i)*func(i,j))+func(i,9));
@for(line(i):a(i) <= safe(i) );
@for(line:@free(a));
@for(change:@free(x));
@for(change:@gin(x));
end
请那位lingo高手帮忙看看 怎么解决这么问题啊 为什么@for(line(i):a(i) <= safe(i) );和@for(line(i):a(i)=@sum(link(i,j)|j #le# 8:current1(i)*func(i,j))+func(i,9));约束加在一起就是没解呢 请大家帮帮忙 急!
我试过了 还是 no feasible solution find
a dual solution does not exist for this model.

only the primal will be displayed 希望那位高手在教一下
! 非常感谢!

@for(line(i):a(i)=@sum(link(i,j)|j #le# 8:current1(i)*func(i,j))+func(i,9));我觉得你这个里面写错了点,应该是@for(line(i):a(i)=@sum(c(j)|j #le# 8:current1(i)*func(i,j))+func(i,9));你试试看行不.

杨军,怎么到处都是你回答啊.也不给我留一点啊 ~~~~~~~~~~~~~~~