Skip to content
Snippets Groups Projects
Commit 32c11d52 authored by Erik Nygren's avatar Erik Nygren :bullettrain_front:
Browse files

minor fixes to code to get tests running again.

parent ef5ad8e9
No related branches found
No related tags found
No related merge requests found
......@@ -781,7 +781,7 @@ def sparse_rail_generator(num_cities=5, num_intersections=4, num_trainstations=2
node_available_target.append(len(train_stations[node_idx]))
# Assign agents to slots
for agent_idx in range(nb_nodes):
for agent_idx in range(num_agents):
avail_start_nodes = [idx for idx, val in enumerate(node_available_start) if val > 0]
avail_target_nodes = [idx for idx, val in enumerate(node_available_target) if val > 0]
start_node = np.random.choice(avail_start_nodes)
......
......@@ -68,6 +68,7 @@ def sparse_schedule_generator(speed_ratio_map: Mapping[float, float] = None) ->
agents_position = []
agents_target = []
agents_direction = []
for agent_idx in range(num_agents):
# Set target for agent
current_target_node = agent_start_targets_nodes[agent_idx][1]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment