ENCE 603 Management Science Applications in Project Management Lectures 5-7 Project Management LP Models in Scheduling, Integer Programming



Similar documents
Goals of the Unit. spm adolfo villafiorita - introduction to software project management

Project and Production Management Prof. Arun Kanda Department of Mechanical Engineering Indian Institute of Technology, Delhi

Chapter 13: Binary and Mixed-Integer Programming

Scheduling Glossary Activity. A component of work performed during the course of a project.

Precedence Diagram Method. CSTM 462 Planning & Scheduling

Appendix A of Project Management. Appendix Table of Contents REFERENCES...761

Project Management Glossary

Chapter-6. Developing a Project Plan

Egypt Scholars Presented by Mohamed Khalifa Hassan Jan 2014

Application Survey Paper

Scheduling Fundamentals, Techniques, Optimization Emanuele Della Valle, Lecturer: Dario Cerizza

Project Time Management

Scheduling. Anne Banks Pidduck Adapted from John Musser

Project Time Management

Project Planning and Scheduling

The work breakdown structure can be illustrated in a block diagram:

Project Scheduling. Introduction

Information Technology Project Management

5 INTEGER LINEAR PROGRAMMING (ILP) E. Amaldi Fondamenti di R.O. Politecnico di Milano 1

Chapter 11 Monte Carlo Simulation

CHAPTER 1. Basic Concepts on Planning and Scheduling

Time Management. Part 5 Schedule Development. Richard Boser

Project Scheduling: PERT/CPM

The Project Planning Process Group

Project Time Management

Basic CPM Calculations

ME 407 Mechanical Engineering Design Spring 2016

Project Planning. Lecture Objectives. Basic Reasons for Planning. Planning. Project Planning and Control System. Planning Steps

PROJECT TIME MANAGEMENT. 1 Powered by POeT Solvers Limited

Chapter 2: Project Time Management

Operational Research. Project Menagement Method by CPM/ PERT

INTEGER PROGRAMMING. Integer Programming. Prototype example. BIP model. BIP models

Chapter 11: PERT for Project Planning and Scheduling

MECH 896 Professional Development for MEng Students. Homework Discussion. Scheduling Overview. Winter 2015: Lecture #5 Project Time Management

Linear Programming Notes VII Sensitivity Analysis

SCHEDULING AND TIME MANAGEMENT. Project Management and Leadership 2015D, PhD, PMP

CPM-200: Principles of Schedule Management

Hands on Microsoft Project (Part I) From a WBS to a Complete Schedule Emanuele Della Valle, Lecturer: Dario Cerizza

PROJECT TIME MANAGEMENT

Approximation Algorithms

A Computer Application for Scheduling in MS Project

Review on Using Packages to Enhance the Teaching of Critical Path Networks

Network analysis: P.E.R.T,C.P.M & Resource Allocation Some important definition:

Project Management Chapter 3

Featured Paper Satya Narayan Dash By Satya Narayan Dash, PMP, CSM, MCP

Notes on the Critical Path Method for project planning and management.

CSC 443: IT Project Management Midterm 1 exam - Spring semester March 21 st, 2012

Dynamic programming. Doctoral course Optimization on graphs - Lecture 4.1. Giovanni Righini. January 17 th, 2013

Project Scheduling: PERT/CPM

Scheduling Home Health Care with Separating Benders Cuts in Decision Diagrams

Microsoft Project From the WBS to a Complete Schedule Emanuele Della Valle, Lecturer: Dario Cerizza

Chapter 6: Project Time Management. King Fahd University of Petroleum & Minerals SWE 417: Software Project Management Semester: 072

Unit 1: Project Planning and Scheduling

Importance of Project Schedules. matter what happens on a project. projects, especially during the second half of projects

Cambridge International AS and A Level Computer Science

Network Diagram Critical Path Method Programme Evaluation and Review Technique and Reducing Project Duration

Discrete Optimization

Chapter 4: Project Time Management

10 Project Management with PERT/CPM

Scheduling Best Practices

ONLINE SUPPLEMENTAL BAPPENDIX PROJECT SCHEDULES WITH PERT/CPM CHARTS

A SIMULATION MODEL FOR RESOURCE CONSTRAINED SCHEDULING OF MULTIPLE PROJECTS

Project Creation and Gantt Chart Design Using Microsoft Project. R. Baker. The University of Tampa

PROJECT EVALUATION REVIEW TECHNIQUE (PERT) AND CRITICAL PATH METHOD (CPM)

Project Management DISCUSSION QUESTIONS

Project Time Management Activity Definition Activity Sequencing Duration Estimating Schedule Development Schedule Control

Chapter 6: Sensitivity Analysis

Administration. Welcome to the Eastwood Harris Pty Ltd MICROSOFT PROJECT 2010 AND PMBOK GUIDE FOURTH EDITION training course presented by

CRITICAL PATH METHOD (CPM) SCHEDULES

Chapter Load Balancing. Approximation Algorithms. Load Balancing. Load Balancing on 2 Machines. Load Balancing: Greedy Scheduling

Unit 4: Time Management (PMBOK Guide, Chapter 6)

CRITICAL PATH METHOD (CEE 320 VDC SEMINAR)

22 Project Management with PERT/CPM

Problems, Methods and Tools of Advanced Constrained Scheduling

Network Calculations

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. !-approximation algorithm.

SE351a: Software Project & Process Management

CSSE 372 Software Project Management: Software Project Scheduling

March 30, 2007 CHAPTER 4

24. The Branch and Bound Method

1 Introduction. Linear Programming. Questions. A general optimization problem is of the form: choose x to. max f(x) subject to x S. where.

Learning Objectives. Learning Objectives (continued) Importance of Project Schedules

WORK PROGRAM GUIDELINES

8. Project Time Management

Tasks can be added manually by typing them into the list Manually adding tasks put the project manager in control and is a good way to start

Project Time Management

Project Management. Week 4- Project Planning and Network Diagrams

02 Project planning. There are two approaches to identifying the components of a project: productbased and work- or activity-based.

Lecture 6: Project Time Management By: Prof. Lili Saghafi. Information Technology Project Management, Fifth Edition

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. #-approximation algorithm.

Scheduling Shop Scheduling. Tim Nieberg

Object-Oriented Analysis. with the Unified Process. John W. Satzinger Southwest Missouri State University. Robert B. Jackson Brigham Young University

The Problem of Scheduling Technicians and Interventions in a Telecommunications Company

Chapter 10: Network Flow Programming

SYSTEMS ANALYSIS AND DESIGN DO NOT COPY

Test Fragen. October 2003 Project Management Wilhelm F. Neuhäuser IBM Corporation 2003

Chapter 6: Project Time Management

MnDOT Project Management Office Presents: Schedule Float. Presenter: Jonathan McNatty, PSP Senior Schedule Consultant DRMcNatty & Associates, Inc.

CHAPTER 4 LINEAR SCHEDULING METHOD (LSM) AND ITS APPLICATIONS

Module 3: The Project Planning Stage

Transcription:

ENCE 60 Management Science Applications in Project Management Lectures 5-7 Project Management LP Models in Scheduling, Integer Programming Spring 009 Instructor: Dr. Steven A. Gabriel www.eng.umd.edu/~sgabriel Outline Project Scheduling Critical Path Method (CPM) AON and AOA methods Project Crashing Precedence Diagramming Method (PDM) Gantt Charts

Project Networks Project activities described by a network Can use the activity-on-node (AON) model Nodes are activities, arrows (arcs) indicate the precedence relationships Could also consider the activity-on-arc (AOA) model which has arcs for activities with nodes being the starting and ending points AON used frequently in practical, non-optimization situations, AOA is used in optimization settings First AON, then AOA Main idea for both is to determine the critical path (e.g., tasks whose delay will cause a delay for the whole project) Project Networks Sample project network (AON) (read left to right) Dashed lines indicate dummy activities Key: Activity, Duration (days) 4

Network Analysis Network Scheduling: Main purpose of CPM is to determine the critical path Critical path determines the minimum completion time for a project Use forward pass and backward pass routines to analyze the project network Network Control: Monitor progress of a project on the basis of the network schedule Take correction action when required Crashing the project Penalty/reward approach 5 Activity on Node (AON) Representation of Project Networks 6

