用lingo实现,y(i)=y(j)时,x(i)不等于x(j)?
来源:学生作业帮 编辑:大师作文网作业帮 分类:综合作业 时间:2024/11/18 08:58:50
用lingo实现,y(i)=y(j)时,x(i)不等于x(j)?
大哥大姐们:
请问用lingo如何实现y(i)=y(j)时,x(i)不等于x(j)?
lingo有这个功能吗?
我试过了,但是不行,我的现有程序是:
MODEL:
data:
M=7;
enddata
sets:
demand/1..m/:p,a,d,x,y;
ob/1..m/:w;
endsets
data:
p=5,3,5,6,7,12,8;
a=3,4,4,1,5,8,8;
d=5,6,6,3,7,9,10;
enddata
[OBJ] min=@sum(demand(i):2*@abs(x(i)-p(i))+3*@abs(y(i)-a(i)));
@for(demand(i):
y(i)>a(i);
y(i)1);
@for(demand(i):@gin(x(i)));
@for(demand(i):@gin(y(i)));
end
怎么用程序表示当y相同时,x不同?
大哥大姐们:
请问用lingo如何实现y(i)=y(j)时,x(i)不等于x(j)?
lingo有这个功能吗?
我试过了,但是不行,我的现有程序是:
MODEL:
data:
M=7;
enddata
sets:
demand/1..m/:p,a,d,x,y;
ob/1..m/:w;
endsets
data:
p=5,3,5,6,7,12,8;
a=3,4,4,1,5,8,8;
d=5,6,6,3,7,9,10;
enddata
[OBJ] min=@sum(demand(i):2*@abs(x(i)-p(i))+3*@abs(y(i)-a(i)));
@for(demand(i):
y(i)>a(i);
y(i)1);
@for(demand(i):@gin(x(i)));
@for(demand(i):@gin(y(i)));
end
怎么用程序表示当y相同时,x不同?
改了一点,在逻辑上没有问题,但是就不是线性模型了,用全局最优器解.
你看看吧!
MODEL:
data:
M=7;
enddata
sets:
demand/1..m/:p,a,d,x,y;
ob/1..m/:w;
link(demand,demand):aa;
endsets
data:
p=5,3,5,6,7,12,8;
a=3,4,4,1,5,8,8;
d=5,6,6,3,7,9,10;
enddata
[OBJ] min=@sum(demand(i):2*@abs(x(i)-p(i))+3*@abs(y(i)-a(i)));
@for(demand(i):
y(i)>a(i);
y(i)1);
@for(demand(i):@gin(x(i)));
@for(demand(i):@gin(y(i)));
@for(demand(i):
@for(demand(j)|j #ne# i:x(i)+y(i)=x(j)+y(j)+aa(i,j)));
@for(demand(i):
@for(demand(j):@free(aa(i,j))));
@for(link:
@free(aa));
@for(link:aa*aa>0);
end
你看看吧!
MODEL:
data:
M=7;
enddata
sets:
demand/1..m/:p,a,d,x,y;
ob/1..m/:w;
link(demand,demand):aa;
endsets
data:
p=5,3,5,6,7,12,8;
a=3,4,4,1,5,8,8;
d=5,6,6,3,7,9,10;
enddata
[OBJ] min=@sum(demand(i):2*@abs(x(i)-p(i))+3*@abs(y(i)-a(i)));
@for(demand(i):
y(i)>a(i);
y(i)1);
@for(demand(i):@gin(x(i)));
@for(demand(i):@gin(y(i)));
@for(demand(i):
@for(demand(j)|j #ne# i:x(i)+y(i)=x(j)+y(j)+aa(i,j)));
@for(demand(i):
@for(demand(j):@free(aa(i,j))));
@for(link:
@free(aa));
@for(link:aa*aa>0);
end
用lingo实现,y(i)=y(j)时,x(i)不等于x(j)?
lingo 不等于例如:xi不等于xj(i,j=1,2,3,4,5)其中i不等于j用lingo怎么编写程序.sets:v
LINGO中执行当Z(i,j)=2时,X(i,j)=0或者1,怎么写,
x(i,j),y(i,j)都是3*4的矩阵,z是4*4矩阵,怎么用lingo表示约束条件:x(i,j)+z(i-1,j)
lingo中当x(i,j)=1,则y(i)=1怎么编
lingo中如何实现x(i,j)+x(i,j+1)
已知向量OA=3i-4j,OB=6i-3j,OC=(5-m)i-(4+m)j,其中i、j分别是直角坐标系内x轴与y轴正方
设x,y∈R,i、j为直角坐标平面内x、y轴正方向上的单位向量,向量a=xi+(y+2)j,b=xj+(y-2)j,|a
已知运动方程,r(t)=x(t)i+y(t)j
设 i,j是平面直角坐标系中x轴、y轴方向上的单位向量,且a=(m+1)i-3j、
matlab如何定义如下命令:如果x(i,j)=0,则y(i,j)=0,如果x(i,j)>0,则y(i,j)=1
已知两恒力F1=i+2j,F2=4i-5j(其中i、j分别是x轴、y轴上的单位向量)作用于同一质点,使之由点A(20,1