You are on page 1of 33

Chapter Two

Linear Programming (LP)

mlteklehaimanot@yahoo.com

06/22/2022
Chapter two

Introduction to Linear Programming (LP)


Linear programming (LP, also called linear optimization) is the
development of modeling and solution procedures which employ
mathematical techniques to optimize the goals and objectives of the
decision-maker.
LP is a widely used mathematical modeling technique to determine the
optimum allocation of scarce resources among competing demands.
LP is a method to achieve the best outcome (such as maximum profit or
lowest cost) in a mathematical model whose requirements are represented
by linear relationships.
LP is a versatile technique which can be applied to a variety of management
problems in investment, advertising, production, education, hospitals, etc.

LP problems determine the optimal allocation of scarce resources in


organizations (both profit and non-profit) to meet certain objectives.
06/22/2022
Chapter Two

• LP problems are mathematical programming problems where all of the


relationships amongst the variables are linear.

• LP involves choosing a course of action when the mathematical model of the


problem contains only linear functions.

• Linear programming has nothing to do with computer programming.

• The use of the word “programming” here means “choosing a course of


action”.

• LP model consists of linear objectives and linear constraints.

06/22/2022
Chapter Two

Structure and components of a LP model formulation

Formulation of linear programming is the representation of problem situation


in a mathematical form.

The components in the model formulation include:

1) Decision variables
2) Objective function

3) Constraints
4) Non-negativity Conditions

06/22/2022
Chapter Two

Decision variables
• LP method is applicable in problems characterized by the presence of
decision variables.
• Decision variables refers to the aim to optimize (maximize the profits or
minimize the costs) or explain the optimization (maximization of profit or
minimization of cost).

…Represent (unknown) decisions to be made


(e.g., number of quantities to be produced within a given machine/labour hours
to maximize profit or minimize cost).

The solution for these terms are what we would like to optimize.

06/22/2022
Chapter Two

Objective function
…states the goal/objective of the decision-maker (in our case the manager).
Often times, there are two types of objectives:
• Maximization (e.g. profit), or
• Minimization (e.g. costs)

Example:
Assume a factory is producing two types of products: bicycle (X 1) and motorbike
(X2). The profit from each bicycle is birr 250 and from a motorbike is birr
1,500.
The objective function is:
Maximize Z = 250X1 + 1,500X2; Decision variables are X1 and X2

06/22/2022
Chapter Two

Constraints:
There will be no problem in making decisions if resources are abundant; but
resources are usually scarce to achieve objectives.
Constraints are thus resources or factors (number of labour hours, raw materials,
equipment, etc.) that limit feasible solutions (or that limit to achieve desired
objectives).
The availability of scarce resources may be expressed as equations or
inequalities which rule out certain combinations of variable values as feasible
solutions.
Consider the previous example
To produce one bicycle needs five labour hours and 2 machine hours, and to
produce a motorbike requires ten labour hours and 4 machine hours. There are
only 200 labour hours and 80 machine hours. Find the profit maximizing
number of bicycles and motorbikes.

06/22/2022
Chapter Two
Maximize Z = 250X1 + 1,500X2
Subject to:
5X1 + 10X2 = 200
2X1 + 4X2 = 80

Non-negativity conditions
Are special constraints which require all variables to be either zero or
positive.
Negative values of physical quantities are impossible, like producing negative
number of bicycles, motorbikes, chairs, tables, etc., so it is necessary to
include the element of non-negativity as a constraint i.e., X1, X2 > 0.
Maximize Z = 250X1 + 1,500X2
Subject to:
5X1 + 10X2 = 200
2X1 + 4X2 = 80
X1, X2 > 0. 06/22/2022
Chapter Two

Essentials of LP model
• The objective in all linear programming problems is the maximization or
minimization of some quantity.
• All LP problems have constraints that limit the degree to which the
objective can be pursued.
• A feasible solution satisfies all the problem's constraints.
• An optimal solution is a feasible solution that results in the largest
possible objective function value when maximizing (or smallest when
minimizing).
• Linear constraints are linear functions that are restricted to be "less than or
equal to", "equal to", or "greater than or equal to" a constant.
• A model must have a non-negativity constraint.

06/22/2022
Chapter Two
Guidelines for LP Model Formulation
Problem formulation or modeling is the process of translating a verbal
statement of a problem into a mathematical statement.
Model formulation in a mathematical statement:

• Understand the problem thoroughly.

• Describe the objective.

