Move max_cost into the machine model.