Project Networks A: Activity identification (node) ES: Earliest starting time EC: Earliest completion time LS: Latest starting time LC: Latest completion time t: Activity duration P(A): set of predecessor nodes to node A S(A): set of successor nodes to node A 7 Project Networks In tabular form Activity Predecessor Duration A n/a B n/a 6 C n/a 4 D A E C 5 F A 4 G B,D,E Sample Computations ES(A) =Max{EC(j), j in P(A)}=EC(start)=0 EC(A)=ES(A)+t A =0+= ES(B)= EC(start)=0 EC(B)=ES(B)+ t B =0+6=6 ES(F)= EC(A)= EC(F)= ES(F)+4=6, etc. A, F,4 D, start B,6 G, end C,4 E,5 8 4

Project Networks Notation: Above node ES(i), EC(i), below node LS(i),LC(i) Zero project slack convention in force 0,,6 0,0 start 0,0 A, 4,6 D, 0,6 6,9 B,6 0,4,9 4,9 C,4 E,5 0,4 4,9,5 F,4 9, G, 9, 7,, end, Sample Computations LC(F) =Min{LS(i), i in S(F))}= LS(F)=LC(F)-t F =-4=7 etc. 9 Project Networks During the forward pass, it is assumed that each activity will begin at its earliest starting time An activity can begin as soon as the last of its predecessors has finished A B C must wait for both A and B to finish before it can start Completion of the forward pass determines the C earliest completion time of the project During the backward pass, it is assumed that each activity begins at its latest completion time Each activity ends at the latest starting time of the first activity in the project network 0 5

Project Networks Note: =first node (activity),n=last node,i,j=arbitrary nodes, P(i)= immediate predecessors of node i, S(j)= immediate successors of node j, T p =project deadline time 4 5 P()= {,} S()= {4,5} Rule : ES()=0 (unless otherwise stated) Rule : ES(i)=Max j in P(i) {EC(j)} Why do we use max of the predecessor EC s in rule? i i i i Project Networks Rule : EC(i)=ES(i)+t i Rule 4: EC(Project)=EC(n) Rule 5: LC(Project)=EC(Project) zero project slack convention (unless otherwise stated for example, see Rule 6) Rule 6: LC(Project)=Tp Rule 7: LC(j) =Min i in S(j) LS(i) Rule 8: LS(j)=LC(j)-tj Why do we use min in the successor LS s in rule 7? j j j j 6

Project Networks Total Slack: Amount of time an activity may be delayed from its earliest starting time without delaying the latest completion time of the project TS(j)=LC(j)-EC(j) or TS(j)=LS(j)-ES(j) Those activities with the minimum total slack are called the critical activities (e.g., kitchen cabinets ) Examples of activities that might have slack Free Slack: Amount of time an activity may be delayed from its earliest starting time without delaying the starting time of any of its immediate successors. FS(j)= Min i in S(j) {ES(i)-EC(j) Let s consider the sample network relative to critical activities and slack times CPM-Determining the Critical Path AON Step : Complete the forward pass Step : Identify the last node in the network as a critical activity Step : If activity i in P(j) and activity j is critical, check if EC(i)=ES(j). If yes activity i is critical. When all i in P(j) done, mark j as completed Step 4: Continue backtracking from each unmarked node until the start node is reached 4 7

CPM-Forward Pass Example AON 0,,6 0,0 start A, D, 0,6 B,6 0,4 4,9,5 F,4 9, G,, end C,4 Activity Predecessor Duration A - B - 6 C - 4 D A E C 5 F A 4 G B,D,E E,5 Notation: Above node ES(i), EC(i) Sample Computations ES(A) =Max{EC(j), j in P(A)}=EC(start)=0 EC(A)=ES(A)+t A =0+= ES(B)= EC(start)=0 EC(B)=ES(B)+ t B =0+6=6 ES(F)= EC(A)= EC(F)= ES(F)+4=6, etc. 5 CPM-Backward Pass Example AON Notation: Above node ES(i), EC(i), below node LS(i),LC(i) Zero project slack convention in force 0,,6 0,0 start 0,0 A, 4,6 D, 0,6 6,9 B,6 0,4,9 4,9 C,4 E,5 0,4 4,9,5 F,4 7,, 9, end G,, 9, Sample Computations LC(F) =Min{LS(i), i in S(F))}= LS(F)=LC(F)-t F =-4=7 etc. 6 8

CPM-Slacks and the Critical Path AON Total Slack: Amount of time an activity may be delayed from its earliest starting time without delaying the latest completion time of the project TS(j)=LC(j)-EC(j) or TS(j)=LS(j)-ES(j) Those activities with the minimum total slack are called the critical activities. Examples of activities that might have slack Free Slack: Amount of time an activity may be delayed from its earliest starting time without delaying the starting time of any of its immediate successors. FS(j)= Min i in S(j) {ES(i)-EC(j)} Other notions of slack time, see Badiru-Pulat Let s consider the sample network relative to critical activities and slack times 7 CPM Analysis for Sample Network AON Activity Duration (Days) ES EC LS LC TS FS Critical Activity? A 0 4 6 6-=4 Min{,}-=0 No B 6 0 6 9 9-6= Min{9}-6= No C 4 0 4 0 4 4-4=0 Min{4}-4=0 YES D 5 6 9 9-5=4 Min{9}-5=4 No E 5 4 9 4 9 9-9=0 Min{9}-9=0 YES F 4 6 7-6=5 Min{}-6=5 No G 9 9 -=0 Min{}-=0 YES 0,,6 A, F,4,5 4,6 7, D, 0,0 0,6 9, 6,9 start G, B,6 0,0 0,4,9 4,9 C,4 E,5 9, 0,4 4,9 8 Total Project Slack TS()+TS(C)+TS(E)+TS(G)+TS(n)=0, end, 9

Project Networks When results of a CPM analysis are matched up with a calendar, then we obtain a project schedule Gantt chart is a popular way to present this schedule Using the ES times from the sample AON project network, we have the following Gantt chart (could also use latest completion times as well, extreme case when all slack times are fully used) 9 G F E D C B A Project Networks 4 5 6 7 8 9 0 Days Note, Gantt chart shows for example: Starting time of F can be delayed until day 7 (TS=5) w/o delaying overall project Also, A, D, or both may be delayed by a combined total of four days (TS=4) w/o delaying the overall project B may be delayed up to days without affecting the overall project completion time Can ignore precedence arrows (better 0 for large networks) 0

Activity on Arc (AOA) Representation of Project Networks Project Networks: Activity on Arc (AOA) Representation Node i Nodes represent the realizations of some milestones (events) of the project Arcs represent the activities Node i, the immediate predecessor node of arc(i,j) is the start node for the activity Node j, the immediate successor node of arc(i,j) is the end node for the activity Want to determine the critical path of activities, i.e., those with the least slack arc(i,j)=activity(i,j) Node j

Activity on Arc (AOA) Representation The early event time for node i, ET(i), is the earliest time at which the event corresponding to node i can occur The late event time for node i, LT(i), is the latest time at which the event corresponding to node i can occur w/o delaying the completion of the project Let t ij be the duration of activity (i,j) The total float (slack) TF(i,j) of activity (i,j) is the amount by which the starting time of (i,j) could be delayed beyond its earliest possible starting time w/o delaying the completion of the project (assuming no other activities are delayed) TF(i,j)=LT(j)-ET(i)-t ij The free float of (i,j), FF(i,j) is the amount by which the starting time of activity (i,j) can be delayed w/o delaying the start of any later activity beyond its earliest possible starting time FF(i,j) = ET(j)-ET(i)-t ij AOA Network Structure The network is acyclic (o/w an activity would precede itself) Each node should have at least one arc directed into the node and one arc directed out of the node (with the exception of the start and end nodes), why? Start node has does not have any arc into it and the end node has no arc out of it All of the nodes and arcs of the network have to be visited (that is realized) in order to complete the project, why? 4

