Or Content

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 30

Operations Research

11/28/2018 BG 1
Chapter 2 Introduction to Linear Programming (LP)
Linear Programming (LP) is a special and versatile technique-
 Can be which can be applied to a variety of management problems viz. Advertising,
Distribution, Investment, Production, Refinery Operations, and Transportation analysis.
 Also useful in non-profit sectors such as Education, Government, Hospital, and Libraries.
 The LP method is applicable in problems characterized by the presence of decision
variables. The objective function and the constraints can be expressed as linear functions
of the decision variables.
 The decision variables are the quantities that are controllable inputs to the system.
 An objective function represents the objective criterion or goal measuring the effectiveness
of the system such as maximizing profits/productivity, or minimizing cost/consumption.
 Practical limitation on the availability of resources viz. man, material, machine, or time for
the system are constraints and are expressed as linear equations involving the decision
variables.
The main important feature of linear programming model is the presence of linearity in the
problem.. Some models may not be strictly or not at all linear, but can be made linear by
applying appropriate mathematical transformations..
11/28/2018 BG 2
2.1 Two Variable LP Model
Linear Programming Problem (LPP) Formulation
1. A small cake factory has to supply cakes and loaves of bread for a birthday function. The
factory can run only 3 hours due to load shedding. 20 cups of flour is available as the raw
material. Each cake needs 3 cups of flours and each loaf of bread needs 8 cups of flour. It takes
45 minutes and 30 minutes respectively to make a cake and a loaf of bread. Assuming that all
cakes and loaves that are produced can be sold, what should be the optimum production mix so
as to maximize the profit if profit per unit of cake and loaf of bread is Rs. 10 and Rs. 6
respectively.

Resources Required per Profit Maximum Resources


in making each unit of Available per Day
Cake Loaf of Bread
Time 45 min 30 min 3 hrs
Flour 3 cups 8 cups 20 cups
Profit

11/28/2018 BG 3
2. Suppose an industry is manufacturing two types of products P1 and P2. The profits per
Kg of the two products are Rs.30 and Rs.40 respectively. These two products require
processing in three types of machines. The following table shows the available machine
hours per day and the time required on each machine to produce one Kg of P1 and P2.
Formulate the problem in the form of linear programming model.

11/28/2018 BG 4
3. A village Butcher Shop traditionally makes its meat loaf from a combination of lean
ground beef and ground pork. The ground beef contains 80 percent meat and 20 percent
fat, and costs the shop 80 cents per pound; the ground pork contains 68 percent meat, and
32 percent fat, and costs 60 cent per pound . How much of each kind of meat should the
shop use in each pound of meatloaf if it wants to minimize its cost and to keep the fat
content of the meat loaf to no more than 25 percent?

4. A furniture maker has 6 units of wood and 28 h of free time, in which he will make 2
models of decorative screens. Model I requires 2 units of wood and 7 h of time, while
Model II requires 1 unit of wood and 8 h of time. The prices of the model are $120 and $80
respectively. How many screens of each model should the furniture maker assemble if he
wishes to maximize his sales revenue?

11/28/2018 BG 5
Properties of LP Model:
1. Proportionality: This property requires that the contribution of each decision variable
in both the objective function and the constraints to be directly proportional to the
value of the variable. For example, if a company grants some sort of quantity discounts
when sales exceed certain amounts, then the profit will no longer be proportional to
the production amounts and the function becomes nonlinear.
2. Additivity: The total contribution of all the variables in the objective function and in
the constraints should be the sum of the individual contributions of each variable. If
there is ‘competition’ between the two variables in such a way that increase in one
variable adversely affects the other variable, then the model is no longer linear.
3. Certainty: All the objective and constraint coefficients of the LP model are
deterministic. This means that they are known constants - a rare occurrence in real life
where data are more likely to be represented by probabilistic distributions. So LP
coefficients are average-value approximations of the probabilistic distributions.

11/28/2018 BG 6
2.1 Graphical LP Solution

