Yyyyyyyyyyyyyy Y Yy Yyyyyyyyyyyyyy Yyyyyyy Y Y Yyyyyyyy Yyyyyyyyyyyyyyyyyyy Yyyyyyyyyyyyyyyyyy
Yyyyyyyyyyyyyy Y Yy Yyyyyyyyyyyyyy Yyyyyyy Y Y Yyyyyyyy Yyyyyyyyyyyyyyyyyyy Yyyyyyyyyyyyyyyyyy
This product is a powder formed by a process of mixing raw material ingredients in carefully controlled proportions. After the mixing process the then constituted product is ready for packing into one kg cartons. The latter operation is normally carried out at the plant of origin but may, if necessary, be carried out at one of the other plants if "in house" capacity is insufficient to meet demand. The distribution of the product to customers is always made from the plant where the mixing takes place. The raw materials for product X cost 300 per thousand kg of product X produced. The cost per thousand kg to ship the product made at one plant for packing into cartons at another plant (and to return it to the original plant) are as follows:
Packing 1 2 20 25 30 27 plant 3 23 24 -
From plant 1 2 3
The manufacturing costs in 's per thousand kgs of the mixing and packing processes at each of the three plants are as follows:
Plant cost 1 2 3 Mixing process 100 120 150 Packing process 60 30 40
The capacities of the mixing and packing process at each of the three plants in the next month are:
Plant capacity (1,000's of kgs) 1 2 3 Mixing process 60 80 40 Packing process 70 50 50
To ensure that a plant is not given over entirely to packing product from other plants the maximum amount of packing of product from other plants that can take place at plants 1, 2 and 3 is 5, 10 and 15 (thousand kgs) respectively. The company can currently sell as much of product X as it can make. Formulate the problem of determining the mixing and packing arrangements for the three plants as an LP so as to minimise costs.
Linear programming tutorial class solution We follow the same structure as given in the lecture notes - namely:
y y y
Variables Essentially we are interested in the amount (in thousand kg) produced (mixed) at each of the three plants and in the amount shipped out of a production plant for packing. Hence let xi = amount (thousand kg) produced (mixed) at plant i (i=1,2,3) in the next month yij = amount (thousand kg) shipped in the next month from plant i (i=1,2,3) to plant j (j=1,2,3) for packing before being shipped back to plant i for distribution to the customers. Note that xi >= 0 (i=1,2,3) and yij >= 0 (i=1,2,3 and j=1,2,3). We interpret yii (i=1,2,3) as the amount "shipped" (at zero cost) within plant i for packing at plant i after production at plant i. We illustrate the problem diagrammatically below. Note here that often in problems involving "flow" of material a diagram is useful in clarifying the situation.
Constraints
y
limit on the total amount packed at each plant - e.g. for plant 1 we have that y11 is the amount "shipped" from itself for packing, whilst y21 is the amount shipped in from plant 2 for packing and y31 is the amount shipped in from plant 3 for packing. Hence we have
y11 + y21 + y31 <= 70 y12 + y22 + y32 <= 50 y13 + y23 + y33 <= 50
y
limit on the amount packed from other plants - e.g. for plant 1 y21 is the amount shipped in from plant 2 for packing and y31 is the amount shipped in from plant 3 for packing. Hence we have
there is a balancing constraint which says that the amount produced is equal to the amount shipped out, to ensure a "long-term" balance so that we do not have an accumulation of material at a plant, (note here that there is no mention of storage facilities and also that there is an explicit mention of a one month timescale), - e.g. for plant 1 we produce an amount x1 and this must equal the total amount shipped (y11 + y12 + y13). Hence we have
x1 = y11 + y12 + y13 x2 = y21 + y22 + y23 x3 = y31 + y32 + y33 These constraints could be regarded as examples of implicit constraints in that they are effectively implicit from the definition of the variables. Alternatively they can be regarded as constraints that logically we need to relate the amount produced to the amount shipped. Objective The question explicitly states "minimise costs". Cost has four components:
y
mixing cost
packing cost
shipping cost
300(x1 + x2 + x3) Defining C= 100x1 + 120x2 + 150x3 + 60(y11 + y21 + y31) + 30(y12 + y22 + y32) + 40(y13 + y23 + y33) + 20y12 + 23y13 + 25y21 + 24y23 + 30y31 + 27y32 + 300(x1 + x2 + x3) to be the total cost we have that our objective is minimise C However it is clear that to minimise cost (in this problem) we would simply not produce anything at all, i.e. setting all variables equal to zero satisfies the constraints and minimises cost. This is plainly not what was meant by the question. Hence we need to revise our objective. Revised objective Rereading the question it is clear that our objective is really two-fold, namely to maximise the total amount produced (given we are told that we can sell all that we can make) whilst at the same time minimising the cost of producing that maximum amount (i.e. arrange the production of the maximum amount in such a way so as to minimise total cost). Multiple objective problems (such as this one) are often difficult to transform into a single objective problem (which is all we can cope with in LP). For this particular problem there are two possible approaches:
y y
to assign a price P (per thousand kg) to the product and regard the problem as one of maximising profit, where profit = revenue - cost. to treat the problem as two LP's - the first LP being concerned with maximising production and the second LP being concerned with minimising cost subject to making the maximum production.
If we adopt the first approach we have that the total revenue is P(x1 + x2 + x3) (note P is a known constant, not a variable) so that the objective now is maximise P(x1 + x2 + x3) - C Note here that this question was set so as to be deliberately confusing as to the objective. Many real-life problems also have no clear-cut objective. Now to solve this LP using the package we need to assign a value to P large enough to ensure that it is profitable to produce at all the plants (e.g. P=1000). We also need to rearrange the constraints so that their right-hand sides are constants. If we do this we find from the package that the solution is x1=60, x2=70 and x3=35, with the values of the y variables being given by y11=60, y21=5, y22=50, y23=15 and y33=35 (all other y variables being zero).
If we adopt the second approach the first LP would be maximise production (x1+x2+x3) subject to the constraints given above, leading to a maximum production of K (say) - where here we would find numerically if we solved this LP that K=165. Note here that it is much better to solve the problem of determining the maximum possible production via LP Examining the data and using our brains to see what we think is the maximum possible production is not an adequate approach. For this particular example I have deliberately set the numbers in such a way that it is not necessarily obvious what the maximum production is - e.g. if you had looked at the numbers given in the question what would you have said the maximum production was? The second LP would be minimise cost subject to the constraints given above and (x1+x2+x3)=K. Hence we end up with the maximum possible production achieved in a minimum cost way. (Note here that this approach is related to a logical question we might ask, namely "what is the maximum possible production achievable given this system?") Note too here that this approach would enable us to explore the variation in (minimum) cost as we change the production level K, e.g. down from its maximum level of 165. After all we may suspect that the plant capacities quoted are such that we would encounter problems if we were to run the system at full capacity. Hence we may, as a management decision, be interested in running the system at less than capacity (i.e. in choosing a value of K less than 165).
Linear programming tutorial question A company produces two varieties of a product. Variety A has a profit per unit of 2.00 and variety B has a profit per unit of 3.00. Demand for variety A is at most four units per day. Production constraints are such that at most 10 hours can be worked per day. One unit of variety A takes one hour to produce but one unit of variety B takes two hours to produce. Ten square metres of space is available to store one day's production and one unit of variety A requires two square metres whilst one unit of variety B requires one square metre. Formulate the problem of deciding how much to produce per day as a linear program and solve it graphically. Linear programming tutorial solution Let x1 = number of units of variety A produced x2 = number of units of variety B produced then the constraints are: x1 + 2x2 <= 10 (production time) 2x1 + x2 <= 10 (space) x1 <= 4 (demand) where x1, x2 >= 0 and the objective is maximise 2x1 + 3x2 It is plain from the diagram below that the maximum occurs at the intersection of x1 + 2x2 = 10 and 2x1 + x2 = 10 Solving simultaneously, rather than by reading values off the graph, we have that x1=x2=(10/3) with the value of the objective function being (50/3).
Linear programming tutorial question A cement manufacturer produces two types of cement, namely granules and powder. He cannot make more than 1600 bags a day due to a shortage of vehicles to transport the cement out of the plant. A sales contract means that he must produce at least 500 bags of powdered cement per day. He is further restricted by a shortage of time - the granulated cement requires twice as much time to make as the powdered cement. A bag of powdered cement requires 0.24 minutes to make and the plant operates an 8 hour day. His profit is 4 per bag for granulated cement and 3 per bag for the powdered cement.
y y
Formulate the problem of deciding how much he should produce as a linear program. Solve this linear program graphically.
Linear programming tutorial solution Variables Let x1 = number of bags of granulated cement produced per day x2 = number of bags of powdered cement produced per day and note that x1 >= 0 and x2 >= 0. Although (strictly) both x1 and x2 should only take integer values they are likely to be quite large and so we will let them take fractional values and ignore any fractional parts in the numerical solution. Note too that the question explicitly asks us to formulate the problem as an LP rather than as an integer program (IP). Constraints
y
x1 + x2 <= 1600
y
x2 >= 500
y
we have a time restriction - one bag of powdered cement takes 0.24 minutes to make and one bag of granulated cement twice as long (i.e. 0.48 minutes). Given that we are working an 8 hour day the time constraint is
0.48x1 + 0.24x2 <= 8(60) or 2x1 + x2 <= 2000 Objective Presumably the objective is to maximise profit, which is given by 4x1 + 3x2 () The graphical representation of this LP is shown below and the optimal solution occurs at the intersection of x1 + x2 = 1600 and 2x1 + x2 = 2000 i.e. at x1 = 400, x2 = 1200. Hence the cement manufacturer should produce 400 bags of granulated cement and 1200 bags of powdered cement per day giving a profit of 5200 (per day). Note here that it so happened that at the optimal solution the variables were integer and so we did not have to worry about any fractional parts (this was just good luck and we could not have forecast this beforehand).