next up previous contents
Next: The Traveling Salesperson Problem Up: A Tutorial on Dynamic Previous: An Alternative Formulation

Equipment Replacement

In the network homework, you already saw how to formulate and solve an equipment replacement problem using a shortest path algorithm. Let's look at an alternative dynamic programming formulation.

Suppose a shop needs to have a certain machine over the next five year period. Each new machine costs $1000. The cost of maintaining the machine during its ith year of operation is as follows: tex2html_wrap_inline1070 , tex2html_wrap_inline1072 , and tex2html_wrap_inline1074 . A machine may be kept up to three years before being traded in. The trade in value after i years is tex2html_wrap_inline1078 , tex2html_wrap_inline1080 , and tex2html_wrap_inline1082 . How can the shop minimize costs over the five year period?

Let the stages correspond to each year. The state is the age of the machine for that year. The decisions are whether to keep the machine or trade it in for a new one. Let tex2html_wrap_inline1084 be the minimum cost incurred from time t to time 5, given the machine is x years old in time t.

Since we have to trade in at time 5,

displaymath1092

Now consider other time periods. If you have a three year old machine in time t, you must trade in, so

displaymath1096

If you have a two year old machine, you can either trade or keep.

So the best thing to do with a two year old machine is the minimum of the two.

Similarly

displaymath1102

Finally, at time zero, we have to buy, so

displaymath1104

This is solved with backwards recursion as follows:

Stage 5.

tabular484

Stage 4.

tabular489

Stage 3.

tabular494

Stage 2.

tabular499

Stage 1.

tabular504

Stage 0.

tabular509

So the cost is 1280, and one solution is to trade in years 1 and 2. There are other optimal solutions.


next up previous contents
Next: The Traveling Salesperson Problem Up: A Tutorial on Dynamic Previous: An Alternative Formulation

Michael A. Trick
Sun Jun 14 13:05:46 EDT 1998