R734 Philips Res. Repts 25,244-254,1970 AN INDEFINITE-QUADRATIC-PROGRAMMING MODEL FORA CONTINUOUS-PRODUCTION PROBLEM by F. A. LOOTSMA and J. D. PEARSON Abstract A model is presented for a problem of scheduling the lengths of N production periods on one machine, which will manufacture q products. The problem is to choose production periods so as to minimize the sum of inventory costs for the q products in the presence of given demands. Mathematically, the problem is one of minimizing an indefinite quadratic function subject to linear constraints. A numerical example concludes the paper. 1. Definitions Suppose there are q products, and these have sales rates SI and production rates PI> i = 1,..., q. The products are to be produced on one machine according to a sequence denoted by a, a -tuple of integers ai' a2,..., a, such that at the jth production period a product al' ~ al ::::;;q, is being produced. If al = 0 then the machine is idle. Given the production sequence a, the activity of the machine can be represented by an activity matrix A = [al}] such that al} is the rate of increase of product i in period j. The elements of A are clearly given by (1.1) where Ol,k denotes the Kronecker delta. Finally, a convention is adopted that the machine is idle after each production period, i.e. a2j = 0; j = 1, 2,..., N, (1.2) a2}+ I =j::. 0; j = O, 1, 2,..., N - 1. (1.3) This allows the possibility of enforcing a changeover-time constraint. With two products and six production periods a machine schedule is shown in fig. 1. In this case the sequence a is given by (1, 0, 2, 0, 1, 0). There are three production periods and three idle periods. The activity matrix takes on the form PI-SI -si, -SI -SI PI-SI -SI ). -S2 -S2 P2-S2 -S2 -S2 -S2 (
PROGRAMMING FOR CONTINUOUS-PRODUCTION PROBLEM 245 Product 1 Product2 Fig. 1. 5 6 - Period Let tj be the length of the jth period (j = 1,..., ) and let VI be the initial inventory level for the ith product (i = 1,..., q). Using the activity matrix it is evident that the inventory for product i at the end of any period j is given by J (1.4) VI + ~ alk t k ; = 1,...,. k= 1 2. The constraints on the problem The problem at hand, due to Van den Meerendonk 2), is to find the optimum production lengths i I, i 3,, i -I, the optimum idle times (2' i 4,.-., i, and the optimum initial inventories VI'..., V q, so as to minimize total holding cost over one cycle; production of the q products is arranged in a given, cyclic production sequence a = (al'..., a ) which is repeated indefinitely. In ref. 2, this problem is part of a mixed integer-nonlinear programming problem to find an optimum sequence a, an optimum time schedule i = (il' i 2,, i ), and optimum initial inventories VI>..., v q with the same objective. The constraints on the problem are as follows. (a) All variables (production lengths, idle times, initial inventories) are nonnegative. Production must be such that one can always deliver from stock. (b) The inventory at the end of each cycle, for each product, is the inventory for the beginning of the next cycle. Over each cycle, production equals sales exactly. (c) The total cycle time is T units; T is a given quantity. In what follows we take t and V to denote vectors with components ti,..., t and VI>, Vq, respectively. Mathematically, the restrictions may now be formulated in the following way. (a) The inventory for a product is clearly lowest just before the start of a production period. There are N production periods and for the first one the initial inventory is known and equal to VUI' constrained to be nonnegative. Hence, there are N - 1 additional constraints: the inventory to be produced in period 2j + 1, designated giv,t) is nonnegative (j = 1, 2,..., N -1). Thus,
246 F. A. LOOTSMA and J. D.PEARSON 2j gj(v,t) = Vm + ~ amk tk ~ 0; m = 0"2j+1; j = 1,2,..., N -1. (2.1) k=l (b) The inventory at the end of the cycle of periods is given by V, + ~ a,k tk; i = 1,..., q. k=1 Because the next cycle starts with inventory v, for product i, the excess of production over sales given by the term must be zero. However, it is sometimes advantageous to be able to replace an equality constraint by an inequality constraint so as to enlarge the initial set of feasible solutions. In this case note that if the production of product i exceeds sales, then production can always be reduced feasibly by decreasing the length ofthe last production time for product i and increasing the following slack time. Since this procedure reduces the inventory cost for product i, the set of q inequality constraints gn+i(v,t) = ~ a,k tk ;;?; 0; i = 1,..., q, k=1 (2.2) will suffice to enforce the equality of production and sales, giving inventory v, at the end of each cycle as desired. (c) Finally, the total length of the N production periods and the N idle periods must be T time units, whence ~ t j = T. j= 1 (2.3) This completes the description of the constraints, which are clearly all linear. 3. The objective function Suppose that the holding cost for the inventory of product i is C, per unit, per unit time. The total holding cost is C, times the area under the inventory. curve (see fig. 2) and this can be computed in terms of the t/s as follows. At the start of the jth period the inventory W'J of product i can be written as j-l W'J = V, + ~ a,k tk. k=l (3.1) After period j it stands (see fig. 3) at level B (if al) < 0, product i not produced) or at level A (if al) > 0, product i is produced in period j). It follows
PROGRAMMING FOR CONTINUOUS-PRODUCTION PROBLEM 247 Inventory product i r Inventory ""dl' ; tj tj+1 tj+2 tj+3 tj+4 tj+5 Fig.2. Fig.3. I. tj from the diagram that the area of the figure of width tj, under either OB or OA, is given by j-1~ (v, + ~ a'k tk) tj k=1 +!al} ti, so that the total area and cost over periods of production and idle time is given by j-i C, ~ u-. + ~ a,k tk) tj + tal} ti] j= 1 k= 1 The cost of holding q products is the sum over i of the terms above. Thus, the objective function can be written as '" j-i f(v,t) = ~ c, ~ [(v, + ~ a'k Ik) tj + tal} t/j. '=1 j=l k=1 (3.2), This is a quadratic function. We demonstrate by an example that its matrix of second-order partial derivatives is indefinite. The quantities WI} defined by (3.1) have derivatives ()WI} _ f all' I ~j - 1, bi; - to, t» j -1, ()WI} --= 011' ()V,
248 F. A. LOOTSMA and J. D. PEARSON In terms of wij the objective function takes on the form q j(v,/) = ~ Cl ~ (wij IJ + tal) 1/), 1=1 J=1 from which the derivatives can be calculated. This yields "Dj -= Cl ~ IJ, "Dvl J=1 "Dj a - = ~ Cl (Wil + all 2: Ik). "DI, 1=1 k=l Finally, the second-order derivatives are "D2j ---=Ch "Dv i "DIJ "D2j q ---=~Clall; k :»]. "DIk "Dt l 1=1 For q = 2 and N = 2 the resulting matrix of second-order partial derivatives has the structure 2: Cl all 2: Cl all ~ Cl all ~ Cl all Cl C2 2: Cl all 2: Cl al2 ~ Cl al2 2: Cl al2 Cl C2 2: Cl all ~ Cl al2 ~ Cl al3 ~ Cl al3 Cl C2 2: Cl all 2: Cl al2 ~ Cl al3 2: Cl al4 Cl C2... -... o 0 o 0 The activity matrix A can, for instance, be written as ( P1 -SI -SI -St -SI). -S2 -S2 P2 -S2 -S2 Let us choose SI = S2 = 1, P1 = P2 = 4, and Cl = C2 = 1. Then 2: Cl all = 2, 2: Cl al2 = -2, 2: Cl al3 = 2, 2: Cl al4 = -2. It can then be verified that the above matrix of second-order partial derivatives must be indefinite (its diagonal elements alternate in sign). 4. Problem formulation The final description of the problem is: given the number q of products, the number N ofproduction periods, the cycle time T, the sequence a = (al'..., a), sales rates SI> i = 1,...,q, production rates Ph i = 1,..., q, and hold- ".
PROGRAMMING FOR CONTINUOUS-PRODUCTION PROBLEM 249 ing costs Cl> i = 1,..., q per unit and per unit time, minimize the total holding cost q j-l f(v,t) = 1~1 C, j~1 [(VI +k~1 a,k tk) tj + t al) III subject to the constraints V, ~ 0, i = 1,, q, Ij ~ 0, j = 1,,, 2j giv,t) = Vm + ~ amk Ik ~ 0, m = (121+ 1, j = 1,2,..., N - 1, k= 1 gn(v,/) = ~ Ij-T= 0, j=1 gn+i(v,/) = ~ al) tj ~ 0, i = 1,..., q. j=1 This is an indefinite-quadratic-programming problem in + q variables and N + q constraints. 5. Kubn- Tucker relations Turning to the derivatives of the constraints we find the following. For the gj' j = 1, 2,..., N - 1, it must be true that For the time constraint we have è)gj = ~ami' I:::;; 2j, m = (121+1' è)/,? 0, I > 2j, è)gj = ~1, i = (121+1> è)v, (0, i =1= (121+1' è)gn - = 1, j = 1, 2,...,, è)tj è)gn - = 0, i = 1,..., q. è)v, For the initial-inventory constraints we find è)gn+1 -- = al), i = 1,...,q, j = 1, 2,...,, è)l j è)gn+1. -- = 0, l = 1,...,q, k = 1,..., q. è)vk Let (v,f) denote a local minimum solution of the problem. The Kuhn-Tucker
250 F. A. LOOTSMA and J. D. PEARSON conditions for optimality dictate that under first-order, regularity conditions (satisfied here since the constraints are linear) there exist multipliers À1>, À N + q such that ÀJ ~ 0, j = 1,..., N - 1, N + 1,..., N + q, 'öf (v, f) N-1 'ög J q --- ~ ~ - ÀJ + AN + ~ a,k AN+h k = 1,2,...,, 'öt k J= 1'öt k 1= 1 'öf(v,f) N-1. --- ~ ~ ÀJ (j'n" m = 0'2J+1> i = 1,..., q. 'öv, J=1 Using the last q equations and the complementary slack relations, then if V, ~ we must have bf (v,f) N-1 --- = C, ~ ik = C, T = ~ ÀJ (j,m' 'öv, k= 1 J= 1 Thus, for example, if product i is produced in the periods 2j + 1 and 2k + 1, and the initial inventory is non-zero, then AJ + Àk = C, T. This provides a simple optimality check. It is not clear that the Kuhn- Tucker conditions provide further results without additional simplifying assumptions, such as assuming that all the constraints are binding. 6. Numerical example The general case of the problem has been programmed and the results to follow were generated by a test problem obtained by the substitutions N = 12, q = 6, T = 1; 0' = (1,0,2,0,5,0,4,0,6,0,4,0,6,0,5,0,1,0,2,0,3,0,2,0); S, = 1; i = 1,, 6; P, = 30; i = 1,,6; C,= i; i=i,,6. The initial (feasible) solution was taken to be tj = 1/( - 2); j = 1,2,..., ; V, = 1; i = 1,..., q. With these values the total holding cost can be calculated to be fa = 43 2335 units. The method employed for solving the problem is the logarithmic barrierfunction technique (see Lootsma 1) and Pearson 4». Sequential unconstrained
PROGRAMMING FOR CONTINUOUS-PRODUCTION PROBLEM 251 TABLE I Computer solution of production problem. Production periods, idle times, arid initial inventories variable production periods idle times initial inventories 1 0 018729 2 0 000000 3 0 018591 4 0 000000 5 0 016938 6 0 000000 7 0 015166 8 0 000000 9 0 015266 10 0 424542 11 0 018168 f 12 0 000000 13 0 018068 14 0 000000 15 0 016395 16 0 000000 17 0 014605 18 0 000000 19 0 007371 20 0 112166 31 0 033333 22 0 068261 23 0 007371 24 0 195032 - v 1 0 000000 2 0 018729 3 0 696003 4 0 054258 5 0 037320 6 0 069424
252 F. A. LOOTSMA and J. D. PEARSON TABLE II Computer solution of production problem. Lagrangian multipliers multiplier corresponding to 1 0 438546 2 2 459115 3 2'162329 4 3 263996 5 1 837607 6 2 735952 7 2 540792 8 0 538607 9 1-119016 10 2 999993 11 0 442261 intermediate inventories ~O.... ~.~J ~.~.:~.~~.~.~. total time = T 13 0 445991 14 0 389846 15 0 804337 excess production 16 1 901565 over sales ~ 0 17 2 216154 18 2 755335. minimization was carried out with Newton's method and with the DFP algorithm due to Davidon, Fletcher and Powell. For the problem at hand Newton's method appears to be much more efficient. After 21 minimization cycles (starting with r = 1 and a reduction factor of 0'5) and 79 iterations it produced the results listed in tables I and II; the corresponding value of the objective function is j(v,f) = 5 73401 units. All the constraints are active at this solution. A similar, slightly less accurate result was produced b~ the DFP algorithm in 7 minimization cycles and 400
PROGRAMMING FOR CONTINUOUS-PRODUCTION PROBLEM 253 iterations (starting with r = 0 1 and a reduction factor of 10-1/3 ). The optimality checks for the multiplier values listed. in table II become Al + A9 + All = 1'99982, AlO = 2'99999, A3 + A5 = 3'99994, }'2 A7 = 4'99991, A4 + A6 = 5'99995, C2 = 2, C3 = 3, C4.= 4, Cs = 5, C6 = 6. A word or two of explanation is included. The production times ib i 3, are all non-zero and these represent the fractions of the total time, which are used for production. The slack times i 2, i 4, are mostly zero, with one or two exceptions. Some of the slacks are large, but this only represents the excess of total time over production time required by the demand. The minimization algorithm has the effect of moving the six inventory graphs, similar to fig. 2, sideways relative to one another. The excess time is forced into one or more of the slacks, rather than into them all. The multipliers are the sensitivities of the final solution cost to small violations of the constraints, giving directly the effect of the constraint on the problem. The solution shows that the optimum found corresponds to having the inventory for each product zero, just before the start of the production period. Thus it can be seen that the 11 inventory constraints are all binding. Using this fact the production periods can be eliminated from the problem. If the total time is contracted to equal the production time, then the slack periods will all be zero and the problem can be solved directly for the production periods without any optimization. Finally, it is worth remarking that this problem is of interest because it shows that (a) indefinite quadratic programs actually occur in reallife; it must be remarked that other problems of this kind do exist; the graph of "waiting time" in a traffic network as a function of the red/green phases leads to a sawtooth shape similar to the inventory here; this suggests another possible application; (b) conventional methods will find a solution, despite the violation of many of their basic assumptions; it need not, however, be a global solution; (c) general methods can be successfully applied to problems for which special methods were designed (see Murray 3)); in a later phase of the research one could resort to such a special method, if the problem has to be solved rapidly and frequently; in an earlier stage, if such a special programme is not available, a general programme may be helpful. Eindhoven, June 1970
254 F. A. LOOTSMA and J. D. PEARSON REFERENCES 1) F. A. Lootsma, Boundary properties of.penalty functions for constrained minimization, Philips Res. Repts Suppl. 1970, No. 3. 2.) H. W. van den Meerendonk, A multi-product planning problem, Thesis (in Dutch, with a summary in English) to be presented at the Delft Technological University, 1970. 3) W. Murray, Indefinite quadratic programming, National Physical Laboratory, Teddington (UK), April 1969. 4) J. D. Pearson, A manual.for SUMT 70, to appear shortly.