lingo解线性规划问题,x约束写的取[0,1]直接任意小数,得到的是整数解,怎么求小数解?下面是代码,谢谢
lingo代码:MODEL:SETS:Dnode/1..3/;Vnode/1..5/;link(Dnode,Vnode):time,x;ENDSETSDATA:t=10;...
lingo代码:
MODEL:
SETS:
Dnode/1..3/;
Vnode/1..5/;
link(Dnode,Vnode):time,x;
ENDSETS
DATA:
t = 10;
time =
10 19 28 10 10
20 10 19 19 19
19 19 19 10 10
;
ENDDATA
@for(Dnode(I):
@sum(Vnode(J):x(I,J))=1);
@for(Vnode(J):
@sum(Dnode(I):x(I,J)) <= 1);
@for(link:x*(t-time) >= 0);
@for(link:x*(2*t-time) >= 0);
@for(link:@bnd(0,x,1.00));
END 展开
MODEL:
SETS:
Dnode/1..3/;
Vnode/1..5/;
link(Dnode,Vnode):time,x;
ENDSETS
DATA:
t = 10;
time =
10 19 28 10 10
20 10 19 19 19
19 19 19 10 10
;
ENDDATA
@for(Dnode(I):
@sum(Vnode(J):x(I,J))=1);
@for(Vnode(J):
@sum(Dnode(I):x(I,J)) <= 1);
@for(link:x*(t-time) >= 0);
@for(link:x*(2*t-time) >= 0);
@for(link:@bnd(0,x,1.00));
END 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询