Page 142 - 数学建模算法与应用
P. 142

Mathematical Modeling Algorithms and Applications
             数学建模算法与应用


                  本题可以使用 Lingo 软件求得精确的全局最优解,程序如下:
                  model:

                  sets:
                  row/1..4/:b;
                  col/..5/:cl,c2,x;

                  link(row,col):a;
                  endsets
                  data:

                  c1 =1,1,3,4,2;
                  c2 =-8,-2,-3,-1,-2;
                  a= 11111

                  12216
                  21600

                  00115;
                  b =400,800,200,200;
                  enddata
                  max =@ sum(col:cl*x2 + c2*x);

                  @ for(row(i):@ sum(col(j):a(i,j)*x(j)) <b(i));
                  @ for(col:@ gin(x));

                  @ for(col:@ bnd(0,x,99));
                  end





















             132
   137   138   139   140   141   142   143   144   145   146   147