Bugfixes after merge with main #309
GitHub Actions / Unit Test Results
failed
Dec 12, 2024 in 0s
2 fail, 4 skipped, 132 pass in 1m 22s
Annotations
Check warning on line 0 in test.test_minimal_passenger_travel_time_dispatcher_cython
github-actions / Unit Test Results
test_equivalence_simulator_cython_and_python_minimal_passenger_travel_time_dispatcher (test.test_minimal_passenger_travel_time_dispatcher_cython) failed
test-junit-reports/result.xml [took 0s]
Raw output
TypeError: __init__() got an unexpected keyword argument 'request_class'
seed = 42
def test_equivalence_simulator_cython_and_python_minimal_passenger_travel_time_dispatcher(
seed=42,
):
"""
Tests that the simulation runs with pure pythonic and cythonic minimal passenger travel time dispatcher produces identical events.
"""
for py_space, cy_space in (
(pyspaces.Euclidean2D(), cyspaces.Euclidean2D()),
# DO NOT test graph spaces for now, as we use different methods for computing the shortest path
# (floyd-warshall in Python and dijkstra in C++. Therefore differences in interpolation arise.)
# (
# pyspaces.Graph.from_nx(make_nx_grid()),
# cyspaces.Graph.from_nx(make_nx_grid()),
# ),
):
n_reqs = 100
random.seed(seed)
init_loc = py_space.random_point()
random.seed(seed)
assert init_loc == cy_space.random_point()
######################################################
# PYTHON
######################################################
ssfs = SlowSimpleFleetState(
initial_locations={7: init_loc},
seat_capacities=10,
space=py_space,
dispatcher=MinimalPassengerTravelTimeDispatcher(),
vehicle_state_class=py_VehicleState,
)
> rg = RandomRequestGenerator(
space=py_space,
request_class=pyds.TransportationRequest,
seed=seed,
rate=1.5,
)
E TypeError: __init__() got an unexpected keyword argument 'request_class'
test/test_minimal_passenger_travel_time_dispatcher_cython.py:159: TypeError
Check warning on line 0 in test.test_minimal_passenger_travel_time_dispatcher_cython
github-actions / Unit Test Results
test_sanity_in_graph (test.test_minimal_passenger_travel_time_dispatcher_cython) failed
test-junit-reports/result.xml [took 0s]
Raw output
TypeError: __init__() got an unexpected keyword argument 'request_class'
def test_sanity_in_graph():
"""
Insert a request, note delivery time.
Handle more requests so that there's no pooling.
Assert that the delivery time is not changed.
Or more simply, assert that the vehicle moves at either the space's velocity or 0.
"""
for velocity in [0.9, 1, 1.1]:
space = cyspaces.Graph.from_nx(make_nx_grid(), velocity=velocity)
# max_pickup_delay=0,
> rg = RandomRequestGenerator(
rate=10,
space=space,
max_delivery_delay_abs=0,
request_class=cyds.TransportationRequest,
)
E TypeError: __init__() got an unexpected keyword argument 'request_class'
test/test_minimal_passenger_travel_time_dispatcher_cython.py:216: TypeError
Loading