linear programming lecture (4) and lecture (5). recall an optimization problem is a decision problem...

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

Upload: gerald-lane

Post on 25-Dec-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

Linear programming

Lecture (4) and lecture (5)

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.

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.

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.

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

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)

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

Example of LP

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.

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

• 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.

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.

Solution

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

• 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".

• (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).

Solution using excel

The minimum The maximum