AOA Network Structure If a cycle exists (due perhaps to an error in the network construction), this will lead to cycling in the procedures More specifically, critical path calculations will not terminate Need a procedure to detect cycles in the project network (e.g., Depth-First Search method) 5 Rules in AOA Networks. Node represents the start of the project. An arc should lead from node to represent each activity that has no predecessors.. A node (called the finish or end node) representing completion of the project should be included in the network.. Number the nodes in the network so that the node representing the completion of an activity always has a larger number than the node for the start of an activity (more than way to do this). 4. An activity should not be represented by more than one arc in the network. 5. Two nodes can be connected by at most one arc. 6

Small Sample Project Activity A B C D E F G Predecessor - - - A C A B,D,E Duration 6 4 5 4 7 Small Sample Project AOA 8 4

Using Linear Programming to Find a Critical Path Let x j = the time that the event corresponding to node j occurs Let t ij =the time to complete activity (i,j) For each activity (i,j), we know that before node j occurs, node i must occur and activity (i,j) must be completed x x + t, ( i, j) j i ij Let be the index of the start node Let F be the index of the finish node (i.e., when the project is completed) LP objective function is to minimize x F -x, i.e., the total project time 9 Using Linear Programming to Find a Critical Path Min x5 x A) x >= x + B) x4 >= x + 6 C) x >= x + 4 D) x4 >= x + E) x4 >= x + 5 F) x5 >= x + 4 G) x5 >= x4 + Variables unrestricted in sign 0 5

Using Linear Programming to Find a Critical Path Min x5 - x A) x - x >= B) x4 - x >= 6 C) x - x >= 4 D) x4 - x >= E) x4 - x >= 5 F) x5 - x >= 4 G) x5 - x4 >= end free x free x free x free x4 free x5 OBJECTIVE FUNCTION VALUE.00000 VARIABLE VALUE REDUCED COST X5.000000 0.000000 X 0.000000 0.000000 X 6.000000 0.000000 X4 9.000000 0.000000 X 4.000000 0.000000 Using Linear Programming to Find a Critical Path Min x5 - x A) x - x >= B) x4 - x >= 6 C) x - x >= 4 D) x4 - x >= E) x4 - x >= 5 F) x5 - x >= 4 G) x5 - x4 >= end free x free x free x free x4 free x5 ROW SLACK OR SURPLUS DUAL PRICES A) 4.000000 0.000000 B).000000 0.000000 C) 0.000000 -.000000 D) 0.000000 0.000000 E) 0.000000 -.000000 F).000000 0.000000 G) 0.000000 -.000000 6

Using Linear Programming to Find a Critical Path For each variable with zero value and zero reduced cost there is an alternative optimal solution. For each constraint with zero slack and zero dual variable there is an alternative optimal solution. For each constraint with a dual price of, increasing the duration of the activity corresponding to that constraint by one day will increase the duration of the project by one day. Those constraints identify the critical activities. AOA Project Network: After-Work-Hours Chores start a Activity a b c d e f g h i j k l m 5 6 f b c e g d 4 Description h Dad, Mom, and son arrive home in the same car Dad and Mom change clothes Son watches TV Mom warns up the food* Dad sets the table Son does homework** Mom fixes salad The family eats dinner Dad loads the dishwasher Mom checks son s homework Son practices (insert musical instrument name here) All go to son s basketball game All wash up and go to bed 4 b c d e,f,g h h h i,j,k l k 7 i Immediate Predecessors - a a b j 8 0 9 dummy arc dummy arc l m end *For politically correct project networks, Mom and Dad are interchangeable. ** In a perfect world, activity f precedes activity c! 7

Dummy Arcs in AOA Networks Since activities: i (Dad loads dishwasher),j (Mom checks son s homework), and k (son practices musical instrument) all have the same predecessor activity h (family eats dinner) and the same immediate successor, activity l (go to basketball game), this would mean parallel arcs between nodes 7 and 0 An activity network allows only one arc between any two nodes so nodes 8 and 9 are drawn and connected to node 0 via dummy arcs 5 Finding the Critical Path in an AOA Project Network for Introducing a New Product Activity Description Immediate Predecessors Duration (Days) a Train workers - 6 b Purchase raw materials - 9 c Produce product a,b 8 d Produce product a,b 7 e Test product d 0 f Assemble products and into new product c,e c f a 5 6 b d dummy arc 4 e 6 8

Finding the Critical Path in an AOA Project Network for Introducing a New Product min x6-x x-x>=6! arc (,) x-x>=9! arc (,) x5-x>=8! arc (,5) x4-x>=7! arc (,4) x5-x4>=0! arc (4,5) x6-x5>=! arc (5,6) x-x>=0! arc (,) end! could have variables free or not!free x x x x4 x5 x6 Why variables free (i.e., not necessarily nonnegative)? When ok, when not? Excel version of this LP? 7 Finding the Critical Path in an AOA Project Network for Introducing a New LP OPTIMUM FOUND AT STEP Product OBJECTIVE FUNCTION VALUE ) 8.00000 VARIABLE VALUE REDUCED COST X6 8.000000 0.000000 X 0.000000 0.000000 X 9.000000 0.000000 X 9.000000 0.000000 X5 6.000000 0.000000 X4 6.000000 0.000000 ROW SLACK OR SURPLUS DUAL PRICES ).000000 0.000000 ) 0.000000 -.000000 4) 9.000000 0.000000 5) 0.000000 -.000000 6) 0.000000 -.000000 7) 0.000000 -.000000 8) 0.000000 -.000000 Project completed in 8 days LP will have many alternate optima all with 8 days. In general, the value of x i in an optimal solution may assume any value between ET(i) and LT(i). Critical path goes from start to finish node in which each arc corresponds to a constraint with dual price =-, i.e., ---4-5-6 is a CP (more on dual prices later...) 8 9

Finding the Critical Path in an AOA Project Network for Introducing a New Product For each constraint with a dual price of, increasing the duration of the activity corresponding to that constraint by delta days will increase the duration of the project by delta days This assumes that the current vertex remains optimal Now we consider a time-cost tradeoff approach to scheduling 9 Project Crashing in Activity on Arc (AOA) Project Networks 40 0

Project Crashing and Time-Cost Analysis, Sample Data Project Duration T= T=0 T=0 T=0 T=9 T=9 T=9 T=9 T=8 T=8 T=8 T=7 Crashing Strategy S S S S4 S5 S6 S7 S8 S9 S0 S S Description of Crashing Activities at normal duration Crash F by unit Crash C by unit Crash E by unit Crash F and C by unit Crash F and E by unit Crash C and E by unit Crash E by units Crash F, C, and E by unit Crash F by unit, E by units Crash C by unit, E by units Crash F and C by unit, and E by units 4 Total Cost $,775 $,800 $,05 $,875 $,050 $,900 $,5 $,975 $,50 $,000 $,5 $,500 If c crashable activities, there are c possible crash strategies, why? Suppose we can crash 6 of the 7 activities 6 =64 possible crash strategies There are of the 64 strategies shown here Project Crashing and Time- Cost Analysis 4

Project Crashing and Time-Cost Analysis A Specific Example Define the variables: A= # of days by which activity a is reduced (unit cost =$0) B= # of days by which activity b is reduced (unit cost =$0) C= # of days by which activity c is reduced (unit cost =$) D= # of days by which activity d is reduced (unit cost =$0) E= # of days by which activity e is reduced (unit cost =$40) F= # of days by which activity f is reduced (unit cost =$50) We have the following LP 4 Project Crashing and Time-Cost Analysis -An Example min 0A+0B+C+0D+40E+50F A<=5 B<=5 C<=5 D<=5 E<=5 F<=5 x-x+a>=6! arc (,) x-x+b>=9! arc (,) x5-x+c>=8! arc (,5) x4-x+d>=7! arc (,4) x5-x4+e>=0! arc (4,5) x6-x5+f>=! arc (5,6) x-x>=0! arc (,) x6-x<=5! at most 5 days end! could have variables free or not!free x x x x4 x5 x6 Excel version of this LP? 44

