Lingo里出现Model is ill defined
问题描述:
Lingo里出现Model is ill defined
!就是有A到J个任务,所需要的时间放在Time中,总共有4个相同机器,choose中放置所选机器编号(1~4),问如何放置,总时间最短;
MODEL:
SETS:
TASK/ A B C D E F G H I J K/: Time,choose;
ENDSETS
DATA:
Time =4511950151212121289;
ENDDATA
min=total;
@for(task(i)|i#le#4:@sum(task(j)|choose(j)#eq#i:Time)
答
sets:A/A B C D E F G H I J K/:Time;B/1..4/;links(B,A):x;endsetsdata:Time = 45 11 9 50 15 12 12 12 12 8 9;@text()=' x';@text()=@table(x);enddatamin=total;@for(links:@bin(x));@for(A(j):@sum(B(i):x(i,j))...