150 likes | 474 Views
An Introduction to Linear Programming. Chris L. Riley University of Mississippi February 15, 2007. What is Linear Programming?. Linear programming (LP) refers to a technique to solve a specific class of mathematical optimization problems.
E N D
An Introduction toLinear Programming Chris L. RileyUniversity of MississippiFebruary 15, 2007
What is Linear Programming? • Linear programming (LP) refers to a technique to solve a specific class of mathematical optimization problems. • LP optimization problems have linear objective functions and constraints.
The Relevance ofOptimization Problems to DSS • All of the following decisions can be considered optimization problems: • What crops an agribusiness should plant • How to efficiently assign employees to tasks • Deciding which publications to advertise in
Characteristics of LP Problems • Some resources are only available in limited quantities • These resources are necessary in order to create deliverables: products, services, information • Resources can be used in multiple ways • Deliverables are associated with value in some way • Certain restrictions, or constraints, are imposed on resources, deliverables, values, etc. Ref: Decision Support Systems and Intelligent Systems, 7th Ed
Assumptions for LP Problems • Value generated, or the return, from a particular allocation of resources can be measured in a common unit • All possible allocations are independent of each other • The return for an allocation is the sum of the returns for each activity • All inputs are known with certainty(with probability = 1) • Resources are used optimally Ref: Decision Support Systems and Intelligent Systems, 7th Ed
Components of the Mathematical Model • A result variable (total return)The value of the result variable is the linear function that is to be optimized (maximized or minimized) • Decision variablesMost often the amount of resources to be used • Constraints or uncontrollable variables • Labor, budget, existing obligations, etc. Ref: Wikipedia
Standard Form • Standard form is often used in describing a linear programming problem and consists of the following three parts: • A linear function to be maximized • e.g. maximize z=c1x1+c2x2 • Problem constraints of the following form • e.g. • a11x1 + a12x2 ≤ b1 • a21x1 + a22x2 ≤ b2 • Non-negative variables • e.g. • x1 ≥ 0 • x2 ≥ 0 Ref: Wikipedia
An Example • Suppose that a farmer has a piece of farm land, say A square kilometers large, to be planted with either wheat or barley or some combination of the two. • The farmer has a limited permissible amount F of fertilizer and P of insecticide which can be used, each of which is required in different amounts per unit area for wheat (F1, P1) and barley (F2, P2). • Let S1 be the selling price of wheat, and S2 the price of barley. • If we denote the area planted with wheat and barley with x1 and x2 respectively, then the optimal number of square kilometers to plant with wheat vs barley can be expressed as a linear programming problem. Ref: Wikipedia
Example in Standard Form • maximize • S1x1 + S2x2 (maximize the revenue) • subject to • x1 + x2 ≤ A (limit on total area) • F1x1 + F2x2 ≤ F (limit on fertilizer) • P1x1 + P2x2 ≤ P (limit on insecticide) • x1 ≥ 0, x2 ≥ 0 (cannot plant a negative area) Ref: Wikipedia
Augmented Form • Most LP algorithms cannot solve a problem in standard form. • An augmented form that uses slack variables to remove the inequalities must be used. • Sophisticated LP packages take care of this automatically.
Example in Augmented Form • maximize • S1x1 + S2x2 (maximize the revenue) • subject to • x1 + x2 + x3 = A (limit on total area) • F1x1 + F2x2 + x4 = F (limit on fertilizer) • P1x1 + P2x2 + x5 = P (limit on insecticide) • x1, x2, x3, x4, x5 ≥ 0 Ref: Wikipedia
Solving LP Problems • Several algorithms and methods have been developed to solve LP problems • Simplex • Interior point methods • Projective method • Mehrotra predictor-corrector method
Integer Programming • Integer Programming (IP)Decision variables are required to be integers • 0-1 IPDecision variables must be either 1 or 0 • Mixed Integer Programming (MIP)Some decision variables are required to be integers
Sources of LP Solvers • Microsoft Excel • Mathematica • GNU Linear Programming Kit • Matlab (requires additional toolbox)