Project Crashing and Time-Cost Analysis -An Example b 0 9 6 c f 8 a 5 6 dummy arc 9 4 6 d e Normal AOA network Total project time=8 days CP=---4-5-6 Numbers by nodes are solution b 0 4 c f 5 a 5 6 dummy arc 4 4 6 d e 45 Crashed AOA network Total cost = $90 Total project time=5 days CPs=---4-5-6, --4-5-6 Numbers by nodes are solution Crash variables: A=,B=5,C=0,D=5,E=,F=0 Precedence Diagramming Method in Activity on Arc (AOA) Project Networks 46

Precedence Diagramming Method (PDM) Normal CPM assumptions are that a task B cannot start until its predecessor task A is completely finished PDM allows activities that are mutually dependent to be performed partially in parallel instead of serially The usual finish-to-start dependencies are relaxed so that the performance of the activities can be overlapped The result is that the project schedule can be compressed (like project crashing in that sense) 47 Precedence Diagramming Method (PDM) The time between the finishing or starting time of the st activity and the finishing or starting time of the nd activity is called the lead-lag requirement between the two activities Four basic lead-lag relationships to consider:. Start-to-Start Lead (SS AB ) This specifies that activity B cannot start until activity A has been in progress for at least SS time units SS Example? A B 48 4

Precedence Diagramming Method (PDM). Finish-to-Finish Lead (FF AB ) This specifies that activity B cannot finish until at least FF time units after the completion of activity A Example? A B FF 49 Precedence Diagramming Method (PDM). Finish-to-Start Lead (FS AB ) This specifies that activity B cannot start until at least FS time units after the completion of activity A (CPM takes FS AB =0) Example? A B FS 50 5

Precedence Diagramming Method (PDM) 4. Start-to-Finish Lead (SF AB ) This specifies that there must be at least SF time units between the start of activity A and the completion of activity B Example? A SF Can also express the leads or lags in percentages (instead of time units) Can also use at most relationships as well as the at least ones shown above 5 B Precedence Diagramming Method (PDM) An example: activities done in series project duration of 0 days using conventional CPM method 0,0 0,0 0,0 A,0 B,0 C,0 0,0 0,0 0,0 C B A 5 0 5 0 5 0 5 40 45 50 5 Days 6

Precedence Diagramming Method (PDM) The same activities done in series but with lead-lag constraints project duration of 4 days, a 6 day speedup over the conventional CPM method 0,0, 4,4 A,0 B,0 C,0 C 0,0, SS(AB)= 4,4 SS(BC)= FF(AB)= FF(BC)= B A 4 0 4 5 Days Must be careful about possible anomalies in PDM Example: Precedence Diagramming Method (PDM) 0,0 0,0 0,0 A,0 B,0 C,0 0,0 FF(AB) 0,0 SS(BC) 0,0 =0 =0 Now crash B and reduce the duration of task B from 0 days to 5 days You would think that the total projection duration would decrease from 0 to something lower However, the SS(BC) constraint forces the starting time of C to be shifted forward by 5 days project duration actually increases even though B s duration has decreased! 54 7

Precedence Diagramming Method (PDM) A FF(AB)=0 0 0 B 0 C 0 Before B s time is reduced SS(BC)=0 A FF(AB)=0 0 0 5 B 0 5 SS(BC)=0 C 5 After B s time is reduced As a safeguard, may want to perform one activity change at a time and record the result 55 Precedence Diagramming Method Example You are a planner at the National Aeronautics and Space Administration (NASA) planning the next major rocket development, production, and launching to the planet Neptune. Due to the particular positioning of the planet Neptune relative to Earth and the other planets in between, the rocket must be within 00,000 kilometers of the planet Saturn somewhere between 0 and 5 months from today in order to make it to Neptune in a reasonable amount of time. If this time window is not satisfied, the cost of reaching Neptune skyrockets dramatically (no pun intended). For example, if the time is greater than 5 months, it is estimated that $00 million more are needed to reach Neptune due to additional engineering considerations. Consider the following set of activities related to this project shown in the following table. 56 8

PDM-AOA Project Network for Example Activity Activity Immediate Duration (months) Description Predecessors A Develop trajectory - 5 plan for rocket B Generate A specifications for rocket design C Request funding from B Congress D Begin initial search B 6 for contractors E Prepare modified C budget (using suggestions from Congress) F Select rocket D,E contractor G Build and test rocket F 48 H Create simulation F 4 model for rocket trajectory I Prepare rocket launch G,H & launch rocket J Proceed towards I 6 Jupiter and then perform gravitational slingshot maneuver around Jupiter K Achieve Saturn orbit (within 00,000 kilometers) J A,5 dummy arc precedence arc B, D,6 5 C, 4 E, F, 6 H,4 G,48 8 7 9 I, 0 J,6 K, 57 PDM-Example Compute the critical paths and project duration by formulating and solving an appropriate LP model to capture the precedence relationships between the activities. Let xi be the time for node i. The associated LP model is thus: min x-x A) x-x >= 5! A B) x-x >=! B C) x4-x >=! C D) x5-x >= 6! D E) x5-x4 >=! E F) x6-x5 >=! F G) x7-x6 >= 48! G H) x8-x6 >= 4! H DU)x9-x8 DU)x9-x7 I) x0-x9 >=! I J) x-x0 >= 6! J K) x-x >=! K >= 0! dummy arc >= 0! dummy arc 58 A,5 B, D,6 5 C, dummy arc precedence arc 4 E, F, 6 G,48 7 H,4 8 9 I, 0 J,6 K, 9

PDM-Example OBJECTIVE FUNCTION VALUE ) 50.0000 VARIABLE VALUE REDUCED COST X 50.000000 0.000000 X 0.000000 0.000000 X 5.000000 0.000000 X 7.000000 0.000000 X4 9.000000 0.000000 X5 4.000000 0.000000 X6 5.000000 0.000000 X7 0.000000 0.000000 X8 77.000000 0.000000 X9 0.000000 0.000000 X0.000000 0.000000 X 49.000000 0.000000 ROW SLACK OR SURPLUS DUAL PRICES A) 0.000000 -.000000 B) 0.000000 -.000000 C) 0.000000 -.000000 D) 8.000000 0.000000 E) 0.000000 -.000000 F) 0.000000 -.000000 G) 0.000000 -.000000 H) 0.000000 0.000000 DU) 4.000000 0.000000 DU) 0.000000 -.000000 I) 0.000000 -.000000 J) 0.000000 -.000000 K) 0.000000 -.000000 A,5 dummy arc 59 B, precedence arc C, critical path arc 5 4 D,6 E, F, 6 G,48 7 H,4 8 9 I, 0 We see that the project time is 50 months which is too high (greater than 5 months). J,6 K, PDM-Example Question: Due to various reasons, it is believed that activities A, B, C, and D can be sped up as follows. Activity B can start as soon as month after A starts. Activity C can start as soon as month after activity B starts. Activity D can start as soon as one month after activity C starts. The total cost for this acceleration is $5,000,000. Modify the project network from part a (i.e., the uncrashed one) to allow for these possibilities. What is the total project time allowing for these changes? Note: Could also try project crashing to speed things up, not considered here. 60 0

PDM Combined with LP Create one start and one end node for each activity that has a PDM rule. Insert arrows to enforce the new relationships Solve as previous cases 6 PDM-Example Answer: We can modify the AOA network to include two nodes for A, namely A and A when activity A starts and when it finishes, respectively. The same modification can be applied to activities B, C, and D. We need to make sure that the earliest that B can start is month after A, the earliest that C can start is month after B, and the earliest that D can start is month after C. The resulting new project network is as follows. Note: there is some arbitrariness in connecting A, B, and D, other slight variations are possible. A,5 A A B C D B, C, D,6 B C D 6 dummy arc precedence arc ti i 4 E, 5 F,9 6 G,8 7 H,4 8 ti= time that node i is visited 9 I, 0 J,6 K,

