• No results found

Production of drinking glasses

The main activity of a company in northern France is the production of drinking glasses. It currently sells six different types (V1 to V6), that are produced in batches of 1000 glasses, and wishes to plan its production for the next 12 weeks. The batches may be incomplete (fewer than 1000 glasses). The demand in thousands for the 12 coming weeks and for every glass type is given in the following table.

Table 8.3:Demands for the planning period (batches of 1000 glasses)

Week 1 2 3 4 5 6 7 8 9 10 11 12 V1 20 22 18 35 17 19 23 20 29 30 28 32 V2 17 19 23 20 11 10 12 34 21 23 30 12 V3 18 35 17 10 9 21 23 15 10 0 13 17 V4 31 45 24 38 41 20 19 37 28 12 30 37 V5 23 20 23 15 10 22 18 30 28 7 15 10 V6 22 18 20 19 18 35 0 28 12 30 21 23

For every glass type the initial stock is known, as well as the required final stock level (in thousands). Per batch of every glass type, the production and storage costs inBCare given, together with the required working time for workers and machines (in hours), and the required storage space (measured in numbers of trays).

The number of working hours of the personnel is limited to 390 hours per week, and the machines have a weekly capacity of 850 hours. Storage space for up to 1000 trays is available. Which quantities of the different glass types need to be produced in every period to minimize the total cost of production and storage?

Table 8.4: Data for the six glass types

Production Storage Initial Final Storage cost cost stock stock Timeworker Timemachine space

V1 100 25 50 10 3 2 4 V2 80 28 20 10 3 1 5 V3 110 25 0 10 3 4 5 V4 90 27 15 10 2 8 6 V5 200 10 0 10 4 11 4 V6 140 20 10 10 4 9 9

8.2.1

Model formulation

This problem is a generalization of the bicycle problem in Section8.1: we now have several products, each using the same resources.

To express the model in a simple way, we need to consider the time periods one after the other. Let

PRODS be the set of products (glass types) and WEEKS = {1, . . . , NT} the set of time periods. We write DEMptfor the demand for product p in time period t. These demands are given above in Table8.3. We also have CPRODpand CSTOCKpthe production and storage cost for glass type p. This cost is identical for all time periods, but it would be easy to model a different cost per time period by adding an index for the time period.

TIMEWpand TIMEMpdenote the worker and machine times respectively required per unit of product p, and correspondingly, SPACEp the storage area. The initial stock ISTOCKp is given, as is the desired final stock level FSTOCKpper product. All these data are listed in Table8.4above. We write CAPW and CAPM for the capacities of workers and machines respectively, and CAPS for the capacity of the storage area. To solve this problem, we need variables producept to represent the production of glass type p in time period t. The variables corresponding to the stock level of every product p at the end of period t are called storept. By convention, the initial stock level ISTOCKp may be considered as the stock level at the end of time period 0 and we use the notation storep0 to simplify the formulation of the stock balance constraints (8.2.1):

∀p ∈ PRODS, t ∈ WEEKS : storept= storep,t−1+ producept− DEMpt (8.2.1)

These stock balance constraints state that the quantity storeptof product that is held in stock at the end of a time period t equals the stock level storep,t−1at the end of the preceding period plus the production

produceptof the time period t minus the demand DEMptof this time period.

The company wishes to have a certain amount of product in stock at the end of the planning period. These constraints on the final stock levels are expressed by the constraints (8.2.2):

∀p ∈ PRODS : storep,NT ≥ FSTOCKp (8.2.2)

We now formulate the various capacity constraints for every time period. The following constraints guarantee that the capacity limits on manpower (8.2.3), machine time (8.2.4), and storage space (8.2.5) are kept:

∀t ∈ WEEKS : X p∈PRODS

TIMEWp· producept≤ CAPW (8.2.3)

∀t ∈ WEEKS : X p∈PRODS

TIMEMp· producept≤ CAPM (8.2.4)

∀t ∈ WEEKS : X p∈PRODS

SPACEp· producept≤ CAPS (8.2.5)

We may now formulate the cost function that is to be minimized (8.2.6). This function is the sum of production and storage costs for all products and time periods.

minimize X p∈PRODS

X

t∈WEEKS

CPRODp· producept+ CSTOREp· storept (8.2.6)

We obtain the complete mathematical model by combining lines (8.2.1) to (8.2.6), to which we need to add the non-negativity constraints for the production variables (8.2.13) and for the stored quantities

(8.2.14).

minimize X p∈PRODS

X

t∈WEEKS

CPRODp· producept+ CSTOREp· storept



(8.2.7)

∀p ∈ PRODS, t ∈ WEEKS : storept= storep,t−1+ producept− DEMpt (8.2.8)

∀p ∈ PRODS : storep,NT ≥ FSTOCKp (8.2.9)

∀t ∈ WEEKS : X p∈PRODS

TIMEWp· producept≤ CAPW (8.2.10)

∀t ∈ WEEKS : X p∈PRODS

TIMEMp· producept≤ CAPM (8.2.11)

∀t ∈ WEEKS : X p∈PRODS

SPACEp· producept≤ CAPS (8.2.12)

∀p ∈ PRODS, t ∈ WEEKS : producep,t≥0 (8.2.13)

∀p ∈ PRODS, t ∈ WEEKS : storep,t≥0 (8.2.14)

8.2.2

Implementation

The mathematical model may be implemented with Mosel as follows.

