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

fixed target distribution bug

parent 0213fa04
No related branches found
No related tags found
No related merge requests found
...@@ -73,7 +73,7 @@ def sparse_schedule_generator(speed_ratio_map: Mapping[float, float] = None) -> ...@@ -73,7 +73,7 @@ def sparse_schedule_generator(speed_ratio_map: Mapping[float, float] = None) ->
for agent_idx in range(num_agents): for agent_idx in range(num_agents):
# Set target for agent # Set target for agent
start_city = agent_start_targets_nodes[agent_idx][0] start_city = agent_start_targets_nodes[agent_idx][0]
target_city = agent_start_targets_nodes[agent_idx][0] target_city = agent_start_targets_nodes[agent_idx][1]
agent_orientation = (agent_start_targets_nodes[agent_idx][2] + np.random.choice([0, 2])) % 4 agent_orientation = (agent_start_targets_nodes[agent_idx][2] + np.random.choice([0, 2])) % 4
start_city_idx = np.random.randint(len(train_stations[start_city])) start_city_idx = np.random.randint(len(train_stations[start_city]))
start = train_stations[start_city][start_city_idx] start = train_stations[start_city][start_city_idx]
......
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