Sei sulla pagina 1di 34

Topic 2 Introduction to Linear Programming

Introduction to LP
Linear programming problem Problem formulation A maximization problem Graphical solution procedures Computer solutions A minimization problem Special case
2

LP problem
A mathematical programming problem is one that seeks to maximize an objective function subject to constraints. If both the objective function and the constraints are linear, the problem is referred to as a linear programming Linear functions are functions in which variable appear in a separate term raised to the first power and is multiplied by constant-which could be 0 Linear constraints are linear functions that are restricted to be less than or equal, equal to, or greater than or equal to constant.

LP solutions
The maximization or minimization of some quality is the objective in all linear programming problems. A feasible solution satisfied all the problems constraints. Optimal solution is feasible solution that results in the largest possible objective function value when maximizing (or smallest when minimizing) A graphical solution method can be used to solve a linear program with two variables.

Problem formulation
Problem formulation or modelling is the process of translating a vertical statement of a problem into a mathematical statement.

Guidelines for the model formulation


Understand the problem thoroughly Write a verbal description of the objective Write a verbal description of each constraints. Define the decision variables Write the objective in term of decision variables Write the constraints in term of the decison variables.

Example 1: A Maximization Problem


RMC, is a small firm that produces a variety of chemicalbased products. In a particular production process, three raw materials are used to produce two products: fuel additive and solvent base. The three raw materials are blended to form the fuel additive and solvent base as follows: A ton of Fuel requires 0.4 Material 1 and 0.6 Material 3, and a ton of Solvent requires 0.5 Material 1, 0.2 Material 2 and 0.3 Material 3. RMCs production is constraints by limited availability of three raw materials.
the profit contribution of each product is $40 for every ton of fuel and $30 for every ton of solvent base. Maximize the profit contribution
7

The available quantity of each materials are 20 tons Material 1, 5 tons Material 2 and 21 tons Material 3.

Example 1: A Maximization Problem


LP Formulation 1 ton of fuel (F) = 0.4 ton of M1, 0.6 ton of M3 1 ton of Solvent (S) = 0.5 ton of M1, 0.2 ton of M2, 0.3 ton of M3.

Material
M1 M2 M3 20 tons 5 tons 21 tons

Profit contribution per ton of F=$40 Profit contribution per ton of S=$30

Example 1: A Maximization Problem


LP Formulation
Maximizing Total Profit s.t. 0.4F+0.5S 20 M1 0.2 5 0.6F + 0.3S 21 F,S 0 40F + 30S
M2 M3

Example 1: A Maximization Problem


Constraint #1 Graphed

40 30 20

A solution with F=10, and S=40 (10,40)

A solution with F=20, and S=15 (20,15)

10

10

20

30

40

50

10

Example 1: A Maximization Problem


The Material 1 Constraint Line 40 30 20 (0,40) (40,30)

Tons of Solvent Base

10

(10,10)

10

20

30 40 Tons of Fuel Additive

50

11

Example 1: A Maximization Problem


Solution that satisfy the Material 1 constraint 40 30 20 (0,40) (40,30)

Tons of Solvent Base

10

(10,10)

10

20

30 40 Tons of Fuel Additive

50

12

Example 1: A Maximization Problem


Solution that satisfy the Material 2 constraint 40 30 20 (0,25) 0.2S=5 Material 2

Tons of Solvent Base

10

10

20

30 40 Tons of Fuel Additive

50

13

Example 1: A Maximization Problem


Solution that satisfy the Material 3 constraint

70
Tons of Solvent Base 40 30 20

(0,70)

10
(0,35)

10

20

30 40 Tons of Fuel Additive

50

14

Example 1: A Maximization Problem


70 Feasible Region for Example 1

Tons of Solvent Base

40 30 20

Material 2

Feasible Region

10 10 20 30 40 Tons of Fuel Additive 50


15

Example 1: A Maximization Problem


70 Feasible Region for Example 1

Tons of Solvent Base

40 30 20

Feasible Region

10 10 20 30 40 Tons of Fuel Additive 50


16

Example 1: A Maximization Problem


70 Feasible Region for Example 1

Tons of Solvent Base

Profit Line 40F+30S = 240 40 30 20

Feasible Region (6,0) 10 20 30 Tons of Fuel Additive 40 50

(0,8) 10

17

Example 1: A Maximization Problem


70 Feasible Region for Example 1

