Lecture 5

Linear Programming (6S) and Transportation Problem (8S)

1

Linear Programming
George Dantzig – 1914 -2005  Concerned with optimal allocation of limited resources such as

Materials  Budgets  Labor  Machine time

among competitive activities  under a set of constraints

George Dantzig – 1914 -2005

2

Product Mix Example (from session 1)

Type 1
Profit per unit Assembly time per unit Inspection time per unit Storage space per unit

Type 2 $50 10 hrs

Resource Assembly time Inspection time

Amount available 100 hours 22 hours 39 cubic feet

$60 4 hrs 2 hrs 3 cubic ft

1 hr Storage space 3 cubic ft

3

Linear Programming Example
Variables

Maximize 60X1 + 50X2 Subject to Objective function 4X1 + 10X2 <= 100 2X1 + 1X2 <= 22 Constraints 3X1 + 3X2 <= 39 Non-negativity Constraints X1, X2 >= 0
What is a Linear Program?

• A LP is an optimization model that has
• continuous variables • a single linear objective function, and • (almost always) several constraints (linear equalities or inequalities)

4

which is what model seeks to determine for example. determines value of best (optimum) solution among all feasible (satisfy constraints) values of the variables either maximization or minimization  Constraints   restrictions. which limit variables of the model limitations that restrict the available alternatives  Parameters: numerical values (for example.Linear Programming Model  Decision variables   unknowns. RHS of constraints)  Feasible solution: is one particular set of values of the decision variables that satisfies the constraints  Feasible solution space: the set of all feasible solutions  Optimal solution: is a feasible solution that maximizes or minimizes the objective function  There could be multiple optimal solutions 5 . amounts of either inputs or outputs  Objective Function   goal.

Another Example of LP: Diet Problem  Energy requirement : 2000 kcal  Protein requirement : 55 g  Calcium requirement : 800 mg Food Oatmeal Chicken Eggs Milk Pie Pork Energy (kcal) 110 205 160 160 420 260 Protein(g) 4 32 13 8 4 14 Calcium(mg) 2 12 54 285 22 80 Price per serving($) 3 24 13 9 24 13 6 .

Example of LP : Diet Problem  oatmeal: at most 4 servings/day  chicken: at most 3 servings/day  eggs: at most 2 servings/day  milk: at most 8 servings/day  pie: at most 2 servings/day  pork: at most 2 servings/day Design an optimal diet plan which minimizes the cost per day 7 .

minimize total cost minimize z = 3x1 + 24x2 + 13x3 + 9x4 + 24x5 + 13x6 8 .Step 1: define decision variables       x1 = # of oatmeal servings x2 = # of chicken servings x3 = # of eggs servings x4 = # of milk servings x5 = # of pie servings x6 = # of pork servings Step 2: formulate objective function • In this case.

0x48. 0x32.Step 3: Constraints  Meet energy requirement 110x1 + 205x2 + 160x3 + 160x4 + 420x5 + 260x6 2000    Meet protein requirement Meet calcium requirement Restriction on number of servings 4x1 + 32x2 + 13x3 + 8x4 + 4x5 + 14x6  55 2x1 + 12x2 + 54x3 + 285x4 + 22x5 + 80x6  800 0x14. 0x62 9 . 0x23. 0x52.

So. how does a LP look like? minimize 3x1 + 24x2 + 13x3 + 9x4 + 24x5 + 13x6 subject to 110x1 + 205x2 + 160x3 + 160x4 + 420x5 + 260x6 2000 4x1 + 32x2 + 13x3 + 8x4 + 4x5 + 14x6  55 2x1 + 12x2 + 54x3 + 285x4 + 22x5 + 80x6  800 0x14 0x23 0x32 0x48 0x52 0x62 10 .

50 per day 11 .5 0 2 Cost of diet = $96.Optimal Solution – Diet Problem Using LINDO 6.1 Food Oatmeal # of servings 4 Chicken Eggs Milk Pie Pork  0 0 6.

5 0 2 Cost of diet = $96.Optimal Solution – Diet Problem Using Management Scientist Food Oatmeal # of servings 4 Chicken Eggs Milk Pie Pork  0 0 6.50 per day 12 .

Guidelines for Model Formulation  Understand the problem thoroughly.  Define the decision variables.  Describe the objective.  Describe each constraint.  Write the constraints in terms of the decision variables  Do not forget non-negativity constraints 13 .  Write the objective in terms of the decision variables.

A Transportation Table 1 Factory 1 12 2 8 3 10 16 5 3 8 8 200 4 2 7 Warehouse 3 7 4 1 100 Factory 1 can supply 100 units per period 150 450 Demand 80 90 120 160 450 Total supply capacity per period Warehouse B’s demand is 90 units per period Total demand per period 14 .