A B C D A,5 B, C, D,6 A B C D dummy arc precedence arc ti i 4 PDM-Example E, 5 F,9 6 G,8 7 H,4 8 ti= time that node i is visited 9 I, 0 J,6 K, New model is thus: min x-xa A) xa-xa>= 5! A B) xb-xb>=! B C) xc-xc>=! C D) xd-xd>= 6! D SS)xb-xa>=! SS(A,B)= SS)xc-xb>=! SS(B,C)= SS)xd-xc>=! SS(C,D)= A) xb-xa>= 0! A before B B) xc-xb>= 0! B before C C) x4 -xc>= 0! C before 4 D) x5 -xd>= 0! D before 5 E) x5 -x4 >=! E F) x6 -x5 >=! F G) x7 -x6 >= 48! G H) x8 -x6 >= 4! H DU) x9 -x8>= 0! dummy arc DU) x9 -x7>= 0! dummy arc I) x0-x9 >=! I J) x-x0>= 6! J K) x-x>=! K 6 PDM-Example OBJECTIVE FUNCTION VALUE ) 5.0000 VARIABLE VALUE REDUCED COST X 5.000000 0.000000 XA 0.000000 0.000000 XA 4.000000 0.000000 XB 4.000000 0.000000 XB.000000 0.000000 XC 4.000000 0.000000 XC.000000 0.000000 XD 6.000000 0.000000 XD.000000 0.000000 X4 4.000000 0.000000 X5 6.000000 0.000000 X6 8.000000 0.000000 X7 86.000000 0.000000 X8 86.000000 0.000000 X9 86.000000 0.000000 X0 98.000000 0.000000 X 4.000000 0.000000 ROW SLACK OR SURPLUS DUAL PRICES A) 9.000000 0.000000 B).000000 0.000000 C) 0.000000 -.000000 D) 7.000000 0.000000 SS) 0.000000 -.000000 SS) 0.000000 -.000000 SS) 0.000000 0.000000 A) 0.000000 0.000000 B) 0.000000 0.000000 C) 0.000000 -.000000 D) 0.000000 0.000000 E) 0.000000 -.000000 F) 0.000000 -.000000 G) 0.000000 -.000000 H) 4.000000 0.000000 DU) 0.000000 0.000000 DU) 0.000000 -.000000 I) 0.000000 -.000000 J) 0.000000 -.000000 K) 0.000000 -.000000 Total project time is 5 months, still too big, will need to consider crashing the project. 64

PDM Example A B C D A,5 B, C, D,6 A B C D dummy arc precedence arc ti i 4 E, 5 F,9 6 G,8 7 H,4 8 ti= time that node i is visited 9 I, 0 J,6 OBJECTIVE FUNCTION VALUE ) 5.0000 K, VARIABLE VALUE REDUCED COST X 5.000000 0.000000 XA 0.000000 0.000000 XA 4.000000 0.000000 XB 4.000000 0.000000 XB.000000 0.000000 XC 4.000000 0.000000 XC.000000 0.000000 XD 6.000000 0.000000 XD.000000 0.000000 X4 4.000000 0.000000 X5 6.000000 0.000000 X6 8.000000 0.000000 X7 86.000000 0.000000 X8 86.000000 0.000000 X9 86.000000 0.000000 X0 98.000000 0.000000 X 4.000000 0.000000 65 Integer Programming All linear programming problems so far assumed that fractional answers were acceptable In practice not always ok, why? Certain classes of LPs we studied will have integer solutions, which ones and why? Want to explore modeling aspects when we specify certain variables must be integer-valued Why this is a MUCH harder problem to solve in general Interesting applications of binary variables for encoding logic in mathematical programs 66

The Toy Problem Revisited 67 The Toy Problem Revisited Recall the toy production problem from before Complete LP Max x+x (Objective function) x+x <=00 (Finishing constraint) x+ x <=80 (Carpentry constraint) x <=40 (Limited demand constraint on soldiers) x >=0 (Nonnegativity constraint on soldiers) x >=0 (Nonnegativity constraint on cars) Optimal solution: x=0, x=60, with an optimal objective function value of z=$80 68 4

The Toy Problem Revisited According to LP theory, a solution (if it exists) must be at one of the vertices (also called extreme points) LP feasible region 69 (0,0) (0,80) (0,60) (40,0) (40,0) In this case, all vertices are integer-valued (i.e., whole numbers) This is fortunate since we want to produce a whole number of toys and soldiers What if this were not the case? That is, what if the the solution were not integer-valued? The Toy Problem Revisited Modified Complete LP Max x+x (Objective function) x+x <=99.7 (Finishing constraint) x+ x <=8.5 (Carpentry constraint) x <=40 (Limited demand constraint on soldiers) x >=0 (Nonnegativity constraint on soldiers) x >=0 (Nonnegativity constraint on cars) New optimal solution: x=6.99997, x=67.0000, with an optimal objective function value of z=$8. How has the feasible region changed? But this fractional answer really doesn t really make sense, we don t want to produce a fractional number of toy soldiers or cars (no one would buy them). 70 5

The Toy Problem Revisited We add integer constraints Complete Integer Program (IP) Max x+x (Objective function) x+x <=99.7 (Finishing constraint) x+ x <=8.5 (Carpentry constraint) x <=40 (Limited demand constraint on soldiers) x >=0 (Nonnegativity constraint on soldiers) x >=0 (Nonnegativity constraint on cars) x, x integer-valued New optimal solution: x=6, x=67, with an optimal objective function value of z=$8 Note: Just rounding to the nearest integer worked in this case but in general, it won t even produce a feasible solution. Not a good way to solve a MIP What does the feasible region look like 7 in this case? The Geometry of the Toy Problem with Integer Constraints (Excel output) 90 80 70 6,67 60 x 50 40 x+x<=8.5 0 0 0 x+x<=99.7 0 0 5 0 5 0 5 0 5 40 45 x x<=40 7 6

The Geometry of the Toy Problem with Integer Constraints (MATLAB output) 6,67 x<=40 x+x<=8.5 7 x+x<=99.7 The Toy Problem Revisited LINDO Formulation Max x+x (Objective function) x+x <=99.7 (Finishing constraint) x+ x <=8.5 (Carpentry constraint) x <=40 (Limited demand constraint on soldiers) x >=0 (Nonnegativity constraint on soldiers) x >=0 (Nonnegativity constraint on cars) end gin x ( gin stands for general integer variable) gin x Special case of binary variables (=0 or ) to be used later, the command to make the variable x a binary variable is inte x or inte x 74 7

LP OPTIMUM FOUND AT STEP OBJECTIVE VALUE = 8.99997 The Toy Problem Revisited NEW INTEGER SOLUTION OF 8.000000 AT BRANCH 0 PIVOT 5 BOUND ON OPTIMUM: 8.0000 ENUMERATION COMPLETE. BRANCHES= 0 PIVOTS= 5 LAST INTEGER SOLUTION IS THE BEST FOUND RE-INSTALLING BEST SOLUTION... OBJECTIVE FUNCTION VALUE ) 8.0000 VARIABLE VALUE REDUCED COST X 6.000000 -.000000 X 67.000000 -.000000 ROW SLACK OR SURPLUS DUAL PRICES ) 0.699997 0.000000 ) 0.500000 0.000000 4) 4.000000 0.000000 5) 6.000000 0.000000 6) 67.000000 0.000000 Why is the objective function worse? NO. ITERATIONS= 5 BRANCHES= 0 DETERM.=.000E 0 75 The Knapsack Problem 76 8

The Knapsack Problem Suppose there are n items to be considered for inclusion in a knapsack Each item has a certain per unit value to the traveler who is packing the knapsack Each item has a per unit weight that contributes to the overall weight of the knapsack There is a limitation on the total weight that can be carried Objective: Maximize the total value of what is packed into the knapsack subject to the total weight limitation We can use IP to solve this problem Why a trivial solution is not apparent Generalizations of this problem beyond a knapsack 77 Definitions: For j=,,...,n let v j >0 be the value per unit for item j w j >0 be the weight per unit of item j W be the total weight limitation x j is the number of units of item j included in the knapsack max n j= w j The Knapsack Problem n j= x j v j x j W,x j 0, integer, j =, K,n 78 9