• Describe each constraint.


• Define the decision variables.

• Write the objective in terms of the decision variables.


• Write the constraints in terms of the decision variables.
06/22/2022
Chapter Two

Special Terms in LP
1) Parameters
2) Right-Hand Side (RHS)
3) Objective Coefficients
4) Technological Coefficients
5) Canonical Form
6) Standard Form

06/22/2022
Parameters
are the constant terms. These are neither variables, nor their coefficients. In a
standard form the parameters always appear on the right-hand side of the
constraints.

An Example of LP with Maximization Problem


Assume that wood Furniture Company wants to produce tables and chairs. A
unit of table requires 30 units of wood and 5 units of labor. A unit of chair
requires 20 units of wood and 10 units of labor. The company has 300 and
110 units of wood and labor, respectively. A unit of table and chair
contribute to the profit of birr 6 and 8 respectively.

06/22/2022
Wood Problem Formulation

Let: XT = number of tables produced


XC = number of chairs produced Parameters

MAX Z = 6XT + 8XC

s.t. 30XT + 20XC < 300


5XT + 10XC < 110
where: XT, XC > 0

06/22/2022
Right-Hand Side (RHS)

…are the numbers (parameters) located on the right-hand side of


the a LP model.
In a production problem these parameters typically indicate the
amount, or quantity, of resources available. In the
conventional literature these are known as the “b”s.
RHS
MAX Z = 6XT + 8XC

s.t. 30XT + 20XC < 300


5XT + 10XC < 110
where: XT, XC > 0

06/22/2022
Objective Coefficients

Are the coefficients of the variables in the objective function. In a


production problem, these typically represent unit profit or
unit cost. In the conventional literature these are known as the
“c”s. Objective
coefficients

MAX Z = 6 XT + 8 XC

s.t. 30 XT + 20 XC < 300


5 XT + 10 XC < 110
where: XT, XC > 0

06/22/2022
Technological Coefficients

Also known as “exchange coefficients,” these are the coefficients


of the variables in the constraints. In a production problem
these typically represent the unit resource requirements. In the
conventional literature these are known as the “a”s.

MAX Z = 6XT + 8XC

s.t. 30XT + 20XC < 300


5XT + 10XC < 110
where: XT, XC > 0

In this model, 30, 20, 5, and 10 are technology coefficients.

06/22/2022
Canonical Form

Refers to an LP problem with an objective function, all of the variables


are non-negative and where all of the variables and their coefficients
are on the left-hand sides of the constraints, and all of the
parameters are on the right-hand sides of the constraints.
This model formulation is in canonical form

MAX Z = 6XT + 8XC

s.t. 30XT + 20XC < 300


5XT + 10XC < 110
where: XT, XC > 0

06/22/2022
Standard Form

Refers to an LP problem in canonical form.


In addition, all of the constraints are expressed as equalities and
every variable is represented in the same order of sequence on
every line of the linear programming problem.
This model formulation is in standard form
MAX Z = 6XT + 8XC

s.t. 30XT + 20XC < 300


5XT + 10XC < 110
where: XT, XC > 0

06/22/2022
Chapter two

Solving LP Problems

There are two methods for solving LP problems.


The graphical and the simplex methods.

A graphical solution method can be used to solve a linear program


problems with only two variables.

The simplex method can be used for two or more variables.

06/22/2022
Graphical LP Solution Procedure

1) Formulate the LP problem


2) Plot the constraints on a graph
3) Identify the feasible solution region

4) Plot two objective function lines


5) Determine the direction of improvement
6) Find the most attractive corner

7) Determine the coordinates


8) Find the value of the objective function

06/22/2022
Let’s continue with the example on maximization problem.
Assume that wood Furniture Company wants to produce tables and chairs. A
unit of table requires 30 units of wood and 5 units of labor. A unit of chair
requires 20 units of wood and 10 units of labor. The company has 300 and 110
units of wood and labor, respectively. A unit of table and chair contribute birr
6 and 8, respectively, to the profit.

MAX Z = 6XT + 8XC

s.t. 30XT + 20XC < 300


5XT + 10XC < 110
where: XT, XC > 0
Graphical method…

Corner Values T & C Profit level Decision to Feasible


point (Z) produce
A (0,0) 0 Feasible

B (0, 15) 120 Infeasible

C (10, 0) 60 Feasible

D (4, 9) 96 4 tables and 9 Feasible and


chairs optimum
E (0, 11) 88 Feasible

F (22, 0) 132 Why not this? Infeasible

06/22/2022
Wood Furniture Problem

XT = 4 tables
XC = 9 chairs
P = 6(4) + 8(9) = 96 birr

06/22/2022
Example 2.
A firm is engaged in producing two products, A and B. Each unit of
product A requires 2 kg of raw material and 4 hours of labor for
processing, whereas each unit of product B requires 3 Kg of raw
material and 3 hours of labor, of the same type. Every week, the firm
has an availability of 60 kg of raw material and 96 labor hours. One unit
of product A sold yields Birr 40 and one unit of product B sold gives
Birr 35 as profit.

Required:
a) Formulate this problem as a linear programming problem
b) How many units of each of the products should be produced per
week so that the firm can earn the maximum profit.

06/22/2022
Formulation …

Resource Unit Requirements Amount

XA XB Available

Raw material 2 3 60
Labor 4 3 96
Unit profit 40 35

06/22/2022
Solution
Let xA = the number of product A to be produced and
xB = the number of product B to be produced.

Now, we can write the problem in complete form as follows.

Maximize Z = 40xA + 35xB

Subject to

2xA + 3xB ≤ 60 (Raw material constraint)

4xA + 3xB ≤ 96 (Labor hours constraint)

xA, xB ≥ 0 (Non-negativity restriction)


06/22/2022
Corner Quantity Quantity Profit Feasibility
point combination

xA xB
A 0 0 0, 0 0 Feasible
B 30 0 (30, 0) Z=1200 Infeasible
C 0 20 (0,20) Z=700 Feasible
D 24 0 (24,0) Z= 960 Feasible
E 0 32 (0,32) Z= 1120 Infeasible
F 18 8 (18,8) Z= 1000 Feasible

06/22/2022
Exercise
A company makes two products (X and Y) using two
machines (A and B). Each unit of X that is produced requires
50 minutes of processing time on machine A and 30 minutes
of processing time on machine B. Each unit of Y that is
produced requires 24 minutes of processing time on machine
A and 33 minutes of processing time on machine B. Available
processing time on machine A is forecasted to be 40 hours
and on machine B is forecasted to be 35 hours. The company
expects a profit of birr 75 per unit from X and birr 95 from Y.

a) Formulate the problem as a linear programming.


b) Solve it using the graphical approach.

06/22/2022
Graphical method for LP minimization problems
Example:
The agricultural institute suggested to a farmer to spread out at least 480
kg of phosphate fertilizer and not less than 720 kg of nitrogen fertilizer
to raise productivity of crops in his field. There are two sources for
obtaining these: mixtures A and B. Both of these are available in bags
weighing 100 kg each and they cost birr 40 and 24 respectively. Mixture
A contains phosphate and nitrogen equivalent of 20 kg and 80 kg
respectively, while mixture B contains these ingredients equivalent of
40 kg each.

a) Formulate this as a linear programming problem.


b) Determine how many bags of each type the farmer should buy in
order to obtain the required fertilizer at minimum cost.
06/22/2022
Fertilizer type A B Requirement

20 40 > 480 Phosphate


80 40 > 720 Nitrogen
Cost (Z) 40A 24B
Z Minimize Z= 40A + 24B

Subject to

20A + 40B > 480

80A + 40B > 720

A, B > 0

06/22/2022
Let Z represent the Objective function and
X1 and X2 represent the number of bags of mixtures A and
B respectively:

Minimize Z= 40x1 + 24x2 (cost)

Constraints: Minimum of 480kg of phosphate and 720 kg of


nitrogen ingredients are required.

20x1 + 40x2 > 480 (Phosphate constraint)


80x1 + 40x2 > 720 (Nitrogen constraint)

06/22/2022
Minimize Z= 40x1 + 24x2 (cost)

Subject to constraints

20x1 + 40x2 > 480 (phosphate constraint)


80x1 + 40x2 > 720 ( Nitrogen constraint)

X1, x2 > 0 (Non-negativity restriction)

06/22/2022
Corner Z (Cost)
point
A (x1) B (x2)
1 (24, 0) 24 0 960
2 ( 0, 12) 0 12 Infeasible
3 (9, 0) 9 0 Infeasible
4 (0, 18) 0 18 432
5 (4, 10) 4 10 400

The farmer should buy A = 4 bags and B = 10 Bags

Minimize Z= 40A + 24B (cost)

06/22/2022

You might also like