4 15 .LP Formulation of Transportation Problem  minimize 4x11+7x12+7x13+x14+12x21+3x22+8x23+8x24 +8x31+10x32+16x33+5x34 Minimize total cost of transportation Subject to  x11+x12+x13+x14=100 Supply constraint for factories  x21+x22+x23+x24=200  x31+x32+x33+x34=150  x11+x21+x31=80  x12+x22+x32=90 Demand constraint of warehouses  x13+x23+x33=120  x14+x24+x34=160  xij>=0.2.3.3. i=1.2. j=1.

Solution in Management Scientist Total transportation cost = 4(80) + 7(0) + 7(10)+ 1(10) + 12(0) + 3(90) + 8(110) + 8(0) + 8(0) +10(0) + 16(0) +5 (150) = $2300 16 .

Solution using LINDO Notice multiple optimal solutions! 17 .

Product Mix Problem • • • • • Floataway Tours has $420. Floataway Tours wishes to have a total seating capacity of at least 200.000 that can be used to purchase new rental boats for hire during the summer. The boats can be purchased from two different manufacturers. At the same time. • Formulate this problem as a linear program 18 . They would also like to purchase the same number from Sleekboat as from Racer to maintain goodwill. Floataway Tours would like to purchase at least 50 boats.

Product Mix Problem Maximum Builder Cost $6000 $7000 $5000 $9000 Boat Expected Seating 3 5 2 6 Daily Profit $ 70 $ 80 $ 50 $110 Speedhawk Sleekboat Silverbird Sleekboat Catman Racer Classy Racer 19 .

Product Mix Problem  Define the decision variables x1 = number of Speedhawks ordered x2 = number of Silverbirds ordered x3 = number of Catmans ordered x4 = number of Classys ordered  Define the objective function Maximize total expected daily profit: Max: (Expected daily profit per unit) x (Number of units) Max: 70x1 + 80x2 + 50x3 + 110x4 20 .

000 (2) Purchase at least 50 boats: x1 + x2 + x3 + x4 > 50 (3) Number of boats from Sleekboat equals number of boats from Racer: x1 + x2 = x3 + x4 or x1 + x2 .2.x4 = 0 (4) Capacity at least 200: 3x1 + 5x2 + 2x3 + 6x4 > 200 Nonnegativity of variables: xj > 0.Product Mix Problem  Define the constraints (1) Spend no more than $420.4 21 .x3 . for j = 1.3.000: 6000x1 + 7000x2 + 5000x3 + 9000x4 < 420.

x3.x3 .Complete Formulation Max 70x1 + 80x2 + 50x3 + 110x4 s.x4 = 0 Speedhawk 28 3x1 + 5x2 + 2x3 + 6x4 > 200 Silverbird 0 x1.t.000 x1 + x2 + x3 + x4 > 50 Boat # purchased x1 + x2 .Product Mix Problem . x4 > 0 Catman 0 Classy  28 Daily profit = $5040 22 . x2. 6000x1 + 7000x2 + 5000x3 + 9000x4 < 420.

Marketing Application: Media Selection Advertising Media Day TV Evening TV Daily newspaper Sunday newspaper Radio # of potential customers reached 1000 2000 1500 2500 300 Cost ($) per advertisement 1500 3000 400 1000 100 Max times available per month 15 10 25 4 30 Exposure Quality Units 65 90 40 60 20      Advertising budget for first month = $30000 At least 10 TV commercials must be used At least 50000 customers must be reached Spend no more than $18000 on TV adverts Determine optimal media selection plan 23 .

SN. R >= 0 24 .Media Selection Formulation  Step 1: Define decision variables      Variable DTV ETV Value 10 0 DTV = # of day time TV adverts ETV = # of evening TV adverts DN = # of daily newspaper adverts SN = # of Sunday newspaper adverts R = # of radio adverts Maximize 65DTV+90ETV+40DN+60SN+20R <= ETV DN SN R <= <= <= <= + 1000SN + 100R <= >= <= + 1500DN + 2500SN + 300R >= 15 10 25 4 30 30000 10 18000 50000 DN SN 25 2   Step 2: Write the objective in terms of the decision variables  R 30 Step 3: Write the constraints in terms of the decision variables DTV Exposure = 2370 units Availability of Media Budget TV Constraints Customers reached 1500DTV DTV 1500DTV 1000DTV + + + + 3000ETV ETV 3000ETV 2000ETV + 400DN DTV. DN. ETV.

Applications of LP  Product mix planning  Distribution networks  Truck routing  Staff scheduling  Financial portfolios  Capacity planning  Media selection: marketing 25 .

Has an Optimal Solution    Optimal values of decision variables Optimal objective function value 26 .Possible Outcomes of a LP  A LP is either Infeasible – there exists no solution which satisfies all constraints and optimizes the objective function  or. Unbounded – increase/decrease objective function as much as you like without violating any constraint  or.