The Knapsack Problem: Project Selection Example Definitions: For j=,,...,n let v j >0 be the value if project j is selected c j >0 be the cost of selecting project j B be the total budget available limitation x j = if project is selected, 0 otherwise 79 max st.. cx j j j j { } j x 0,, j =,, K, n j vx B j The Knapsack Problem: Project Selection Example Project Value Cost 5.99.69 7.56.. 5 4 4.4.7 5 4.7.69 6 4.7. 7. 5 8.65.7 9 5.7.69 0.. 8.46 5.65.7 5.7.69 4 7.56. 5. 5 5 projects, total budget of 00 Why not just fund all 5? Total cost is 0., therefore, need the right subset Don t just pick the least costly ones, want high value ones too Cherry-picking solution is not always the best Use Excel to solve this integer program (IP) 80 40

Scheduling Under Limited Resources Using Integer Programming The Knapsack Problem Suppose there are n items to be considered for inclusion in a knapsack Each item has a certain per unit value to the traveler who is packing the knapsack Each item has a per unit weight that contributes to the overall weight of the knapsack There is a limitation on the total weight that can be carried Objective: Maximize the total value of what is packed into the knapsack subject to the total weight limitation We can use IP to solve this problem 8 Scheduling Under Limited Resources Using Integer Programming The Knapsack Problem Definitions: For j=,,...,n let c j >0 be the value per unit for item j w j >0 be the weight per unit of item j W be the total weight limitation x j is the number of units of item j included in the knapsack max s. t. w n j= j n j= x j c j x j W, x j 0,integer, j =, K,n 8 4

Scheduling Under Limited Resources Using Integer Programming The Knapsack Problem for scheduling Each activity to be scheduled at a specific instant is modeled as an item to be included in the knapsack The composition of the activities in a scheduling window (certain amount of time) is viewed as the knapsack Note: for activity scheduling, only one unit of each activity (item) can be included in the schedule at any given scheduling time; in general, can t schedule the activity twice at the same time! The knapsack problem for activity scheduling is done at each and every scheduling time t The objective is to schedule as many activities of high priority as possible while satisfying precedence relationships w/o exceeding the resources 8 Scheduling Under Limited Resources Using Integer Programming The Knapsack Problem for scheduling Definitions: z t =overall performance of the schedule generated at time t p j = the priority value for activity j t= current time of scheduling x jt = binary variable, = if activity j is scheduled at time t, =0 o/w S t =set of activities eligible for scheduling at time t k= number of different resource types r ij =units of resource type i required by activity j R it =units of resource type i available at time t max zt = p j x jt j St n s. t. rij x jt Rit, i =, K,k, x jt 0,, j St for all j S 84 t { } t 4

Scheduling Under Limited Resources Using Integer Programming The Knapsack Problem for scheduling Note that the next scheduling time, t, for the knapsack problem is given as the minimum of {the finishing times of the scheduled and unfinished activities} Now let s consider a specific example (see page 0) Note that the priority values do not change from time one time period to the next (fixed prioritization scheme) Can also consider knapsack problem with changing priority values (variable prioritization scheme) Can use specialized methods to solve this problem 85 Scheduling Under Limited Resources Using Integer Programming 86 4

Example from Badiru-Pulat Activity Id Duration Priority R R Predecesor A.7 55.4 0 B 6 00 5 4 C.8 7.6 4 D 4.8 54 0 A E 5 5.7 88 4 C F 6 4 66.6 7 A G 7 75. 6 B,D,E Resource Availability 0 5 87 t=0 S 0 ={A,B,C} max 55.4xa+00xb+7.6xc R)xa+5xb+4xc<=0 R)0xa+4xb+xc<=5 end int xa int xb int xc OBJECTIVE FUNCTION VALUE 7.6000 XA = 0.000000 XB =.000000 XC =.000000 88 44

t=.8 S.8 ={A,E} max 55.4xa+88xe R)xa+4xe<= 5 R)0xa+xe<= end int xa int xe B is ongoing and uses 5 units of R and 4 of R OBJECTIVE FUNCTION VALUE 88.00000 XA = 0.000000 XE =.000000 89 t=6.0 S 6 ={A} max 55.4xa R)xa<= 6 end int xa E is ongoing and uses 4 units of R and of R OBJECTIVE FUNCTION VALUE 55.00000 XA =.000000 90 45

t=8.7 S 8.7 ={D,F} max 54xd+66.6xf R)xd+xf<= 6 R)0xd+7xf<= end int xd int xf E is ongoing and uses 4 units of R and of R OBJECTIVE FUNCTION VALUE 0.00000 Xd =.000000 Xf =.000000 9 t=9 S 9 ={} Can t do anything! D is ongoing and uses units of R, F is ongoing and uses units of R, and 7 units of R 9 46

t= S ={G} max 75.xg R)6xg<= 8 R)xg<= 8 end int xg F is ongoing and uses units of R and 7 of R OBJECTIVE FUNCTION VALUE 7.00000 Xg =.000000 9 Some Other Uses of Integer (Binary) Programming Fixed charge problems Either-or constraints If-then constraints 94 47

Fixed Charge Problems: An Example Manufacturing project involving products (,, ) Each product requires that an appropriate type of machinery be available Rental rates for machines: Product machine: $00/week Product machine: $50/week Product machine: $00/week Also raw materials and labor required for each product Product Product Product Labor (hours) 6 Raw Materials (lbs) 4 4 95 Fixed Charge Problems Each week 50 hours of labor and 60 lbs of raw materials are available Also need to consider the variable unit cost and selling price for each product Want an IP whose solution will maximize the weekly net profits Variables? Product Product Product Sales price $ $8 $5 Variable Cost $6 $4 $8 96 48

Fixed Charge Problems Variables Let x i = number of units of product i manufactured in a given week (i=,,) Let y i = if any product i is manufactured, =0 o/w (i=,,) (note: if x i >0 y i = and if x i =0 y i =0) Constraints? Objective function? 97 Let x i = number of units of product i manufactured in a given week (i=,,) Let y i = if any product i is manufactured, =0 o/w (i=,,) (note: if x i >0 y i = and if x i =0 y i =0) Let M, M, M be large positive numbers max 6x st.. x 4x + x + x x M y + 4x + 6x + 4x x M y x M y y,y,y {0,} + 7x 50 60 x,x,x 0, integer Fixed Charge Problems 00y 50y 00y Labor constraint Raw materials constraint Net Revenues rental costs Constraints that ensure if x i >0 y i = note that if x i =0 y i =0 or = but we get y i =0 at an optimal solution (for cost reasons) max x values give M values: 40, 5, 5 98 49

Fixed Charge Problems max 6x+4x+7x-00y-50y-00y x+x+6x<=50 4x+x+4x<=60 x-40y <=0 x-5y<=0 x-5y<=0 end gin x gin x gin x int y int y int y Solution: Optimal net profit of $75 x=5 y= all other variables =0 99 Let s modify the manufacturing problem from before If any of product produced, then it must be at least 5 units, i.e., if x >0 x >=5 or equivalently either x <=0 or x >=5 If any of product produced, then it must be at least 6 units i.e., if x >0 x >=6 or equivalently either x <=0 or x >=6 If any of product produced, then it must be at least 7 units i.e., if x >0 x >=7 or equivalently either x <=0 or x >=7 More general setting, we have two constraints of the form: f(x,x,..., x n )<=0 and g(x,x,..., x n )<=0 We want to ensure that at least one of these constraints is satisfied For N a large enough positive number and z a binary variable, this is ensured with the following two constraints Either-Or Formulation f ( x g ( x, x, x,, K, x K, x 00 n n ) Nz ) N ( z) 50

max 6x st.. x 4x + x + x 5 x 6 x 7 x + 4x + 6x + 4x N ( z ) ( z N ( z ) y,y,y, z,z,z x M y x M y x M y x N z x N z N x N z + 7x 50 60 x,x,x 0, integer {0,} ) 00y 50y 00y Labor constraint Raw materials constraint 0 Constraints that ensure if x i >0 y i = note that if x i =0 y i =0 or = but we get y i =0 at an optimal solution (for cost reasons) max x values give M values: 40, 5, 5 Net Revenues rental costs Either-or constraints, N values need to be chosen suitably large, for example take all N s to be equal to 00 max 6x+4x+7x-00y- 50y-00y x+x+6x<=50 4x+x+4x<=60 x-40y <=0 x-5y<=0 x-5y<=0 x-00z<=0 -x+00z<=75 x-00z<=0 -x+00z<=74 x-00z<=0 -x+00z<=7 end gin x gin x gin x int y int y int y int z int z int z LINDO Formulation and Solution to Either-Or Problem Solution: Optimal profit of $6 x=5 y= z= all other variables =0 0 5

