Top Banner
Linear programming Lecture (4) and lecture (5)
19

Linear programming Lecture (4) and lecture (5). Recall An optimization problem is a decision problem in which we are choosing among several decisions.

Dec 25, 2015

Download

Documents

Gerald Lane
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Linear programming Lecture (4) and lecture (5). Recall An optimization problem is a decision problem in which we are choosing among several decisions.

Linear programming

Lecture (4) and lecture (5)

Page 2: Linear programming Lecture (4) and lecture (5). Recall An optimization problem is a decision problem in which we are choosing among several decisions.

Recall• An optimization problem is a decision

problem in which we are choosing among several decisions.

• To arrive at the solution, first we need identify among the available decisions those that feasible, and then choose the best one among the feasible alternatives.

Page 3: Linear programming Lecture (4) and lecture (5). Recall An optimization problem is a decision problem in which we are choosing among several decisions.

Recall

• To construct a mathematical model of an optimization problem, we need to quantify the following concepts;– Decisions need to be expressed as numerical quantity, i.e.,

décisions variables; a particular value of a variable corresponds to a particular decision, or a component of a decision; every decision can be represented by assigning certain values to the variables.

• Restrictions on the possible decisions need to be expressed as

constraints, i.e., algebraic equations and inequalities.

Page 4: Linear programming Lecture (4) and lecture (5). Recall An optimization problem is a decision problem in which we are choosing among several decisions.

Recall

• Fidelity in the constraints: any assignment of values to the variables that satisfies all the constrains corresponds to a decision that is feasible, and vice versa — every feasible decision is represented by values of the decision variables that satisfy all the constraints.

• To compare feasible decisions, need to express our “quality” criterion as an objective function of the variables. We are searching for a decision with the objective function value either as large, or as small, as possible, depending on the

• context.

Page 5: Linear programming Lecture (4) and lecture (5). Recall An optimization problem is a decision problem in which we are choosing among several decisions.

RecallTo construct a mathematical model of anoptimization problem, we need to quantify thefollowing concepts.

• Decision variables• Constraints• Objective function, minimize or maximize• A feasible solution - assignment of values to the

variables satisfying all the constraints• An optimal solution, or a solution - the best

feasible solution, as measured by the objective function

Page 6: Linear programming Lecture (4) and lecture (5). Recall An optimization problem is a decision problem in which we are choosing among several decisions.

Linear programming

• If the objective function is a linear function and all constraints are written as linear equations or inequalities Such optimization problems are called Linear Problems, or Linear Programs (LPs)

Page 7: Linear programming Lecture (4) and lecture (5). Recall An optimization problem is a decision problem in which we are choosing among several decisions.

Why focus on LPs?

– Flexible modeling tool to represent a lot of performance measures and restrictions on decisions

– Easy to understand– “Easy” to solve, that is, there are software

packages, a.k.a. solvers, that solve very large LPs in default setting, and some humongous LPs with some intelligent tweaking, fast

– Can be analyzed

Page 8: Linear programming Lecture (4) and lecture (5). Recall An optimization problem is a decision problem in which we are choosing among several decisions.

Example of LP

Page 9: Linear programming Lecture (4) and lecture (5). Recall An optimization problem is a decision problem in which we are choosing among several decisions.

Feasible solutions

• By definition, a feasible solution is set of all points (x, y) that satisfies all the above constraints.

• For example, (1.5, 2.25) is feasible. So are (1/3, 4/3) and (1, 1.75).

• (0.75, 0.75) is infeasible: violates the fifth constraint.

• The LP can be solved graphically as follows.

Page 10: Linear programming Lecture (4) and lecture (5). Recall An optimization problem is a decision problem in which we are choosing among several decisions.

Prototype example :The Acme Bicycle Company

• The Acme Bicycle Company produces two kinds of bicycles: mountain bikes and street racers. Acme wishes to detremine the rate at which each type of bicycle should be produced in order to maximize the profits on the sales of the bicycles. Acme assumes that it can sell all of the bicycles produced. The physical data on the production process is available from the company engineer.

• A different team produces each kind of bicycle and each team has a different maximum production rate : 2 mountain bikes per day and 3 racers per day, respectively. Producing a bicycle of either type requires the same amount of time on the metal finishing machine and this machine can process at most a total of 4 bicycles per day of either type. The company accountant estimates that mountain bikes are currently generating a profit of around 15 $ per bicycle, and racers a profit of around 10 $ per bicycle

Page 11: Linear programming Lecture (4) and lecture (5). Recall An optimization problem is a decision problem in which we are choosing among several decisions.

• The Acme problem

maximize Z = 15*x1+10*x2objective function

• Mountain bike production limit: x1 ≤ 2• Racer production limit: x2

≤ 3• Metal finishing limit x1+x2

≤ 4• Bounded values x1 ≥ 0 , x2 ≥ 0• Because there are only two variables the

problem can be sketched on the plane as follows.

• The area eliminated by the constrains are shaded.

• The un-shaded area called the feasible region.

• Points in the feasible region satisfy all of the constrains.

Page 12: Linear programming Lecture (4) and lecture (5). Recall An optimization problem is a decision problem in which we are choosing among several decisions.
Page 13: Linear programming Lecture (4) and lecture (5). Recall An optimization problem is a decision problem in which we are choosing among several decisions.

Example (1)• Find the maximal and minimal value of z = 3x + 4y subject

to the following constraints: X+2y ≤ 143x-y ≥ 0X-y ≤ 2

• The three inequalities above are the constraints. • The area of the plane that they mark off will be the feasibility

region. • The formula "z = 3x + 4y" is the objective function. • we need to find the (x, y) corner points of the feasibility region

that return the largest and smallest values of z.

Page 14: Linear programming Lecture (4) and lecture (5). Recall An optimization problem is a decision problem in which we are choosing among several decisions.

Solution

• The first step is to solve each inequality for the more-easily graphed equivalent forms:

Page 15: Linear programming Lecture (4) and lecture (5). Recall An optimization problem is a decision problem in which we are choosing among several decisions.

• To find the corner points -- which aren't always clear from the graph -- I'll pair the lines (thus forming a system of linear equations) and solve.

• So the corner points are (2, 6), (6, 4), and (–1, –3).

• the maximum and minimum values of the optimization equation will always be on the corners of the feasibility region. So, to find the solution to this exercise, we only need to plug these three points into

• "z = 3x + 4y".

Page 16: Linear programming Lecture (4) and lecture (5). Recall An optimization problem is a decision problem in which we are choosing among several decisions.

• (2, 6):      z = 3(2)   + 4(6)   =   6 + 24 =   30 (6, 4):      z = 3(6)   + 4(4)   = 18 + 16 =   34 (–1, –3):  z = 3(–1) + 4(–3) = –3 – 12 = –15

• Then the maximum of z = 34 occurs at (6, 4), and the minimum of z = –15 occurs at (–1, –3).

Page 17: Linear programming Lecture (4) and lecture (5). Recall An optimization problem is a decision problem in which we are choosing among several decisions.

Solution using excel

Page 18: Linear programming Lecture (4) and lecture (5). Recall An optimization problem is a decision problem in which we are choosing among several decisions.
Page 19: Linear programming Lecture (4) and lecture (5). Recall An optimization problem is a decision problem in which we are choosing among several decisions.

The minimum The maximum