2.3.4 Total demand exceeds total supply 27 . i=1.3. j=1.Infeasible LP – An Example  minimize 4x11+7x12+7x13+x14+12x21+3x22+8x23+8x24+8x31+10x32+16 x33+5x34 Subject to  x11+x12+x13+x14=100  x21+x22+x23+x24=200  x31+x32+x33+x34=150      x11+x21+x31=80 x12+x22+x32=90 x13+x23+x33=120 x14+x24+x34=170 xij>=0.2.

Unbounded LP – An Example maximize 2x1 + x2 subject to -x 1 + x2  1 x1 .2x2  2 x1 . x2  0 x2 can be increased indefinitely without violating any constraint => Objective function value can be increased indefinitely 28 .

objective function = 2 29 . x2= 2/3. objective function = 2 • x1= 5/3.5 x2 subject to 2x1 + x2  4 x1 + 2x2  3 x 1 .Multiple Optima – An Example maximize x1 + 0. x2= 0. x2  0 • x1= 2.

Operations Scheduling Chapter 16 30 .

facilities and human activities in an organization Effective scheduling can yield    Cost savings Increases in productivity 31 .Scheduling  Establishing the timing of the use of equipment.

High-Volume Systems  Flow system: High-volume system with Standardized equipment and activities  Flow-shop scheduling: Scheduling for highvolume flow system Work Center #1 Work Center #2 Output 32 .

High-Volume Success Factors       Process and product design Preventive maintenance Rapid repair when breakdown occurs Optimal product mixes Minimization of quality problems Reliability and timing of supplies 33 .

determining the order in which jobs will be processed  Job-shop scheduling  Scheduling for low-volume systems with many variations in requirements 34 .Scheduling Low-Volume Systems  Loading .assignment of jobs to process centers  Sequencing .

Fri. Wed.2  Gantt chart . Thurs. Center 1 Job 3 Job 4 2 Job 3 Job 7 3 Job 1 Job 6 Job 7 4 Job 10 35 .used as a visual aid for loading and scheduling Work Mon.Gantt Load Chart Figure 16. Tues.

More Gantt Charts 36 .

Assignment Problem  Objective: Assign n jobs/workers to n machines such that the total cost of assignment is minimized  Special case of transportation problem  When # of rows = # of columns in the transportation tableau  All supply and demands =1  Plenty of practical applications  Job shops  Hospitals  Airlines. etc. 37 .

Cost Table for Assignment Problem Aircraft (j) 1 2 3 4 1 Pilot (i) $1 $9 $4 $8 $4 $7 $5 $7 $6 $10 $11 $8 $3 $9 $7 $5 2 3 4 All assignment costs in thousands of $ 38 .

Management Scientist Solution Pilot Assigned to Cost aircraft # (`000 $) 1 2 3 4 1 3 2 4 1 10 5 5 39 .

4 0 otherwise 40 .2.2. if pilot i is assigned to aircraft j. x23=1. i=1.Formulation of Assignment Problem  minimize x11+4x12+6x13+3x14 + 9x21+7x22+10x23+9x24 + 4x31+5x32+11x33+7x34 + 8x41+7x42+8x43+5x44 subject to Pilot Assigned to Cost  x11+x12+x13+x14=1 aircraft # (`000 $)  x21+x22+x23+x24=1 1 1 1  x31+x32+x33+x34=1  x41+x42+x43+x44=1 2 3 10 3 2 5  x11+x21+x31+x41=1 4 4 5  x12+x22+x32+x42=1 Optimal Solution:  x13+x23+x33+x43=1 x11=1.3. x32=1. j=1.3.4. rest=0  x14+x24+x34+x44=1  Cost of assignment = 1+10+5+5=$21 (`000) xij = 1. x44=1.

Workstation: An area where one person works.   FCFS .earliest due date 41 . usually with special equipment.Sequencing    Sequencing: Determine the order in which jobs at a work center will be processed. on a specialized job. first served SPT .shortest processing time  In-class example Minimizes mean flow time  EDD .first come. Priority rules: Simple heuristics used to select the order in which jobs will be processed.

 Lateness = flow time – due date  Tardiness = max {lateness. waiting time.Performance Measures  Job flow time   Length of time a job is at a particular workstation Includes actual processing time. 0}  Makespan   Total time needed to complete a group of jobs Length of time between start of first job and completion of last job 42 . transportation time etc.

Scheduling Difficulties  Variability in  Setup times  Processing times  Interruptions  Changes in the set of jobs  No method for identifying optimal schedule  Scheduling is not an exact science  Ongoing task for a manager 43 .

Minimizing Scheduling Difficulties    Set realistic due dates Focus on bottleneck operations Consider lot splitting of large jobs 44 .