Dynamic Programming

Spring 2017

Instructor: Dr. Rajesh Ganesan

Class time: Mon 7:20 - 10:00 PM

Office: Engr Building, Room 2217

Phone: (703) 993-1693

Fax: (703) 993-1521

Email: rganesan@gmu.edu

Text: DP by Eric Denardo

**Week 1:** Introduction,
DP Recursion vs IP and LP, Big picture

**DP-
Deterministic- Finite Horizon**

http://castlelab.princeton.edu/Papers/Powell_UnifiedFramework_ICSNewsletterFall2012.pdf

**Week 2:** Applications: Shortest path, longest path problems, Dijkstra's Alg

Practice Problems: Problem 2, 4 from text, Group A and B problems from Winston's Book (Page 968-969)

Excel solutions to some problems

*******************************************************

I will update these files often. Always download the latest version if you plan on using them.

How to use these files

1. Save the long or short code.

2. Change the c and X matrices to suit your problem. For some problems these are available at the end of the code, which you can copy and paste to the top of the code. Use Cntl+R and Cntl+T to remove the comments % on the matrices.

2.a. Make sure that the c matrix has only one state in stage 1. This is to initialize. Consequently the first column will be all zeros.

2.b. If c is 0 on a feasible arc then use 0.0001 instead of zero. If an arc is infeasible put a large c value for the min problem or a large negative c value for a max problem.

2.c. If an arc does not exist at all then mark the c value as 0.

3. change max and min to suit your problem.

4. Save and run (green arrow icon). For the very first time you might get a pop up window asking you to add a path. Click on "Add to path".

Matlab short code: Finds the length and only 1 path (Generic)

Matlab long code: Finds the length and up to 12 paths (Generic)

matlab code for inventory problem to generate cost and action matrix (for inv control discussed in class page 969 in Winston)

matlab code for inventory problem to generate costand action matrix (for pg 25 prob 1 in Denado's book)

matlab code for inventory problem to generate costand action matrix (investment in class problem)

*The following are used together*

matlab code for inventory problem to generate costand action matrix (for pg 26 prob 3 in Denado's book)

Long code for (for pg 26 prob 3 in Denado's book). The long code has been modified from the generic one by adding a few extra lines at the bottom

*The following are used together*

matlab code for inventory problem to generate cost and action matrix (for Sailco inv control - first problem from the first class )

matlab code for (for Sailco inv control - first problem from the first class)

********************************************************

Week 3, 4

DP formulation: Deterministic Inventory control, Resource Allocation: Investment and Knapsack, Min-max problems, Equipment replacement with bounded Horizon Notes

Practice Problems: 1 ,3 from text page 25, Prob 3 page 63 of the text, Prob 2 page 974, problem 2, 5 page 985 of Winston's