A Dynamic Programming Model of a Machine Tool in Flexible Manufacturing