Esempio n. 1
0
    def getBestPlan(trunk: Truck, orders: List[Order]):
        actions = []
        for order in orders:
            action = Action(order)
            order.setAction(action)
            actions.append(action)

        plan_1 = Plan(len(actions), actions)
        plan_2 = Plan(len(actions), actions)
        plan_3 = Plan(len(actions), actions)

        best_plan = Plan.getBestOfPlans(plan_1, plan_2, plan_3)

        trunk.setPlan(best_plan)
        return best_plan