0% found this document useful (0 votes)
4 views

LW5 Intro to Linear Programming

Optimization notes

Uploaded by

Rishab Agarwal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

LW5 Intro to Linear Programming

Optimization notes

Uploaded by

Rishab Agarwal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

OPERATIONAL RESEARCH &

OPTIMISATION
Dr. Fang He
Email: [email protected]
Office: N7.118
University of Westminster
6DATA005W Operational Research & Optimisation 2

Introduction to Linear Programming


• One specific type of optimisaiton, linear programming
(LP), is used in all types of organizations to solve a wide
variety of problems.
6DATA005W Operational Research & Optimisation 3

Linear inequalities in two variables-1


• Linear inequality is written as
ax + by + c < 0 or
ax + by + c £ 0 or
ax + by + c > 0 or
ax + by + c ³ 0

where a, b, c = constants and


not both a and b are zero.
6DATA005W Operational Research & Optimisation 4

Solving a linear inequalities


• Example: Find the region defined
by the inequality 2x+y≤5.
• Solution:
• The region consists of the line
2x+y = 5
and with the half-plane below it.
6DATA005W Operational Research & Optimisation 5

Solving a system of linear inequalities


• The solution of a system of inequalities consists of all
points whose coordinates simultaneously satisfy all of the
given inequalities.
• Geometrically, it is the region that is common to all the
regions determined by the given inequalities.
6DATA005W Operational Research & Optimisation 6

An example
• Solving the system

ìy ³ -2 x + 10
í
îy ³ x - 2
6DATA005W Operational Research & Optimisation 7

Linear Programming: an overview


• Objectives of business decisions frequently involve
maximizing profit or minimizing costs.
• Linear programming uses linear algebraic relationships to
represent a firm’s decisions, given a business objective, and
resource constraints.
• Steps in application:
1. Identify problem as solvable by linear programming.
2. Formulate a mathematical model of the unstructured
problem.
3. Solve the model.
6DATA005W Operational Research & Optimisation 8

Model components
• Decision variables - mathematical symbols representing
levels of activity by the organization.
• Objective function - a linear mathematical relationship
describing an objective of the organization, in terms of decision
variables - this function is to be maximized or minimized.
• Constraints - requirements or restrictions placed on the
organization by the operating environment, stated in linear
relationships of the decision variables.
• Parameters - numerical coefficients and constants used in the
objective function and constraints.
6DATA005W Operational Research & Optimisation 9

LP modelling
• Resource Requirements

• Product mix problem - Pottery Company


• How many bowls and mugs should be produced to
maximize profits given labor and materials constraints?
6DATA005W Operational Research & Optimisation 10

Summary of model formulation steps


Step 1: Define the decision variables
How many bowls and mugs to
produce?
Step 2: Define the objective function
Maximize profit
Step 3: Define the constraints
The resources (clay and labor)
available
6DATA005W Operational Research & Optimisation 11

LP model formulation
• Define the decision variables:
x1 = number of bowls to produce per day
x2 = number of mugs to produce per day
• Describe the objective: to maximise the total profit of all
products:
• Maximize Z = 40x1 + 50x2
• Describe the constraints: 1x1 + 2x 2 ≤ 40
• 4x1 + 3x 2 ≤ 120
x1 ≥ 0;x 2 ≥ 0
6DATA005W Operational Research & Optimisation 12

LP model formulation
• Complete Linear Programming Model:

max 40x1 + 50x 2


s.t.1x1 + 2x 2 ≤ 40
4x 2 + 3x 2 ≤ 120
x1, x 2 ≥ 0
6DATA005W Operational Research & Optimisation 13

Feasible solution
• A feasible solution does not violate any of the
constraints:
• Example:
x1 = 5 bowls
x 2 = 10 mugs
Z = 40x1 + 50x 2 = 700
• Labor constraint check: 1( 5 ) + 2 (10 ) = 25 £ 40 hours
• Clay constraint check: 4 ( 5 ) + 3 (10 ) = 70 £ 120 pounds
6DATA005W Operational Research & Optimisation 14

Infeasible solution
• An infeasible solution violates at least one of the
constraints:
• Example: x1 = 10 bowls
x 2 = 20 mugs
Z = 40x1 + 50x 2 = 1400

