lingo线性规划问题,x约束写的是取[0,1]直接任意小数,为什么得到的可行解都是取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
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
lingo是怎么找可行解的 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询