11/28/2018 BG 7
Solution:
First, the model is formed with objective function and constraints.
Let,
x1 = Tons produced daily of exterior paint
x2 = Tons produced daily of interior paint
z = Profit

So the complete model becomes,

11/28/2018 BG 8
Steps of Graphical LP Solution

Step 1: Determination of the


Feasible Solution Space

11/28/2018 BG 9
Step 2: Determination of the Optimum Solution

11/28/2018 BG 10
Tangent Method: Draw the line of z function through x constraint parallel lines with
increasing distance. One line becomes tangent to the solution space. The value at the
tangent point gives the optimum value of z.

Corner Point Method: An important characteristic of the LP solution is that it is always


associated with a corner point of the solution space (where two lines intersect). So the
search for the optimum can be limited to a finite (rather than infinite) number of points.

11/28/2018 BG 11
A furniture maker has 6
units of wood and 28 h of
free time, in which he will
make 2 models of
decorative screens. Model
I requires 2 units of wood
and 7 h of time, while
Model II requires 1 unit
of wood and 8 h of time.
The prices of the model
are $120 and $80
respectively. How many
screens of each model
should the furniture
maker assemble if he
wishes to maximize his
sales revenue?

11/28/2018 BG 12
Minimization Cases:
1) A village Butcher Shop
traditionally makes its meat
loaf from a combination of
lean ground beef and ground
pork. The ground beef contains
80 percent meat and 20 percent
fat, and costs the shop 80 cents
per pound; the ground pork
contains 68 percent meat, and
32 percent fat, and costs 60
cent per pound . How much of
each kind of meat should the
shop use in each pound of
meatloaf if it wants to minimize
its cost and to keep the fat
content of the meat loaf to no
more than 25 percent?
11/28/2018 BG 13
Solution:

11/28/2018 BG 14
So, the complete model becomes;

11/28/2018 BG 15
11/28/2018 BG 16
2.3 Graphical Sensitivity Analysis

In LP, the parameters (input data) of the model can change within certain limits
with-out causing the optimum solution to change. This is referred to as sensitivity
analysis.
In LP models, the parameters are usually not exact. With sensitivity analysis, we can
ascertain the impact of this uncertainty on the quality of the optimum solution. For
example, for an estimated unit profit of a product, if sensitivity analysis reveals that
the optimum remains the same for a ±10% change in the unit profit, we can
conclude that the solution is more robust than in the case where the indifference
range is only ±1 %.

11/28/2018 BG 17
Example 1:
JOBCO produces two products on two machines. A unit of product 1 requires 2 hours on
machine 1 and 1 hour on machine 2. For product 2, a unit requires 1 hour on machine 1 and
3 hours on machine 2. The revenues per unit of products 1 and 2 are $30 and $20,
respectively. The total daily processing time available for each machine is 8 hours.
Optimize the production and make sensitivity analysis.
Solution:
Letting xl and x2 represent the daily number of units of products 1 and 2, respectively, the
LP model is given as;

11/28/2018 BG 18
Figure here illustrates
the change in the
optimum solution
when changes are
made in the capacity
of machine 1.

11/28/2018 BG 19
If the daily capacity is increased from 8 hours to 9 hours, the new optimum will occur at
point G. The rate of change in optimum z resulting from changing machine 1 capacity
from 8 hours to 9 hours can be computed as follows:

The computed rate provides a direct link between the model input (resources) and its
output (total revenue) that represents the unit worth of a resource (in $/hr)-that is, the
change in the optimal objective value per unit change in the availability of the
resource (machine capacity). This means that a unit increase (decrease) in machine 1
capacity will increase (decrease) revenue by $14.00. This rate change is called unit worth
of a resource. Its generally called dual price or shadow price.
The shadow price for the ith constraint of an LP is the amount by which the optimal z-
value is improved (increased in a max problem or decreased in a min problem) if the rhs of
the ith constraint is increased by one.
11/28/2018 BG 20
Looking at the Figure, we can see that the dual price of $14.00/hr remains valid for changes
(increases or decreases) in machine 1 capacity that move its constraint parallel to itself to
any point on the line segment BF. This means that the range of applicability of the given
dual price can be computed as follows:
Minimum machine 1 capacity
[at B = (0,2.67)] = 2 x 0 + 1 x 2.67 = 2.67 hr

