From 8a9ba90d245a9d90f72738ff7b996bfef58dcad8 Mon Sep 17 00:00:00 2001 From: u214892 <u214892@sbb.ch> Date: Mon, 17 Jun 2019 15:30:41 +0200 Subject: [PATCH] 66 shortest-path-predictor: cleanup and unit test; not working yet --- flatland/envs/predictions.py | 4 ++-- tests/test_env_prediction_builder.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/flatland/envs/predictions.py b/flatland/envs/predictions.py index 0d5387d..3fda737 100644 --- a/flatland/envs/predictions.py +++ b/flatland/envs/predictions.py @@ -31,7 +31,7 @@ class DummyPredictorForRailEnv(PredictionBuilder): Returns ------- np.array - Returns a dictionary indexed by the agent handle and for each agent a vector of (max_depth + 1) x 5 elements: + Returns a dictionary indexed by the agent handle and for each agent a vector of (max_depth + 1)x5 elements: - time_offset - position axis 0 - position axis 1 @@ -101,7 +101,7 @@ class ShortestPathPredictorForRailEnv(PredictionBuilder): Returns ------- np.array - Returns a dictionary indexed by the agent handle and for each agent a vector of (max_depth + 1) x 5 elements: + Returns a dictionary indexed by the agent handle and for each agent a vector of (max_depth + 1)x5 elements: - time_offset - position axis 0 - position axis 1 diff --git a/tests/test_env_prediction_builder.py b/tests/test_env_prediction_builder.py index 4d4078c..f34829d 100644 --- a/tests/test_env_prediction_builder.py +++ b/tests/test_env_prediction_builder.py @@ -166,7 +166,7 @@ def test_shortest_path_predictor(rendering=False): if rendering: renderer = RenderTool(env, gl="PILSVG") renderer.renderEnv(show=True, show_observations=False) - # input("Continue?") + input("Continue?") agent = env.agents[0] assert agent.position == (5, 6) -- GitLab