11
VI – Linear Programming

V -linear_programming

Embed Size (px)

Citation preview

Page 1: V  -linear_programming

VI – Linear Programming

Page 2: V  -linear_programming

When do I use Linear Programming?

Optimization problems Operations research Express problem in terms of linear

inequalities, linear equations and constraints

Attempt to find which combination of variables and values maximizes the objective function whilst satisfying the inequalities and constraints

Page 3: V  -linear_programming

Common Application Areas

Operations Research problems• Resource planning (e.g. break-even analysis): seek to

maximize returns, given linearly expressed expenses, payoffs, etc.

• Resource scheduling (expressing limits such as non-consecutive slots allotted as linear equations)

• Cost/benefit analysis Graph algorithms

• Shortest path, network flow, traveling salesman, set cover, etc.

Page 4: V  -linear_programming

Example Problem

Economics Application: Profit Maximization• Suppose that a manufacturing plant produces

four products (x1, x2, x3, x4)

• Each product requires a certain amount of labour (L), capital (K) and materials(M)

• The total labour for all products must not exceed a certain limit

• You are given the following equations:

Page 5: V  -linear_programming

Example Problem cont’d

• L = 15x1 + 20x2 + 25x3 + 12x4 <= 1000

• K = 12x1 + 10x2 + 30x3 + 16x4 <= 900

• M = 15x1 + 20x2 + 30x3 + 9x4 <= 810

• Meaning that to produce 1 unit of x1, you need 15 units of labour, 12 units of capital and 15 units of material.

• Associated with each unit of labour, capital and material, there is a cost

• The unit cost of labour is 10

• The unit cost of capital is 15

• The unit cost of material is 8

Page 6: V  -linear_programming

Example Problem cont’d So what are the total costs for producing 1 unit of ?

• x1: 450

• x2: 510

• x3: 940

• x4: 432 Given that the prices of the products are:

• x1: 800

• x2: 650

• x3: 1100

• x4: 700

Page 7: V  -linear_programming

Example Problem cont’d

What are the profits per unit product?• Profit = Price – Cost

• x1: 800 – 450 = 350

• x2: 650 – 510 = 140

• x3: 1100 – 940 = 160

• x4: 700 – 432 = 268

Page 8: V  -linear_programming

Example Problem cont’d

The principal objective (P) is to maximise profits as follows:• P = 350x1 + 140x2 + 160x3 + 268x4

Given the following constraints• L: 15x1 + 20x2 + 25x3 + 12x4 <= 1000

• K: 12x1 + 10x2 + 30x3 + 16x4 <= 900

• M: 15x1 + 20x2 + 30x3 + 9x4 <= 810

• And also x1>=0, x2>=0, x3>=0 and x4>=0

LINEAR PROGRAM

Page 9: V  -linear_programming

Standard Approach to Linear Programming

Expressed using linear inequalities• Versus Slack which uses linear equalities

More convenient As in profit maximisation example where units

are expressed as not exceeding certain limits Can be solved using graphs if two variables x1

and x2 are involved Several points in the graph can be tested to

find the one that yields an optimal solution

Page 10: V  -linear_programming

Slack Approach to Linear Programming

The standard inequalities are converted to equalities

Our example equations become:• P = 350x1 + 140x2 + 160x3 + 268x4

• P = 350x1 + 140x2 + 160x3 + 268x4

• L: 15x1 + 20x2 + 25x3 + 12x4 <= 1000

• Slack: s1 = 1000 – 15x1 – 20x2 – 25x3 – 12x4

• Introduce slack variables (e.g. s1)

• Decision variables (x1, x2, x3, x4)

• Inequality becomes equality

Page 11: V  -linear_programming

Methods for Solving Linear Programs

One popular method known as the Simplex algorithm Will not be covered in this course Many programs have been written that carry out the

Simplex Method. Basic Idea of the Simplex Method: The optimal solution

occurs at the corner points of the region (when you plot the graphs of the inequations)

Simplex method: can be used to detect when a solution is not feasible.

Focus: how to express a problem as a linear program.