Maximum machine 1 capacity


[at F =(8,0)] = 2 x 8 + 1 x 0 = 16 hr

We can thus conclude that the dual price of


$14.00/hr will remain valid for the range
2.67 hrs ≤ Machine 1 capacity ≤ 16 hrs
Changes outside this range will produce a
different dual price (worth per unit).

11/28/2018 BG 21
Using similar computations, it is found that the dual price for
machine 2 capacity is $2.00/hr and it remains valid for
changes (increases or decreases) that move its constraint
parallel to itself to any point on the line segment DE, which
yields the following limits:
Minimum machine 2 capacity
[at D = (4,0)] = 1 x 4 + 3 x a = 4 hr
Maximum machine 2 capacity
[at E = (8, 0)] = 1 x a + 3 x 8 = 24 hr
The conclusion is that the dual price of $2.00/hr for machine 2
will remain applicable for the range
4 hr ≤ Machine 2 capacity ≤ 24 hr
The computed limits for machine 1 and 2 are referred to as the
feasibility ranges.

11/28/2018 BG 22
CW:
Giapetto’s Woodcarving, Inc., manufactures two types of wooden toys: soldiers and
trains.
A soldier sells for $27 and uses $10 worth of raw materials. Each soldier that is
manufactured increases Giapetto’s variable labor and overhead costs by $14. A train
sells for $21 and uses $9 worth of raw materials. Each train built increases Giapetto’s
variable labor and overhead costs by $10. The manufacture of wooden soldiers and
trains requires two types of skilled labor: carpentry and finishing. A soldier requires 2
hours of finishing labor and 1 hour of carpentry labor. A train requires 1 hour of
finishing labor and 1 hour of carpentry labor. Each week, Giapetto can obtain all the
needed raw material but only 100 finishing hours and 80 carpentry hours. Demand for
trains is unlimited, but at most 40 soldiers are bought each week. Giapetto wants to
maximize weekly profit (revenues-costs).
Formulate a mathematical model of Giapetto’s situation that can be used to
maximize Giapetto’s weekly profit. Also find the shadow price for the finishing
constraint.

11/28/2018 BG 23
Solution:
Let = number of soldiers produced each week
= number of trains produced each week.

(weekly profit)
s.t. (finishing constraint)
(carpentry constraint)
(demand constraint)
(sign restriction)

11/28/2018 BG 24
1.4 Computer Solution of LP Problems
In practice, where typical LP models involve thousands of variables and constraints, LP
problems can be solved by computers only. Two most commonly used software systems are;
- AMPL
and
- Excel Solver
AMPL: A Mathematical Programming Language (AMPL) is an algebraic modeling
language to describe and solve high-complexity problems for large-scale mathematical
computing (i.e., large-scale optimization and scheduling-type problems).
- AMPL uses line commands and doesn’t operate in Windows environment.

11/28/2018 BG 25
Excel Solver
Excel includes a tool
called solver that uses
techniques from the
operations research to find
optimal solutions for all
kind of decision problems.
To load the solver add-in,
execute the following steps.
1. On the File tab, click
Options.
2. Under Add-ins, select
Solver Add-in and click
on the Go button.

11/28/2018 BG 26
3. Check Solver Add-in and click OK.

4. You can find the Solver on the Data tab, in the Analyze group.

11/28/2018 BG 27
11/28/2018 BG 28
11/28/2018 BG 29
Linear Program Applications
 Investment

 Production planning and inventory control

 Manpower planning

 Urban development planning

 Oil refining and blending

11/28/2018 BG 30

You might also like