Linear Programming Introduction. linear function linear constraintsA Linear Programming model seeks to maximize or minimize a linear function, subject.
Published byModified over 4 years ago
Presentation on theme: "Linear Programming Introduction. linear function linear constraintsA Linear Programming model seeks to maximize or minimize a linear function, subject."— Presentation transcript:
linear function linear constraintsA Linear Programming model seeks to maximize or minimize a linear function, subject to a set of linear constraints. What is Linear Programming?
What are linear functions? y = mx+b is the equation of a straight line –e.g. y = -4/3 x +6 –Multiplying by 3 and rearranging: 4x + 3y = 18 Linear function in 2 variables linear function A linear function consists of the sum of positive, negative or 0 constants times variables; e.g. 5X 1 - 4X 2 + 0X 3 + 6X 4 is a linear function in 4 variables. No X 1 2, X 1 /X 2, e -X2, X 1, etc.
What are Linear Constraints? Linear constraints have the form: –The relation is one of the following: , =, ---- they all contain the “equal to” part Examples: 4X 1 + 5X 2 - 6X 3 + 2X 5 34 2X 1 - 5X 2 + 1X 4 47 - 2X 2 + 8X 3 + 9X 4 + 2X 5 = 67 X 1 0 X 5 0
Example of a Linear Program MAX 4X 1 + 7X 3 - 6X 4 s.t. 2X 1 + 3X 2 - 2X 4 = 20 - 2X 2 + 9X 3 + 7X 4 10 -2X 1 + 3X 2 + 4X 3 + 8X 4 35 X 2 5 All X’s 0 Subject to X 1 0, X 2 0, X 3 0, X 4 0
Another Example MIN 6X 1 + 8X 2 + 11X 3 + 10X 4 + 5X 5 + 14X 6 S.T.X 1 + X 2 + X 3 20 X 4 + X 5 + X 6 30 X 1 + X 4 = 12 X 2 + X 5 = 15 X 3 + X 6 = 22 All X’s 0
Components of a Linear Programming Model A linear programming model consists of: – A set of decision variables – A (linear) objective function – A set of (linear) constraints
Why are Linear Programs Important? Many real world problems lend themselves to linear programming modeling. Other real world problems can be approximated by linear models. There are well-known successful applications in: –Manufacturing, Marketing, Finance (investment), Advertising, Agriculture, Energy, etc. There are efficient solution techniques and software programs that solve linear programming models. The output generated from linear programming packages provides useful “what if” analysis.
Linear Programming Assumptions certaintyThe parameter values are known with certainty. constant returns to scaleThe objective function and constraints exhibit constant returns to scale. no interactionsThere are no interactions between the decision variables (additivity assumption). ContinuityContinuity of the decision variables means they can take on any value within a given feasible range. –Integer programming models can only take on integer values within a given feasible range.
Example Galaxy Industries manufactures two toy gun models:Galaxy Industries manufactures two toy gun models: –Space Rays: –Space Rays: Each dozen nets an $8 profit and Requires 2 lbs. of plastic; 3 minutes of production time –Zappers: –Zappers: Each dozen nets a $5 profit and Requires 1 lb. of plastic; 4 minutes of production time Weekly resource limits 1000 pounds of plastic; 40 hours of production time Weekly production limitsWeekly production limits Maximum 700 dozen total units Space Rays cannot exceed Zappers by more than 350 dozen
Current reasoning calls for a production plan that: –Produces as much as possible of the more profitable product, Space Ray ($8 profit per dozen). –Uses any left over resources to produce Zappers ($5 profit per dozen), while remaining within the marketing guidelines of 700 total dozen produced and Space Rays – Zappers ≤ 350. Using a simple spreadsheet, letting the (cell for production of Zappers) = (cell for production of Space Rays – 350), trial and error gives the following good solution that uses all the available weekly plastic: Space Rays = 450 dozen; Zappers = 100 dozen; Profit = 8(450) + 5(100) = $4100 This is a good solution – Can we do better? Current Production
The Mathematical Model Recall a mathematical model consists of: –Set of decision variables –Objective function –Constraints 1.Decision Variables (Include both a measurement unit (dozens) and a time unit (week)) X 1 = dozens of Space Rays produced weekly X 2 = dozens of Zappers produced weekly
2. OBJECTIVE FUNCTION Objective is to maximize the total weekly profit. How much profit will be made each week? MAX 8X 1 + 5X 2 8X 1 How much profit will be made weekly from Space Rays? $8 per dozen Make X 1 dozen Space Rays per week How much profit will be made weekly from Zappers? $5 per dozen Make X 2 dozen Zappers per week + 5X 2
3. Constraints -- PLASTIC At most 1000 pounds of plastic available weekly. How much will be used? 2X 1 + 1X 2 1000 2X 1 How much plastic will be used weekly making Space Rays? 2 lbs per dozen Make X 1 dozen Space Rays per week How much plastic will be used weekly making Zappers? 1 lb per dozen Make X 2 dozen Zappers per week + 1X 2
Constraints -- Production Time At most 40 hours = 40x60 = 2400 minutes available weekly. How much will be used? 3X 1 + 4X 2 2400 3X 1 How many minutes will be used weekly making Space Rays? 3 min per dozen Make X 1 dozen Space Rays per week How many minutes will be used weekly making Zappers? 4 min per dozen Make X 2 dozen Zappers per week + 4X 2
Constraints -- Max Production At most 700 dozen total units can be produced weekly. How many will be produced? X 1 + X 2 700 X1X1X1X1 How many dozen Space Rays are produced weekly? Make X 1 dozen Space Rays per week How many dozen Zappers are Produced weekly? Make X 2 dozen Zappers per week + X2X2X2X2
Constraints -- Product Mix Space Rays can be at most 350 dozen units greater than Zappers each week. How many more dozen units of Space Rays will be produced weekly? X 1 - X 2 350 X1X1X1X1 How many dozen Space Rays are produced weekly? Make X 1 dozen Space Rays per week How many dozen Zappers are Produced weekly? Make X 2 dozen Zappers per week - X2X2X2X2 Amount (in dozens) Space Rays exceed Zappers
Constraints -- Nonnegativity Cannot produce a negative amount of Space Rays or Zappers X 1 0 X 2 0 All X’s 0 or
MAX8X 1 + 5X 2 s.t.2X 1 + 1X 2 ≤ 1000 (Plastic) 3X 1 + 4X 2 ≤ 2400 (Prod. Time) X 1 + X 2 ≤ 700 (Total Prod.) X 1 - X 2 ≤ 350 (Mix) All X’s ≥ 0 The Complete Galaxy Industries Linear Programming Model
Review A linear program seeks to maximize or minimize a linear objective subject to linear constraints. Many problems are or can be approximated by linear programming models. Linear programs possess the features of: –Certainty, Constant Returns to Scale, Additivity and Continuity There exists efficient algorithms for solving linear programs that provide many sensitivity analyses as a by-product.