At this point the problem is getting interesting if we add capacity requirements. Suppose that all machines work 10 hour per days, 5 days a week and we would like to manufacture all products within 10 weeks. Is this possible? This problem is all but easy to solve. In fact, we might use the same model as before with the additional constraints that no machine should work more than 500 hours and still we want to minimize costs.
This additional constraint can be formulated as follows:
The formulation of this model in LPL is as following (see exercise2b for a complete code):
....
integer variable QQ{f,q};
constraint CA{p}: sum{f,m} QQ = sum{f,m} Q;
CB{m,f}: sum{p} H*QQ <= 500;
minimize obj1: sum{f,p,m} H*Mc * QQ;
....
The new assigned (optimal, that is “cost minimal”) production plan QQ is now as follows:


The following table give the occupation of each machine with this production plan:

We see that no machine exceeds the occupation time of 500 hours. All products will be manufactured within 10 weeks.
Still some machine are not at their capacity limit and some are still idle. Could we reduce the overall production time and to what extend? The most simple way to do this is to experiment with the maximal occupation time. Very quickly we find that we can reduce that time up to 330 hours, which means that the production can be terminated within less than 7 weeks. The corresponding production plan now is as follows:


The following table give the occupation of each machine with this production plan:

As we can see, all machine work almost at 100% of 330 hours. However, the total machine costs are now 21004, 4998 units over the minimal costs of 16006, found in the previous model. This is the price we have to pay for a more balanced machine occupation.