예제 #1
0
def _test_create_all_routes_6(all_facilities):

    # create and print two arcs
    # xtot_objects.Route("name", "origin_facility", "destination_facility", "cost_1", "cost_2", "min_capacity", "max_capacity", "travel_time")
    # testing to see if default capacity settings work

    origin_1 = all_facilities[0]
    destination = all_facilities[2]
    processor_1 = all_facilities[1]

    commodity_slate = _test_create_commodity_slate()
    schedule = schedule_full_availability()
    all_routes_dict = {}

    all_routes_dict['rt1'] = xtot_objects.Route('rt1', origin_1, destination,
                                                5, 2, commodity_slate,
                                                schedule)

    all_routes_dict['rt2'] = xtot_objects.Route('rt2', origin_1, processor_1,
                                                0.3, 3, commodity_slate,
                                                schedule, "transport", 0, 0,
                                                99999)

    all_routes_dict['rt3'] = xtot_objects.Route('rt3', processor_1,
                                                destination, 0.5, 3,
                                                commodity_slate, schedule)

    return all_routes_dict
예제 #2
0
def _test_create_all_routes_3(all_facilities):


    # create and print two arcs
    # xtot_objects.Route("name", "origin_facility", "destination_facility", "cost_1", "cost_2", "min_capacity", "max_capacity", "travel_time")
    # testing to see if default capacity settings work

    origin = all_facilities[0]
    destination = all_facilities[1]
    storage_1 = all_facilities[2]
    storage_2 = all_facilities[3]
    processor = all_facilities[4]

    commodity_slate = _test_create_commodity_slate()
    schedule = schedule_full_availability()
    all_routes_dict = {}

    all_routes_dict['rt1'] = xtot_objects.Route('rt1', origin, destination, 5, 2, commodity_slate, schedule)

    all_routes_dict['rt2'] = xtot_objects.Route('rt2', origin, processor, 3, 3, commodity_slate, schedule, "transport", 1, 0, 9999)

    all_routes_dict['rt3'] = xtot_objects.Route('rt3', origin, storage_1, 0.5, 3, commodity_slate, schedule, "transport", 1, 0, 9999)

    all_routes_dict['rt4'] = xtot_objects.Route('rt4', storage_1, processor, 0.5, 3, commodity_slate, schedule, "transport", 1, 0, 9999)

    all_routes_dict['rt5'] = xtot_objects.Route('rt5', processor, destination, 0.5, 3, commodity_slate, schedule)

#    print route2.duration
#    print route2.asText()


    return all_routes_dict
예제 #3
0
def _test_create_all_routes_5(all_facilities):

    # create and print two arcs
    # xtot_objects.Route("name", "origin_facility", "destination_facility", "cost_1", "cost_2", "min_capacity", "max_capacity", "travel_time")
    # testing to see if default capacity settings work

    origin_1 = all_facilities[0]
    origin_2 = all_facilities[1]
    destination = all_facilities[6]
    storage_1 = all_facilities[2]
    storage_2 = all_facilities[3]
    processor_1 = all_facilities[4]
    processor_2 = all_facilities[5]

    commodity_slate = _test_create_commodity_slate()
    schedule = schedule_full_availability()
    all_routes_dict = {}

    all_routes_dict['rt1'] = xtot_objects.Route('rt1', origin_1, destination,
                                                5, 2, commodity_slate,
                                                schedule)

    all_routes_dict['rt2'] = xtot_objects.Route('rt2', origin_1, processor_1,
                                                3, 3, commodity_slate,
                                                schedule, "transport", 1, 0,
                                                9999)

    all_routes_dict['rt3'] = xtot_objects.Route('rt3', origin_1, storage_1,
                                                0.5, 3, commodity_slate,
                                                schedule, "transport", 1, 0,
                                                9999)

    all_routes_dict['rt4'] = xtot_objects.Route('rt4', storage_1, processor_1,
                                                0.5, 3, commodity_slate,
                                                schedule, "transport", 1, 0,
                                                9999)

    all_routes_dict['rt5'] = xtot_objects.Route('rt5', processor_1,
                                                destination, 0.5, 3,
                                                commodity_slate, schedule)

    all_routes_dict['rt6'] = xtot_objects.Route('rt6', origin_1, processor_2,
                                                0.5, 3, commodity_slate,
                                                schedule)

    all_routes_dict['rt7'] = xtot_objects.Route('rt7', processor_2,
                                                destination, 0.5, 3,
                                                commodity_slate, schedule)

    all_routes_dict['rt8'] = xtot_objects.Route('rt8', origin_1, storage_2,
                                                0.2, 3, commodity_slate,
                                                schedule)

    all_routes_dict['rt9'] = xtot_objects.Route('rt9', origin_2, storage_2,
                                                0.2, 3, commodity_slate,
                                                schedule)

    all_routes_dict['rt10'] = xtot_objects.Route('rt10', storage_2,
                                                 processor_1, 0.2, 3,
                                                 commodity_slate, schedule)

    all_routes_dict['rt11'] = xtot_objects.Route('rt11', storage_2,
                                                 processor_2, 0.2, 3,
                                                 commodity_slate, schedule)

    return all_routes_dict