section1

# section1 - 1 Introduction An example To illustrate the idea...

This preview shows pages 1–4. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 Introduction An example To illustrate the idea of linear programming, we begin with an example. Consider the simple distribution problem illustrated below. Imagine we want to transport a total of ten pianos, from their current locations at three supply centers to two demand centers. The picture shows how many pianos each supply point has, and how many each demand point needs. Transporting one piano on the route between any particular supply and demand points incurs a cost, also shown in the picture (in thousands of dollars). Linear programs To model this problem mathematically, we introduce variables , p, q, r, s, t, u to represent the number of pianos we transport on each route: 2 These numbers must be nonnegative, and must satisfy certain supply and demand constraints : p + q = 2 r + s = 3 t + u = 5 p + r + t = 4 q + s + u = 6 . Among all possible values of the variables satisfying these constraints, our optimization problem is to choose the variables in order to minimize our objective function , the total transportation cost 4 p + 7 q + 6 r + 8 s + 8 t + 9 u. (1.1) This course concerns linear programs : optimization problems where we want to choose variables to satisfy given linear constraints, either equations (like those above) or inequalities ( ≤ or ≥ ), and in order to maximize or minimize a linear objective (like the function (1.1)). Computation Having set up a mathematical model of our problem, we can now apply a computational tool to solve it. In this course, we’ll use the AMPL language to model, solve, and analyze optimization problems computationally. The book [1] describes the language; the student version of AMPL is available at www.ampl.com . To solve our problem using AMPL, we first enter a “model” file: var P >= 0; # Variable: number of pianos on route... var Q >= 0; var R >= 0; var S >= 0; var T >= 0; var U >= 0; minimize Cost: 4*P + 7*Q + 6*R + 8*S + 8*T + 9*U; # Objective: total transportation cost subject to Sup1: P + Q = 2 ; 3 # Constraint: all supply used at supply point subject to Sup2: R + S = 3 ; subject to Sup3: T + U = 5 ; subject to Dem1: P + R + T = 4 ; # Constraint: all demand satisfied at demand point subject to Dem2: Q + S + U = 6 ; (The phrases after # signs are optional comments.) If we called this file transportation.mod , we can then invoke AMPL to solve it: ampl: model transportation.mod; ampl: solve; MINOS 5.5: optimal solution found. 4 iterations, objective 73 ampl: display P,Q,R,S,T,U; P = 2 Q = 0 R = 2 S = 1 T = 0 U = 5 AMPL has decided that the least we can spend to distribute the pianos is 73 thousand dollars, and AMPL indicates a strategy to accomplish this. We call 73 the optimal value of the problem....
View Full Document

## This note was uploaded on 01/09/2009 for the course ORIE 320 taught by Professor Bland during the Fall '07 term at Cornell.

### Page1 / 15

section1 - 1 Introduction An example To illustrate the idea...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online