If-Then Formulation Let s modify the original manufacturing problem one more time (taking away the modifications from before) We want the restriction: if the sum of products and exceed 4 units (true for both cases considered so far), then at least 0 of product must be manufactured (union rules?) More generally, we will be considering if f ( x, x, K, xn ) > 0 then g ( x, x, K, xn ) 0 if f ( x, x, K, xn ) 0 then g ( x, x, K, xn ) 0 or < 0 0 We can use the following constraints where N is a suitably large positive value and z is a binary variable g ( x f ( x, x, x, In our example we can take x x If-Then Formulation, K, x K, x n n ) Nz ) N ( z) 0 = g ( x, x, K, xn ) + x 4 = f ( x, x K, x, n ) 04 5

LINDO Formulation and Solution to If-Then Problem max 6x+4x+7x-00y-50y- 00y x+x+6x<=50 4x+x+4x<=60 x-40y <=0 x-5y<=0 x-5y<=0 -x-00z<=-0 x+x+00z<=4 end gin x gin x gin x int y int y int y int z Solution: Optimal profit of $68 x=4 y= z= all other variables =0 05 Multiperiod Production-Inventory Problem A Production -Inventory Problem (Periodic Review Model): Time is broken up into periods: present period ---- period next period ---- period. last period ---- period T At start of each period, firm must determine how much should be produced (production capacity at each period is limited) Each period s demand must be met on time from inventory or current production 06 5

Multiperiod Production-Inventory Problem During any period in which production occurs, a fixed cost as well as a variable per unit cost is incurred There is limited storage capacity Limit on end-of-period inventory A per unit holding cost is incurred on each period s ending inventory The firm s goal is to minimize the total cost of meeting on time, the demands for periods,,,t 07 Multiperiod Production-Inventory Problem Typical Picture production at period t Inventory from period t - demand at period t Inventory at period t 08 54

Multiperiod Production-Inventory Problem Demand schedule Month Number of units (tons) 4 Variables, 09 constraints, objective function? 4 At start of each month, how much to produce during the current month (questions for company) Production(if production occurs): Max of 5 units/period to be produced Set up cost $ Variable cost $/unit produced. Inventory: Holding Costs (at the end of the month): $0.50/unit Capacity limitations: max of 4 units, initial inventory=0 Want: Production schedule that will meet all demands on time and will minimize the sum of production and holding costs for the 4 months. (Assume inventory at start of month is 0 units ) Multiperiod Production-Inventory Problem Production schedule (try without LP/IP first) x =? x x =? x x =? x x 4 =? x 4 Inventory 4 i =0 i =? i =? i 4 =?? Demand = Demand = Demand = Demand = 4 Can relate to a shortest path problem in a network as follows. 0 55

Multiperiod Production-Inventory Problem Production schedule IP Min x+x+x+x4! Production variable costs + y+y+y+y4! Production fixed costs +0.5i+0.5i+0.5i+0.5i4! Inventory costs x-00000y <=0! Consistency between production and set-up cost varibles d=! Demand for period x-00000y <=0 d=! Demand for period! Consistency between production and set-up cost varibles d=! Demand for period x-00000y <=0 d4=4! Demand for period 4! Consistency between production and set-up cost varibles i=0! Initial inventory x4-00000y4 <=0! Consistency between production and set-up cost varibles i<=4 i<=4 i4<=4! Inventory capacity end! Nonnegativity implied by LINDO x<=5 x<=5 x<=5 x4<=5! Production capacity inte y i+x-d -i=0! Period material balance inte y i+x-d -i=0! Period material balance inte y i+x-d -i4=0! Period material balance inte y4 i4+x4-d4 =0! Period material balance Multiperiod Production-Inventory Problem 0 is the minimum cost for the 4 months optimal schedule. x = x x = 5 x x = 0 x x 4 = 4 x 4 Inventory 4 i =0 i =0 i = i 4 =0 0 Demand = Demand = Demand = Demand = 4 Can relate to a shortest path problem in a network as follows. 56

Multiperiod Production-Inventory Problem Representation of Inventory Example,0,0,0 4,0 (month, state),,, 4,,,, 4, 5,0 Month 5,,, 4,,4,4,4 4,4 Month Month Month Month 4 Assignment Problems (You are now a Project Manager) Want to optimally assign workers to tasks Suppose we have n tasks to be performed by n workers The cost of worker i performing task j is given as c ij Remarks:. If the number of tasks to be done is greater than the number of workers, we add dummy workers to balance the problem. If the number of workers is greater than the number of tasks, we add dummy tasks to balance the problem. If no problem of overlapping a worker s time, the time can be split between projects and each segment can be modeled as a separate resource (can consider partial allocation of resource units to multiple tasks) 4 57

The Assignment Problem CPM can be used to control the project duration Such methods do not however, assign resources to project tasks Now we consider the assignment problem, a formulation to optimally assign workers to tasks Suppose we have n tasks to be performed by n workers The cost of worker i performing task j is given as c ij Remarks:. If the number of tasks to be done is greater than the number of works, we add dummy workers to balance the problem. If the number of workers is greater than the number of tasks, we add dummy tasks to balance the problem. If no problem of overlapping a worker s time, the time can be split between projects and each segment can be modeled as a separate resource (can consider partial allocation of resource units to multiple tasks) 5 min s. t. x n j= n i= ij x x ij ij n The Assignment Problem n i= j= c ij x ij =, i =,, K, n 0, i, j =,, K, n minimize total costs ith worker must get assigned to exactly task =, j =,, K, n jth task must get exactly worker nonnegative variables, binary restriction satisfied indirectly 6 58

The Assignment Problem Consider the following cost matrix for an assignment problem with n=5 Select the cheapest workers by task first, will this work? Task Task Task Task 4 Task5 Worker $00 $400 $500 $00 $400 Worker $400 $700 $800 $,00 $500 Worker $00 $900 $800 $,000 $500 Worker 4 $00 $00 $500 $00 $400 Worker 5 $700 $00 $00 $00 $00 7 min 00x + 400x + 500x + 00x4 + 400x5+ 400x + 700x + 800x + 00x4 + 500x5+ 00x + 900x + 800x + 000x4 + 500x5+ 00x4 + 00x4 + 500x4 + 00x44 + 400x45+700x5 + 00x5 + 00x5 + 00x54 + 00x55 x+x+x+x4+x5=! worker x+x+x+x4+x5=! worker x+x+x+x4+x5=! worker x4+x4+x4+x44+x45=! worker 4 x5+x5+x5+x54+x55=! worker 5 x+x+x+x4+x5=! task x+x+x+x4+x5=! task x+x+x+x4+x5=! task x4+x4+x4+x44+x54=! task 4 x5+x5+x5+x45+x55=! task 5! and all variables nonnegative 8 The Assignment Problem 59

The Assignment Problem Optimal solution at a cost of $,400 is as follows Task Task Task Task 4 Task5 Worker Worker Worker Worker 4 Worker 5 9 Solving Integer Programs Certain classes of LPs we studied will have integer solutions so don t need to enforce integrality restrictions Otherwise, how can we solve integer-constrained problems? Many approaches, will give just two mentioned here Enumeration Branch-and-Bound (pure IP example) 0 60

Solving Integer Programs Using Enumeration For small enough problems, can just enumerate all feasible solutions Then pick the one(s) with the best objective function value When this method will work, when it won t Solving Integer Programs Using Branch-and-Bound for Pure IPs Basic Idea: Solve a sequence of linear programming relaxations (in the form of a tree structure ) to solve original IP Elementary observation: if you solve the LP relaxation of a pure IP and get a solution which has just integer answers, then LP optimal is also IP optimal Example (from Winston) max z=x+x x+x<=6 x,x >=0, x,x integer Feasible region? LP and IP solutions? 6

