Esempio n. 1
0
def test_create_delivery_dict(requests):
    p = Problem([], [])
    assert p.create_delivery_dict(requests) == {
        3: requests[0].delivery_node,
        4: requests[1].delivery_node,
        5: requests[2].delivery_node
    }
Esempio n. 2
0
def test_create_pickup_dict(requests):
    p = Problem([], [])
    assert p.create_pickup_dict(requests) == {
        0: requests[0].pickup_node,
        1: requests[1].pickup_node,
        2: requests[2].pickup_node
    }
Esempio n. 3
0
def vrptw_problem_for_related_removal_different_pickups2(requests, vehicles):
    requests[0].pickup_node.x_coord = 20
    requests[0].pickup_node.y_coord = 20
    requests[1].pickup_node.x_coord = 40
    requests[1].pickup_node.y_coord = 40
    problem = Problem(requests, vehicles)
    return problem
Esempio n. 4
0
def vrptw_problem_for_related_removal_different_terminals_2ndvehicle2(
        requests4, vehicles):
    vehicles[1].start_terminal.x_coord = 10
    vehicles[1].start_terminal.y_coord = 10
    vehicles[1].end_terminal.x_coord = 10
    vehicles[1].end_terminal.y_coord = 10
    problem = Problem(requests4, vehicles)
    return problem
Esempio n. 5
0
def vrptw_problem_for_related_removal_delivery_on_depot2(requests, vehicles):
    requests[0].pickup_node.x_coord = 20
    requests[0].pickup_node.y_coord = 20
    requests[1].pickup_node.x_coord = 40
    requests[1].pickup_node.y_coord = 40
    requests[0].delivery_node.x_coord = 35
    requests[0].delivery_node.y_coord = 35
    requests[1].delivery_node.y_coord = 35
    problem = Problem(requests, vehicles)
    return problem
Esempio n. 6
0
def pdp_problem(requestspd, vehiclespd):
    pdp_problem = Problem(requestspd, vehiclespd)
    return pdp_problem
Esempio n. 7
0
def vrptw_problem4(requests4, vehicles3):
    return Problem(requests4, vehicles3)
Esempio n. 8
0
def vrptw_problem3(requests2, vehicles3):
    return Problem(requests2, vehicles3)
Esempio n. 9
0
def vrptw_problem2(requests2, vehicles):
    problem2 = Problem(requests2, vehicles)
    return problem2
Esempio n. 10
0
def vrptw_problem(requests, vehicles):
    problem = Problem(requests, vehicles)
    return problem