残红星醉 发表于 2012-8-8 13:05

lingo出现unexpected jacobian overflow

lingo程序总是出现unexpected jacobian overflow的错误,不知为什么?
                       我的程序为:
model:
title location problem;
sets:
  demand/1..6/:a,b,d;
  supply/1..2/:x,y,e;
  link(demand,supply):c;
ENDSETs
data:
  a=1.25,8.75,0.5,5.75,3,7.25;
  b=1.25,0.75,4.75,5,6.5,7.75;
  d=3,5,4,7,6,11;
  e=20,20;
enddata
init:
  x,y=5,1,2,7;
endinit
min=@sum(link(i,j):c(i,j)*((a(i)-x(j))^2+(y(j)-b(i))^2)^(1/2));
@for(demand(i): @sum(supply(j):c(i,j)) =d(i););
@for(supply(i): @sum(demand(j):c(j,i)) <=e(i););
   @for(supply: @bnd(0.5,X,8.75); @bnd(0.75,Y,7.75); );

end

                                                           答案标准程序为:
MODEL:
Title Location Problem;
sets:
     demand/1..6/:a,b,d;
    supply/1..2/:x,y,e;
    link(demand,supply):c;
endsets
data:
!locations for the demand(需求点的位置);
a=1.25,8.75,0.5,5.75,3,7.25;
b=1.25,0.75,4.75,5,6.5,7.75;
!quantities of the demand and supply(供需量);
d=3,5,4,7,6,11; e=20,20;
enddata
init:
!initial locations for the supply(初始点);
x,y=5,1,2,7;
endinit
!Objective function(目标);
min=@sum(link(i,j): c(i,j)*((x(j)-a(i))^2+(y(j)-b(i))^2)^(1/2) );
!demand constraints(需求约束);
@for(demand(i): @sum(supply(j):c(i,j)) =d(i););
!supply constraints(供应约束);
@for(supply(i): @sum(demand(j):c(j,i)) <=e(i); );
@for(supply: @bnd(0.5,X,8.75); @bnd(0.75,Y,7.75); );
END

请问下各位大侠,我的程序哪儿出错了?和答案程序有什么不同?

shaox 发表于 2012-8-8 14:19

意想不到的雅可比溢出
有些字母要大写

残红星醉 发表于 2012-8-8 15:07

shaox 发表于 2012-8-8 14:19 static/image/common/back.gif
意想不到的雅可比溢出
有些字母要大写

lingo不是不区分大小写吗?
页: [1]
查看完整版本: lingo出现unexpected jacobian overflow