Tons of Solvent Base

40 30 20

10 10 20 30 40 Tons of Fuel Additive 50


18

Example 1: A Maximization Problem


Feasible Region for Example 1

Tons of Solvent Base

Maximum Profit Line

Optimal Solution point (25,20)

Tons of Fuel Additive


19

Summary of the Graphical Solution Procedure for Maximization Problems


Prepare a graph of the feasible solutions for each of the constraints. Determine the feasible region that satisfy al the constraints simultaneously. Draw an objective function line Move parallel objective function line toward larger objective function values without entirely leaving the feasible region. Any feasible solution on the objective function line with the largest value is an optimal solution.

20

Stack and Surplus Variable


A linear program in which all the variables are non-negative and all the constraints are equalities is said to be in standard form. Standard form is attained by attaining by adding slack variables to less than or equal to constraints, and by subtracting surplus variables from greater than or equal to constraints. Slack and surplus variables represent the different btwn the left and right sides of the constraints Slack and surplus variables have object function coefficients equal to 0.

21

Example 1: A Maximization Problem


LP Formulation
Maximizing Total Profit s.t. 0.4F+0.5S 20 M1 0.2 5 0.6F + 0.3S 21 F,S 0 40F + 30S
M2 M3

22

Extreme points and optimal solution


The corner or vertices of feasible region are referred to as extreme points An optimal solution to LP problem can be found at an extreme point of the feasible region When looking for the optimal solution you do not have to evaluate all feasible solution points You have to consider only the feasible region

23

Example 1: A Maximization Problem


Feasible Region for Example 1

Tons of Solvent Base

3 1 2

Tons of Fuel Additive

24

Computer Solutions
Computer program designed to solve LP problems are now widely available Most large LP problems can be solved with just a few minutes of computer time Small LP problems usually require only a few seconds Linear programming solves are now part of many spreadsheet packages such as Microsoft Excel

25

Reduced cost
The reduces cost for a decision variable whose value is 0 in the optimal solution is the amount the variables objective function coefficient would have to improve (increase for maximization problems, decrease for minimization problems) before this variable could assume a positive value The reduced cost for a decision variable with positive value is 0

26

Example 2: A Minimization Problem


M&D produces two products that are sold as raw materials to companies manufacturing bath soap and laundry detergents. Based on analysis of current inventory level and potential demand for the coming month, M&D has specified that the combined production for products A and B must total at least 350 gallons. Separately, a major customers order for 125 gallons of product A must be satisfied. Product A requires 2hrs of processing time per gallon while product B require 1 hr of processing time per gallon, and for the coming month, 600hrs of processing time are available. M&D objective is to satisfy these requirements at a minimum total production cost. Production cost are $2 per gallon for Product A and $3 per gallon for product2.
27

Example 2: A Minimization Problem


LP Formulation
Min s.t. 1A 2A + 3B 125 Demand for product A 1A+1B 350 Total Production 2A+1B 600 processing time A,B 0

28

Example 2: Graphical Solution


Graph the constraint
Constraints 1: when A=125, connect (125,0). The > side is to the right Constraint 2: when B=0, then A=0, B=350. Connect (350,0) and (0,350). The > side is to the right Constraint 3: when A=0, then B=600, when B=0, then A=300. connect (0,600) and (300,0). The < side is to the left.

29

Example 2 Graphical Solution


Feasible Region Gallons of Product B
600

A=125

500 400

Feasible Region

300

200

100

100

200

300

400

500

600

Gallons of Product A

30

Example 2 Graphical Solution


Feasible Region Gallons of Product B
600

500 400

Optimal Solution (A=250,B=100)

300

200

100

100

200

300

400

500

600

Gallons of Product A

31

Computer Solutions
Computer programs designed to solve LP problems are now widely available Most large LP problems can be solved with just a few minutes of computer time Small LP problem s usually require only a few seconds. LP solvers are now part of many spreadsheet packages, such as Microsoft Excel.

32

Feasible Region
The feasible region for two variables LP problem can be nonexistent, a single point, a line, a polygon or an unbounded area Any linear program falls in one of three categories:
Is infeasible Has a unique optimal solution or alternate optimal solution Has an objective function that can be increased without bound

A feasible region may be unbounded and yet there may be optimal solutions. This is common in minimization problems and is possible in maximization problems.

33

End

34

Potrebbero piacerti anche