Solving Integer Programs Using Branch-and-Bound for Pure IPs Sample Problem: Production of tables and chairs table needs hour of labor & 9 square board feet of wood, $8 in profit chair needs hour of labor & 5 square board feet of wood, $5 in profit Currently: 6 hours of labor, 45 square board feet available IP to maximize profit? Solving Integer Programs Using Branch-and-Bound for Pure IPs let x= number of tables produced x= number of chairs produced 7 6 5 4 0 0 4 5 6 7 max 8x+5x x+x<=6 9x+5x<=45 x x z x,x>=0, x, x integer 4 Series 0 0 0 0 5 0 0 0 5 0 4 0 0 5 5 0 6 0 0 8 8 4 8 5 0 6 6 4 6 0 4 9 4 9 4 0 4 7 5 0 40 6

Solving Integer Programs Using Branch-and- Bound for Pure IPs Let s see how to get this solution with the Branchand-Bound Technique 7 LP subproblems to solve 5 Solving Integer Programs Using Branch-and- Bound for Pure IPs SP0 original IP x=5,x=0, z=40 x>=4 x=4,x=.8 z=4 x>=4, x>= infeasible fathom node SP4 SP SP6 SP5 x>=4, x<=, x>=5, x=5,x=0,z=40 IP lower bound, z=40 SP no integer constraints, LP relaxation x=.75,x=.5, z=4.5 IP upper bound is 4.5 SP x<=, x=, x=,z=9 SP6 has better z-value, fathom this node x>=4, x<=, x=4.44,x=,z=40.556 SP7 x>=4, x<=, x<=4 x=4,x=, z=7, fathom node 6 6

7 6 5 Original problem Subproblem max 8x+5x x+x<=6 9x+5x<=45 end gin x gin x remove integer constraints max 8x+5x x+x<=6 9x+5x<=45 end x=.75,x=.5, z=4.5 IP upper bound is 4.5 4 optimal solution: x=5, x=0 optimal obj. fcn value: z=40 0 0 4 5 6 7 Conclusion: optimal z-value for IP<=optimal z-value for LP relaxation Upper bound for IP is 4.5 Next step, arbitrarily choose a fractional variable (say x) and try LPs with the rounded values Subproblem : x>=4, subproblem, x<= (branch on x) Why can t a feasible solution to the IP have <x<4? The point x=.75 will be avoided this way (can t return to this solution), why? 7 Solving Integer Programs Using Branch-and- Bound for Pure IPs SP0 original IP x=5,x=0, z=40 x>=4 SP SP no integer constraints, LP relaxation x=.75,x=.5, z=4.5 IP upper bound is 4.5 SP x<= 8 64

Original problem Subproblem add new constraint x>=4 max 8x+5x x+x<=6 9x+5x<=45 x,x>=0, x, x integer max 8x+5x x+x<=6 9x+5x<=45 x,x>=0, x>=4 x=4,x=.8,z=4 Conclusion: integer solution not obtained Next step: arbitrarily choose a fractional variable (branch on x) and try LPs with rounded values Subproblem #4: x>=, subproblem #5: x<= 9 Solving Integer Programs Using Branch-and- Bound for Pure IPs SP0 original IP x=5,x=0, z=40 x>=4 x=4,x=.8 z=4 x>=4, x>= SP4 SP SP5 SP x>=4, x<= no integer constraints, LP relaxation x=.75,x=.5, z=4.5 IP upper bound is 4.5 SP x<= 0 65

Original problem Subproblem 4 max 8x+5x x+x<=6 9x+5x<=45 x,x>=0, x, x integer add new constraint x>= max 8x+5x x+x<=6 9x+5x<=45 x>=4, x>= x,x>=0 Conclusion: Subproblem 4 is infeasible, fathom this node Next step: try subproblem 5 Solving Integer Programs Using Branch-and- Bound for Pure IPs SP0 original IP x=5,x=0, z=40 x>=4 x=4,x=.8 z=4 x>=4, x>= infeasible fathom node SP4 SP SP5 SP x>=4, x<= no integer constraints, LP relaxation x=.75,x=.5, z=4.5 IP upper bound is 4.5 SP x<= 66

Original problem Subproblem 5 add new constraint x<= max 8x+5x x+x<=6 9x+5x<=45 x,x>=0, x, x integer max 8x+5x x+x<=6 9x+5x<=45 x,x>=0,x>=4, x<= x=4.44, x=,z=40.556 Conclusion: feasible solution, still fractional though so need to branch again Next step: branch on x, Subproblem 6: add x>=5, subproblem 7: add x<=4 Could also try subproblem but we are using a LIFO rule (LIFO=last in first out) Solving Integer Programs Using Branch-and- Bound for Pure IPs SP0 original IP x=5,x=0, z=40 x>=4 x=4,x=.8 z=4 x>=4, x>= infeasible fathom node x>=4, x<=, x>=5 SP4 SP SP6 SP5 SP no integer constraints, LP relaxation x=.75,x=.5, z=4.5 IP upper bound is 4.5 SP x<= x>=4, x<=, x=4.44,x=,z=40.556 SP7 x>=4, x<=, x<=4 4 67

Original problem Subproblem 6 add new constraint x>=5 max 8x+5x x+x<=6 9x+5x<=45 x,x>=0, x, x integer max 8x+5x x+x<=6 9x+5x<=45 x,x>=0, x>=4, x<=, x>=5 x=5,x=0,z=40 IP lower bound, z=40 Conclusion: candidate solution IP lower bound is now 40 Next step: try remaining node relating to subproblem 7 5 Solving Integer Programs Using Branch-and- Bound for Pure IPs SP0 original IP x=5,x=0, z=40 x>=4 x=4,x=.8 z=4 x>=4, x>= infeasible fathom node SP4 SP SP6 SP5 x>=4, x<=, x>=5, x=5,x=0,z=40 IP lower bound, z=40 SP no integer constraints, LP relaxation x=.75,x=.5, z=4.5 IP upper bound is 4.5 SP x<= x>=4, x<=, x=4.44,x=,z=40.556 SP7 x>=4, x<=, x<=4 6 68

Original problem Subproblem 7 add new constraint x<=4 max 8x+5x x+x<=6 9x+5x<=45 x,x>=0, x, x integer max 8x+5x x+x<=6 9x+5x<=45 x,x>=0, x>=4, x<=, x<=4 x=4,x=,z=7 IP lower bound, z=7 Conclusion: further branching on subproblem7 cannot yield a feasible integer solution>7, why? Next step: fathom this node and try subproblem 7 Solving Integer Programs Using Branch-and- Bound for Pure IPs SP0 original IP x=5,x=0, z=40 x>=4 x=4,x=.8 z=4 x>=4, x>= infeasible fathom node SP4 SP SP6 SP5 x>=4, x<=, x>=5, x=5,x=0,z=40 IP lower bound, z=40 SP no integer constraints, LP relaxation x=.75,x=.5, z=4.5 IP upper bound is 4.5 SP x<= x>=4, x<=, x=4.44,x=,z=40.556 SP7 x>=4, x<=, x<=4 x=4,x=, z=7, fathom node 8 69

Original problem Subproblem add new constraint x<= max 8x+5x x+x<=6 9x+5x<=45 x,x>=0, x, x integer max 8x+5x x+x<=6 9x+5x<=45 x,x>=0, x<= x=,x=, z=9 Conclusion: Not better than the current lower bound of 40 from subproblem 6 Fathom this node No nodes left to try- done! 9 Solving Integer Programs Using Branch-and- Bound for Pure IPs SP0 original IP x=5,x=0, z=40 x>=4 x=4,x=.8 z=4 x>=4, x>= infeasible fathom node SP4 SP SP6 SP5 x>=4, x<=, x>=5, x=5,x=0,z=40 IP lower bound, z=40 SP no integer constraints, LP relaxation x=.75,x=.5, z=4.5 IP upper bound is 4.5 SP x<=, x=, x=,z=9 SP6 has better z-value, fathom this node x>=4, x<=, x=4.44,x=,z=40.556 SP7 x>=4, x<=, x<=4 x=4,x=, z=7, fathom node 40 70