请问一个LINGO求解混合整数规划问题?我这建了一个数学模型,从8个供应商选择几个进行订货,X为订货量,Y为0-1变量,选择时为1不选时为0.用LINGO编程,运行时显示错误为:unexpected jacobian overflow.我
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/07 18:33:44
请问一个LINGO求解混合整数规划问题?我这建了一个数学模型,从8个供应商选择几个进行订货,X为订货量,Y为0-1变量,选择时为1不选时为0.用LINGO编程,运行时显示错误为:unexpected jacobian overflow.我
请问一个LINGO求解混合整数规划问题?
我这建了一个数学模型,从8个供应商选择几个进行订货,X为订货量,Y为0-1变量,选择时为1不选时为0.用LINGO编程,运行时显示错误为:unexpected jacobian overflow.我的程序如下,我是初学者,
model1:
SETS:
m/p1,p2,p3,p4,p5,p6,p7,p8/:y,x,w,v,q,t;
ENDSETS
DATA:
w=0.233,0.544,0.329,0.780,0.533,0.454,0.762,0.303;
v=4000,2500,3500,1800,2500,2600,1800,2500;
q=0.022,0.015,0.024,0.032,0.02,0.018,0.03,0.02;
t=0.04,0.015,0.025,0,0.015,0.02,0.01,0.02;
D=5000;
Q=0.025;
t=0.025;
n=4;
ENDDATA
The objective;
max=@sum(m(j):v(j)*x(j));
The capacity constraints;
@for(m(j):x(j)≤v(j)*y(j));
The demand constraints;
@sum(m(j):x(j))≥D;
The quality constraints;
@sum(m(j):x(j)*q(j))≤Q*D;
The time constraints;
@sum(m(j):x(j)*t(j))≤T*D;
The number of suppliers constraints;
@sum(m(j):y(j))≤4;
@for(m(j):@bin(y(j)));
@for(m(j):@gin(x(j)));
end
请问一个LINGO求解混合整数规划问题?我这建了一个数学模型,从8个供应商选择几个进行订货,X为订货量,Y为0-1变量,选择时为1不选时为0.用LINGO编程,运行时显示错误为:unexpected jacobian overflow.我
model: SETS: m/p1,p2,p3,p4,p5,p6,p7,p8/:y,x,w,v,q,t; ENDSETS DATA: w=0.233,0.544,0.329,0.780,0.533,0.454,0.762,0.303; v=4000,2500,3500,1800,2500,2600,1800,2500; q=0.022,0.015,0.024,0.032,0.02,0.018,0.03,0.02; t=0.04,0.015,0.025,0,0.015,0.02,0.01,0.02; D=5000; Q1=0.025; t1=0.025; n=4; ENDDATA !The objective; max=@sum(m(j):v(j)*x(j)); !The capacity constraints; @for(m(j):x(j)=D; !The quality constraints; @sum(m(j):x(j)*q(j))