lingo模型定义不正确 求帮忙!MIN = @SUM( LINKS(I, J): COST(I, J) * VOLUME(I, J))+@SUM(AGENCY(I)|DEMAND(I)#GT#(CAPACITY(I)-@SUM(AGENCY(J):VOLUME(I,J))+@SUM(AGENCY(J):VOLUME(J,I))):DEMAND(I)-(CAPACITY(I)-@SUM(AGENCY(J):VOLUME(I,J))+@SUM(AGENCY

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/15 14:53:00
lingo模型定义不正确 求帮忙!MIN = @SUM( LINKS(I, J):  COST(I, J) * VOLUME(I, J))+@SUM(AGENCY(I)|DEMAND(I)#GT#(CAPACITY(I)-@SUM(AGENCY(J):VOLUME(I,J))+@SUM(AGENCY(J):VOLUME(J,I))):DEMAND(I)-(CAPACITY(I)-@SUM(AGENCY(J):VOLUME(I,J))+@SUM(AGENCY
xN@_e +EP )B5)H"PI1r'

lingo模型定义不正确 求帮忙!MIN = @SUM( LINKS(I, J): COST(I, J) * VOLUME(I, J))+@SUM(AGENCY(I)|DEMAND(I)#GT#(CAPACITY(I)-@SUM(AGENCY(J):VOLUME(I,J))+@SUM(AGENCY(J):VOLUME(J,I))):DEMAND(I)-(CAPACITY(I)-@SUM(AGENCY(J):VOLUME(I,J))+@SUM(AGENCY
lingo模型定义不正确 求帮忙!
MIN = @SUM( LINKS(I, J): COST(I, J) * VOLUME(I, J))+@SUM(AGENCY(I)|DEMAND(I)#GT#(CAPACITY(I)-@SUM(AGENCY(J):VOLUME(I,J))+@SUM(AGENCY(J):VOLUME(J,I))):DEMAND(I)-(CAPACITY(I)-@SUM(AGENCY(J):VOLUME(I,J))+@SUM(AGENCY(J):VOLUME(J,I))))*LOST(I);
错误应该是这一句
SETS:
AGENCY/Wh1..Wh20/: CAPACITY,DEMAND,LOST;
LINKS( AGENCY, AGENCY): COST, VOLUME;
ENDSETS
求帮忙看下是什么问题
测验后发现是
@SUM(AGENCY(I)|(DEMAND(I)-(CAPACITY(I)-@SUM(AGENCY(J):VOLUME(I,J))+@SUM(AGENCY(J):VOLUME(J,I)))#GT#0:
(DEMAND(I)-(CAPACITY(I)-@SUM(AGENCY(J):VOLUME(I,J))+@SUM(AGENCY(J):VOLUME(J,I)))*LOST(I));
中的条件不对 好像不能带有变量?是这样吗

lingo模型定义不正确 求帮忙!MIN = @SUM( LINKS(I, J): COST(I, J) * VOLUME(I, J))+@SUM(AGENCY(I)|DEMAND(I)#GT#(CAPACITY(I)-@SUM(AGENCY(J):VOLUME(I,J))+@SUM(AGENCY(J):VOLUME(J,I))):DEMAND(I)-(CAPACITY(I)-@SUM(AGENCY(J):VOLUME(I,J))+@SUM(AGENCY
@sum后面一定要带冒号的