Lingo部分编程问题SETS:BUILDING/B1..B87/:DEMAND;POINT/P1..P100/:MAXCAPACITY;LINKS(BUILDING,POINT):DISTANCE,CAPACITY;此处补充两条语句语句一:目标函数为CAPACITY之和最小语句二:CAPACITY与对应的DISTANCE相乘的积累加
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/15 05:57:22
Lingo部分编程问题SETS:BUILDING/B1..B87/:DEMAND;POINT/P1..P100/:MAXCAPACITY;LINKS(BUILDING,POINT):DISTANCE,CAPACITY;此处补充两条语句语句一:目标函数为CAPACITY之和最小语句二:CAPACITY与对应的DISTANCE相乘的积累加
Lingo部分编程问题
SETS:
BUILDING/B1..B87/:DEMAND;
POINT/P1..P100/:MAXCAPACITY;
LINKS(BUILDING,POINT):DISTANCE,CAPACITY;
此处补充两条语句
语句一:目标函数为CAPACITY之和最小
语句二:CAPACITY与对应的DISTANCE相乘的积累加为0
@FOR(POINT(J):
@SUM(BUILDING(I):CAPACITY(I,J))=DEMAND(I));
DATA部分我自己补充
Lingo部分编程问题SETS:BUILDING/B1..B87/:DEMAND;POINT/P1..P100/:MAXCAPACITY;LINKS(BUILDING,POINT):DISTANCE,CAPACITY;此处补充两条语句语句一:目标函数为CAPACITY之和最小语句二:CAPACITY与对应的DISTANCE相乘的积累加
相加为0的条件很奇怪
SETS:
BUILDING/B1..B87/:DEMAND;
POINT/P1..P100/:MAXCAPACITY;
LINKS(BUILDING,POINT):DISTANCE,CAPACITY;
ENDSETS
MIN=@SUM(LINKS:CAPACITY);
@SUM(LINKS:DISTANCE*CAPACITY)=0;
@FOR(POINT(J):
@SUM(BUILDING(I):CAPACITY(I,J))=DEMAND(I));