max: 20 x1 + 6 x2 + 8 x3; 0.8 x1 + 0.2 x2 + 0.3 x3 <=20; 0.4 x1 + 0.3 x2 <= 10 ; 0.2 x1 + 0.1 x3 <= 5 ; int x1, x2, x3 ;As noted earlier, this gives an optimum of 524 and 14, 14 and 20 batches of A, B and C respectively.
Suppose however we require to schedule on a daily rather than a weekly basis. The modified problem now has smaller values for the time constraints as shown in the model below. (The constraint of C production has also been removed.)
max: 20 x1 + 6 x2 + 8 x3; 0.8 x1 + 0.2 x2 + 0.3 x3 <=4; 0.4 x1 + 0.3 x2 <= 2 ; 0.2 x1 + 0.1 x3 <= 1 ;For the MILP formulation the additional line is also required:
int x1, x2, x3 ;The solution as an LP gives an optimum (for a day's production) of 111.111 with only B (6.667 batches) and C (8.889 batches) being made (i.e no A at all).
However, rounding neither up or down on either of these numbers gives the optimal integer solution which is no A, 5 batches of B and 10 of C, with an of of 110.
It can be seen that the assignment involves full utilisation of both reactor (total 4 hours) and centrifuge (total 1 hour). Suppose that the period of operation is a 4 hour slot, with the reactor continuously available, and the centrifuge available `on demand' at any time so long as its total utilisation does not exceed 1 hour.
The schedule will then be determined by the availability of the crystalliser. If this is for 4 half hour slots every hour starting after the first half hour, then it is clear that 5 batches of B cannot be produced. Some reactor time may also be lost from the need to synchronise the end of reaction with the start of crystallisation.
Fitting all these constraints together is another MILP problem where the o.f. may be either profit maximisation or maximum equipment utilisation. Setting up such problems is substantially harder than those so far described, and so will be regarded as beyond the scope of this course!
Empirically determined, the following schedule seems to be the only feasible
one, even assuming on demand availability of the centrifuge, which
greatly simplifies the problem:
C1 B1 C2 C3 C4 B2 C5 C6 C7 B3 C8 C9 B4 C10 (0.2 hours slack on both
reactor and crystalliser)