model "C-2 Glass production" uses "mmxprs"

declarations

NT = 12 ! Number of weeks in planning period WEEKS = 1..NT

PRODS = 1.. 6 ! Set of products

CAPW,CAPM: integer ! Capacity of workers and machines CAPS: integer ! Storage capacity

DEM: array(PRODS,WEEKS) of integer ! Demand per product and per week CPROD: array(PRODS) of integer ! Production cost per product CSTOCK: array(PRODS) of integer ! Storage cost per product ISTOCK: array(PRODS) of integer ! Initial stock levels FSTOCK: array(PRODS) of integer ! Min. final stock levels

TIMEW,TIMEM: array(PRODS) of integer ! Worker and machine time per unit SPACE: array(PRODS) of integer ! Storage space required by products produce: array(PRODS,WEEKS) of mpvar ! Production of products per week store: array(PRODS,WEEKS) of mpvar ! Amount stored at end of week end-declarations

initializations from ’c2glass.dat’

CAPW CAPM CAPS DEM CSTOCK CPROD ISTOCK FSTOCK TIMEW TIMEM SPACE end-initializations

! Objective: sum of production and storage costs Cost:=

sum(p in PRODS, t in WEEKS) (CPROD(p)*produce(p,t) + CSTOCK(p)*store(p,t)) ! Stock balances

forall(p in PRODS, t in WEEKS)

store(p,t) = if(t>1, store(p,t-1), ISTOCK(p)) + produce(p,t) - DEM(p,t) ! Final stock levels

forall(p in PRODS) store(p,NT) >= FSTOCK(p) ! Capacity constraints

forall(t in WEEKS) do

sum(p in PRODS) TIMEW(p)*produce(p,t) <= CAPW ! Workers sum(p in PRODS) TIMEM(p)*produce(p,t) <= CAPM ! Machines sum(p in PRODS) SPACE(p)*store(p,t) <= CAPS ! Storage end-do

! Solve the problem minimize(Cost) end-model

In the model formulation above as before we use theiffunction in the formulation of the stock balance constraints. It is also possible to employ the notation storep0 for the initial stock levels as in the mathe- matical model. Sincestoreis an array of variables, we still need to use the arrayISTOCKfor reading in the data from file and then fix the storage variables for time period 0 to these values (additional set of bound constraints):

declarations

store: array(PRODS,0..NT) of mpvar ! Amount stored at end of week end-declarations

! Stock balances

forall(p in PRODS, t in WEEKS)

store(p,t) = store(p,t-1) + produce(p,t) - DEM(p,t) ! Fix the initial stock levels

forall(p in PRODS) store(p,0) = ISTOCK(p)

In this model, it is easy to change the objective function, for instance to take into account only the production costs (first part of the objective) or the storage costs (second part of the objective)

Remark: in the implementation of this model, it may be tempting to define names like prod for the production variables or PROD for the set of products, but both these names cannot be used because prodis a keyword of the Mosel language (see the complete list of reserved words in Section5.2.3).

8.2.3

Results

The solution of this problem gives us a total cost ofBC185,899.

Table8.5displays the quantities of the different glass types to produce in every week of the planning period and the quantities held in stock at the end of every week. Some production and storage quantities are fractional but every unit corresponds to 1000 glasses. We may therefore round the results to three digits after the decimal point to obtain a result with integral numbers of glasses without modifying the total cost too much.

Taking for example the quantities to be produced in the first period: 8,760 glasses of type 1, 18,000 glasses of type 3, 16,000 glasses of type 4, 47,680 glasses of type 5, 12,000 glasses of type 6 and none of type 2 (the demand for this type is covered by the initial stock). When looking at the constraints in more detail, we find that the available manpower is fully used most of the time (in the first week, 351 hours are worked, in all other weeks the limit of 390 hours is reached) and the machines are used to their full capacity in certain time periods (weeks 1-3 and 5), but the available storage space is in excess of the actual needs.

Table 8.5:Quantities to produce and store of every glass type (in thousands)

Week 1 2 3 4 5 6 7 8 9 10 11 12 1 Prod. 8.76 5.48 0.56 30.2 27.36 8.64 23 20 29 30 28 42 Store 38.76 22.24 4.8 - 10.36 – – – – – – 10 2 Prod. 0 16 23 20 11 10 12 34 21 23 30 22 Store 3 – – – – – – – – – – 10 3 Prod. 18 35 17 10 9 21 23 15 10 0 13 27 Store – – – – – – – – – – – 10 4 Prod. 16 45 24 38 41 20 19 37 28 12 30 47 Store – – – – – – – – – – – 10 5 Prod. 47.68 14.64 35.08 14.35 23.48 22.77 43.75 0 26.5 2.75 0 0 Store 24.68 19.32 31.4 30.75 44.23 45 70.75 40.75 39.25 35 20 10 6 Prod. 12 18 20 19 18 35 0.75 27.25 12 49 29.25 5.75 Store – – – – – – 0.75 – – 19 27.25 10

As opposed to the bicycle problem in Section8.1, in this problem final stock levels have been given. The specification of final stock levels is quite a tricky issue in production planning models. If one does not specify levels, then models will typically run stocks down to zero at the end of the planning horizon, a situation which will usually be unacceptable in practice. If the final stock levels are different from the initial stock levels, as in this example, then care must be taken in interpreting average costs, as some benefit has accrued if stock levels are being run down, and vice versa if stock is being increased.