Skip to content
Snippets Groups Projects
Commit d9dc8c8f authored by u214892's avatar u214892
Browse files

make FLATland core useable without rendering

parent 33701dd2
No related branches found
No related tags found
No related merge requests found
...@@ -4,13 +4,15 @@ from flatland.action_plan.action_plan import ControllerFromTrainruns ...@@ -4,13 +4,15 @@ from flatland.action_plan.action_plan import ControllerFromTrainruns
from flatland.envs.rail_env import RailEnv from flatland.envs.rail_env import RailEnv
from flatland.envs.rail_trainrun_data_structures import Waypoint from flatland.envs.rail_trainrun_data_structures import Waypoint
ControllerFromTrainrunsReplayerRenderCallback = Callable[[RailEnv], None]
class ControllerFromTrainrunsReplayer(): class ControllerFromTrainrunsReplayer():
"""Allows to verify a `DeterministicController` by replaying it against a FLATland env without malfunction.""" """Allows to verify a `DeterministicController` by replaying it against a FLATland env without malfunction."""
@staticmethod @staticmethod
def replay_verify(ctl: ControllerFromTrainruns, env: RailEnv, def replay_verify(ctl: ControllerFromTrainruns, env: RailEnv,
call_back: Callable[[RailEnv], None] = lambda *a, **k: None): call_back: ControllerFromTrainrunsReplayerRenderCallback = lambda *a, **k: None):
"""Replays this deterministic `ActionPlan` and verifies whether it is feasible. """Replays this deterministic `ActionPlan` and verifies whether it is feasible.
Parameters Parameters
......
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