Exemple #1
0
def greedy_val(task):
    name, order = task
    from pygrout import VrptwSolution, VrptwTask, build_first
    VrptwTask.sort_order = order
    sol = VrptwSolution(VrptwTask(name))
    build_first(sol)
    return sol.val()
Exemple #2
0
def mfsavings_val(task):
    """The mapping function for savings heuristic."""
    name, waitlimit, mi = task
    from pygrout import VrptwSolution, VrptwTask, build_by_mfsavings
    print "Should process", name
    sol = VrptwSolution(VrptwTask(name))
    build_by_mfsavings(sol, waitlimit, mi)
    return sol.val()