LW5 Intro to Linear Programming
LW5 Intro to Linear Programming
OPTIMISATION
Dr. Fang He
Email: [email protected]
Office: N7.118
University of Westminster
6DATA005W Operational Research & Optimisation 2
An example
• Solving the system
ìy ³ -2 x + 10
í
îy ³ x - 2
6DATA005W Operational Research & Optimisation 7
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
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:
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
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
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
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
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