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

fixed missing agent_malfunction_rates=None

parent 8a425eac
No related branches found
No related tags found
No related merge requests found
......@@ -199,12 +199,12 @@ def random_schedule_generator(speed_ratio_map: Optional[Mapping[float, float]] =
valid_positions.append((r, c))
if len(valid_positions) == 0:
return Schedule(agent_positions=[], agent_directions=[],
agent_targets=[], agent_speeds=[])
agent_targets=[], agent_speeds=[], agent_malfunction_rates=None)
if len(valid_positions) < num_agents:
warnings.warn("schedule_generators: len(valid_positions) < num_agents")
return Schedule(agent_positions=[], agent_directions=[],
agent_targets=[], agent_speeds=[])
agent_targets=[], agent_speeds=[], agent_malfunction_rates=None)
agents_position_idx = [i for i in np.random.choice(len(valid_positions), num_agents, replace=False)]
agents_position = [valid_positions[agents_position_idx[i]] for i in range(num_agents)]
......
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