From 0c52fc01a49524568afb8557bee86b8df2ea9f49 Mon Sep 17 00:00:00 2001 From: Erik Nygren <erik.nygren@sbb.ch> Date: Sun, 14 Jul 2019 13:23:45 -0400 Subject: [PATCH] updated load and save function. Now also distance maps are stored. Additional package msgpack-numpy needed for ndarray. This saves tons of time when loading precomputed files. Updated test to test loading and saving with and without distance maps minor update to bug in observation dimension --- flatland/envs/observations.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/flatland/envs/observations.py b/flatland/envs/observations.py index 977a74a1..4385d4da 100644 --- a/flatland/envs/observations.py +++ b/flatland/envs/observations.py @@ -22,7 +22,7 @@ class TreeObsForRailEnv(ObservationBuilder): For details about the features in the tree observation see the get() function. """ - + observation_dim = 9 def __init__(self, max_depth, predictor=None): super().__init__() @@ -43,9 +43,6 @@ class TreeObsForRailEnv(ObservationBuilder): self.tree_explorted_actions_char = ['L', 'F', 'R', 'B'] self.distance_map = None - # this needs to be updated when new features are added! - self.observation_dim = 9 - def reset(self): agents = self.env.agents nb_agents = len(agents) -- GitLab