• Labor constraint check: 1(10) + 2 ( 20 ) = 50 > 40 hours


6DATA005W Operational Research & Optimisation 15

Graphical solution of LP models


• Graphical solution is limited to linear programming models
containing only two decision variables (can be used
with three variables but only with great difficulty).
• Graphical methods provide a picture of how a solution
for a linear programming problem is obtained.
6DATA005W Operational Research & Optimisation 16

Coordinate axis
max 40x1 + 50x 2
s.t.1x1 + 2x 2 ≤ 40
4x 2 + 3x 2 ≤ 120
x1, x 2 ≥ 0
6DATA005W Operational Research & Optimisation 17

Labor constraint
6DATA005W Operational Research & Optimisation 18

Labor constraint feasible area


6DATA005W Operational Research & Optimisation 19

Clay constraint feasible area


6DATA005W Operational Research & Optimisation 20

Feasible area for both constraints


6DATA005W Operational Research & Optimisation 21

Feasible solution area


6DATA005W Operational Research & Optimisation 22

Objective function line with Z=800


6DATA005W Operational Research & Optimisation 23

Alternative objective solution lines


6DATA005W Operational Research & Optimisation 24

Optimal solution
• The optimal solution
point is the last point
the objective function
touches as it leaves the
feasible solution area.
6DATA005W Operational Research & Optimisation 25

Optimal solution coordinate


6DATA005W Operational Research & Optimisation 26

A minimisation model example


• Two brands of fertilizer
available – Super-gro, Crop-
quick.
• Field requires at least 16
pounds of nitrogen and 24
pounds of phosphate.
• Super-gro costs £6 per bag,
Crop-quick £3 per bag.
• Problem: How much of each
brand to purchase to minimize
total cost of fertilizer given
following data ?
6DATA005W Operational Research & Optimisation 27

LP model formulation
Decision Variables:
x1 = bags of Super-gro
x2 = bags of Crop-quick
The Objective Function:
Minimize Z = 6x1 + 3x2
Where: 6x1 = cost of bags of Super-Gro
3x2 = cost of bags of Crop-Quick
Model Constraints: 2x1 + 4 x2 ³ 16 lb (nitrogen constraint )
4 x1 + 3 x2 ³ 24 lb (phosphate constraint )
x1, x2 ³ 0 (non - negativity constraint )
6DATA005W Operational Research & Optimisation 28

Constraint graph
min6x1 + 3x 2
s.t.2x1 + 4x 2 ≥ 16
4x 2 + 3x 2 ≥ 24
x1, x 2 ≥ 0
6DATA005W Operational Research & Optimisation 29

Feasible region
6DATA005W Operational Research & Optimisation 30

Optimal solution
• The optimal solution of
a minimization problem
is at the extreme point
closest to the origin.
6DATA005W Operational Research & Optimisation 31

Special cases
Special types of problems include those with:
• Multiple optimal solutions
• Infeasible solutions
• Unbounded solutions
6DATA005W Operational Research & Optimisation 32

Multiple optimal solutions

max 40x1 + 30x 2


s.t.1x1 + 2x 2 ≤ 40
4x 2 + 3x 2 ≤ 120
x1, x 2 ≥ 0
6DATA005W Operational Research & Optimisation 33

Infeasible problem
max 5x1 + 3x 2
s.t.4x1 + 2x 2 ≤ 8
x1 ≥ 4
x2 ≥ 6
x1, x 2 ≥ 0
6DATA005W Operational Research & Optimisation 34

Unbounded problem

max 4x1 + x 2
s.t.x1 ≥ 4
x2 ≤ 2
x1, x 2 ≥ 0
6DATA005W Operational Research & Optimisation 35

Characteristics of LP problems
• A decision among alternative actions is required.
• The decision is represented in the model by decision
variables.
• The problem encompasses a goal, expressed as an objective
function, that the decision maker wants to achieve.
• Restrictions (represented by constraints) exist that limit the
extent of achievement of the objective.
• The objective and constraints must be definable by linear
mathematical functional relationships.
6DATA005W Operational Research & Optimisation 36

LP application examples
• Extended reading

You might also like