Lingo与一般整数规划问题

Lingo与一般整数规划问题

这里写图片描述

代码如下:

model:
sets:
  time/x1..x8/: required,start;
endsets
data:
  !每天所需的最少职员数;
  required = 10 8 9 11 13 8 5 3; 
enddata
!最小化每周所需职员数;
  min=@sum(time: start);
  @for(time (J):
    @sum(time(I) | I #le# 4:
      start(@wrap(J+I+2,8))) >= required(J));
end

猜你喜欢

转载自blog.csdn.net/Joycezzz/article/details/81743685
今日推荐