Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Linear Programming: Maximizing Objective Function with Linear Constraints, Study notes of Engineering

An introduction to linear programming, a mathematical optimization method used to find the optimal solution for a problem where the objective function and constraints are linear. The basics of linear programs, recognizing linear programs, and a case study of reddy mikks company. It also discusses handling nonlinearity, minimax objective functions, and absolute values in linear programs.

Typology: Study notes

Pre 2010

Uploaded on 03/16/2009

koofers-user-rn4
koofers-user-rn4 🇺🇸

5

(1)

10 documents

1 / 34

Toggle sidebar

Related documents


Partial preview of the text

Download Linear Programming: Maximizing Objective Function with Linear Constraints and more Study notes Engineering in PDF only on Docsity! Lecture 2 Linear Programming January 21, 2009 Mathematical Programming Mathematical Programming (Optimization) is the study of problems that seek values to maximize or minimize objective functions under constrains. It is a primary tool of operations research. A mathematical program can be written as min(max) f(x1, x2, · · · , xn) subject to (x1, x2, · · · , xn) ∈ X , where x1, x2, · · · , xn are the decision variables, f(x) is the ob- jective function, and X is the set of all feasible solutions. For simplicity, sometime we stack the variables up and call it x (vec- tor), i.e., x =   x1 x2 ... xn   . 2 Recognizing Linear Programs Consider the following mathematical programs, are they linear programs? (Suppose x’s are decision variables and all other sym- bols are constant) min α(4x1 + 5x2) s.t. d1x1 + d2x2 ≥ f c1x1 − c2x2 ≥ 0 min 4x21 + 5x2 s.t. x1 + x2 ≥ 2 2x1 − x2 ≥ 0 min 4x1 + 5x2 s.t. x1x2 ≥ 2 2x1 − x2 ≥ 0 min 4x1 + 5x2 s.t. 3x1 + 2x2 ≥ 2 2x1 − x2 ≥ 0 x1, x2 integer min 4x1 + 5x2 s.t. ax1 + bx2 ≤ 1 for all (a, b) such that a2 + b2 = 1 5 Concepts • Objective function: the function we want to optimize, it tells us how to rate the decision choices. • Input data: quantities that we will take as fixed. • Decision variables: the variables that represent the deci- sions to be taken. • Feasible solution: the choice for decision variables that sat- isfies all constraints. • Feasible set: the set of all feasible solutions. • Optimal solution: a feasible solution with objective function value at least equal to (could be better than) that of any other feasible solutions. • Optimal (objective) value: the value of the objective func- tion when the optimal solution is taken. 6 Back to The Example max x1 + x2 subject to x1 + 2x2 ≤ 2 2x1 + x2 ≤ 2 x1, x2 ≥ 0 Objective function: x1 + x2. Input data: all the coefficients in the objective function and the constraints (both right-hand side and left-hand side). Decision variables: x1 and x2. (0,0), (1,0), (0,1), and (23, 2 3) are all feasible solutions. Feasible set: the polygon with the above four points being the vertices. Optimal solution: (23, 2 3). Optimal value: 43. 7 The Formulation Maximize 5x1 + 4x2 Subject to 6x1 + 4x2 ≤ 24 M1 availability 1x1 + 2x2 ≤ 6 M2 availability −1x1 + x2 ≤ 1 market limit x2 ≤ 2 demand limit x1, x2 ≥ 0 nonnegativity constraints This is a linear program. 10 Another Case: Ozark Farms Ozark Farms uses at least 800lb of special feed daily. The special feed is a mixture of corn and soybean meal with the following compositions lb per lb of feedstuff Feedstuff Protein Fiber Cost($/lb) Corn .09 .02 .30 Soybean meal .60 .06 .90 The dietary requirements of the special feed are at least 30% protein and at most 5% fiber. Ozark Farms wishes to determine the daily minimum-cost feed mix. 11 Formulating the problem • Decision variables: x1: lb of corn in the daily mix x2: lb of soybean meal in the daily mix • Objective: .3x1 + .9x2 • Constraints: − at least 800 lb: x1 + x2 ≥ 800 − at least 30% protein: .09x1 + .6x2 ≥ .3(x1 + x2) − at most 5% fiber: .02x1 + .06x2 ≤ .05(x1 + x2) − nonnegativity constraints: x1, x2 ≥ 0 12 Reddy Mikks Case: Formulation Maximize 5x1 + 4x2 Subject to 6x1 + 4x2 ≤ 24 M1 availability 1x1 + 2x2 ≤ 6 M2 availability −1x1 + x2 ≤ 1 market limit x2 ≤ 2 demand limit x1, x2 ≥ 0 nonnegativity constraints This is a linear program. How do we solve it? We can actually solve it graphically. 2 Graphical Solution: Feasible Region • Consider the constraints one by one. • For each constrain, replace the inequality sign (≤ or ≥) with = and draw the straight line corresponding to the equation. To draw this line, we need to find two distinct points on the line. A easy way to do this is to set x1 = 0 and solve for x2 and get one point and then set x2 = 0 and get another point. The line separate the whole plane into two half-planes. • Find the correct half plane which satisfies the inequality. To do this, use (0,0) as a test point, if it satisfies the inequality then the side which it lies in is the correct one, otherwise the other side is. (if the line pass through (0,0), then we can pick some other point as the test point). • The feasible region is the intersection of all the half planes corresponding to those constraints. 3 Reddy Mikks Case: Feasible Region Reddy Mikks Case: Feasible Region 4 Some Observations • The feasible region is the intersection of finite many half plane (a Polyhedron Set), this actually holds for any LP. • The contours of the objective function are straight lines. • At each vertex, some constraints are active, namely, the equality holds. • The optimal solution is a vertex (corner point) of the fea- sible region. For general LP, at least one optimal solution is a vertex of the feasible region, and therefore it is enough to consider only the vertices. This is the foundation of the Simplex Method. 7 Ozark Farms Case: Formulation Rearrange the inequalities, we get the following formulation min .3x1 + .9x2 s.t. x1 + x2 ≥ 800 .21x1 + .30x2 ≤ 0 .03x1 − .01x2 ≥ 0 x1, x2 ≥ 0 Again, we get an LP. 8 Graphical Solution 1500 fe a 1og0 | “J 500 ” Optimum x, = 470.6) + aq = 3294 lb a 2— $437.4 7 p> ! | 0 500 AQ i000 1500 2 Ozark Farms Case: Graphical Solution Loan Policy Model Formulation (Cont.) There are five constraints: • Total funds less than $12 (million): x1 + x2 + x3 + x4 + x5 ≤ 12. • Farm and commercial loans equal at least 40% of all loans: x4 + x5 ≥ .4(x1 + x2 + x3 + x4 + x5). • Home loans equal at least 50% of person, car, and home loans: x3 ≥ .5(x1 + x2 + x3). • Bad debts can not exceed 4% of all loans: .1x1+ .07x2+ .03x3+ .05x4+ .02x5 ≤ .04(x1+x2+x3+x4+x5). • Nonnegativity: x1, x2, x3, x4, x5 ≥ 0. 12 Production-Inventory Model Acme Manufacturing Company has contracted to deliver home windows over the next 6 months. The demands and production costs ($ per window) is given in the following table Month 1 Month 2 Month 3 Month 4 Month 5 Month 6 demand 100 250 190 140 220 110 cost 50 45 55 48 52 50 Due to the fluctuations in manufacturing cost, the company can produce more than is needed in a given month and hold the excess units for delivery in later months. The storage cost is $8 per window per month (only consider end-of-month inventory). Determine the optimal production schedule to minimize the costs (production cost + inventory cost). 13 Production-Inventory Model Formulation Decision variables: the monthly production amount and the end-of-month inventory. For i = 1,2, · · · ,6, let pi = Number of units produced in month i; Ii = Inventory units left at the end of month i. Note: In principle, all these variables should be integers, how- ever, for the time being, we ignore this requirement. Moreover, in the optimal solution, all the variables are actually integer. Therefore, ignoring the integrity does not affect the result. The objective function z = total production cost + total inventory cost = 50p1 + 45p2 + 55p3 + 48p4 + 52p5 + 50p6 + 8 6∑ i=1 Ii 14 Handling Nonlinearity (Cont.) We can consider the following linear program: max u = ∑3 i=1 zi s.t. z1 + z2 ≤ log 4 z2 + z3 ≤ log 5 z1, z2, z3 ≥ 0 If (z∗1, z∗2, z∗3) is an optimal solution of the linear program and u∗ is the optimal value then (ez ∗ 1, ez ∗ 2, ez ∗ 3) is an optimal solution of the nonlinear program and the optimal value of the nonlinear program is given by v∗ = eu∗. This works because for any optimal solution of the original non- linear program, none of x1, x2, x3 can be 0. In general, if both the constraints and the objective function have product form, then we can try to use this trick. 17 Handling Minimax (Maximin) Objective Functions Consider the following mathematical program: min u = max{3x1 + 4x2,5x1 + 2x2} s.t. x1 + x2 ≥ 4 2x1 + x2 ≤ 5 This is a Minimax problem. The objective function is a max function of some linear functions. This is a nonlinear program since the objective is not linear. However, we can convert it to a linear program by introducing a new decision variable f to represent the objective function value. 18 Handling Minimax (Maximin) Objective Functions After introducing the new variable f , we can consider the fol- lowing linear program: min u = f s.t. x1 + x2 ≥ 4 2x1 + x2 ≤ 5 3x1 + 4x2 ≤ f 5x1 + 2x2 ≤ f If (x∗1, x∗2, f∗) is an optimal solution of the linear program, then (x∗1, x∗2) is an optimal solution of the minimax problem, and f∗ is the optimal value of the minimax problem. Also, we have f∗ = max{3x∗1 + 4x∗2,5x∗1 + 2x∗2}. All minimax problems can be converted to linear programs, it is similar for maximin problems. 19
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved