Optimal investment models with vintage capital: Dynamic programming approach