以下是一个用proc lp 解决的scheduling problem:
我不明白的是hour{i}=hour的含义和作用
以及在build the objective function 过程中是怎么实现i和slot的循环
retain在这个程序中的具体作用是什么?
求高手解答

万分感谢!
需要解决一个scheduling problem 原问题如下:
you have eight one-hour time slotsin each of five days. You have to assign four people to these time slots sothat each slot is covered on every day. You allow the people to specifypreference data for each slot on each day. In addition, there are constraintsthat must be satisfied:Each person has some slots for which they are unavailable.
Each person must have either slot 4 or 5 off for lunch.
Each person can work only two time slots in a row.
Each person can work only a specified number of hours in the week.
建立了如下的数学模型:
preference data 和解答的程序如下: