Commit 59e7d186 authored by Egli Adrian (IT-SCI-API-PFI)'s avatar Egli Adrian (IT-SCI-API-PFI)
Browse files

RailEnv default value in constructor remove_agents_at_target=True

parent f0adacbf
Pipeline #2567 passed with stages
in 41 minutes and 33 seconds
......@@ -116,7 +116,7 @@ class RailEnv(Environment):
number_of_agents=1,
obs_builder_object: ObservationBuilder = GlobalObsForRailEnv(),
stochastic_data=None,
remove_agents_at_target=False,
remove_agents_at_target=True,
random_seed=1
):
"""
......
......@@ -22,6 +22,7 @@ def test_initial_status():
schedule_generator=random_schedule_generator(),
number_of_agents=1,
obs_builder_object=TreeObsForRailEnv(max_depth=2, predictor=ShortestPathPredictorForRailEnv()),
remove_agents_at_target=False
)
env.reset()
set_penalties_for_replay(env)
......
......@@ -182,6 +182,7 @@ def test_reward_function_waiting(rendering=False):
schedule_generator=random_schedule_generator(),
number_of_agents=2,
obs_builder_object=TreeObsForRailEnv(max_depth=2, predictor=ShortestPathPredictorForRailEnv()),
remove_agents_at_target=False
)
obs_builder: TreeObsForRailEnv = env.obs_builder
# initialize agents_static
......
......@@ -1343,7 +1343,8 @@ def test_rail_env_action_required_info():
),
schedule_generator=sparse_schedule_generator(speed_ration_map),
number_of_agents=10,
obs_builder_object=GlobalObsForRailEnv())
obs_builder_object=GlobalObsForRailEnv(),
remove_agents_at_target=False)
env_always_action.reset()
np.random.seed(0)
random.seed(0)
......@@ -1358,7 +1359,8 @@ def test_rail_env_action_required_info():
),
schedule_generator=sparse_schedule_generator(speed_ration_map),
number_of_agents=10,
obs_builder_object=GlobalObsForRailEnv())
obs_builder_object=GlobalObsForRailEnv(),
remove_agents_at_target=False)
env_only_if_action_required.reset()
env_renderer = RenderTool(env_always_action, gl="PILSVG", )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment