Commit 1d63feb8 authored by Dipam Chakraborty's avatar Dipam Chakraborty
Browse files

fix cancelled check to off map state

parent cc04d63f
...@@ -414,7 +414,7 @@ class RailEnv(Environment): ...@@ -414,7 +414,7 @@ class RailEnv(Environment):
# Agents not done (arrival_time is None) # Agents not done (arrival_time is None)
else: else:
# CANCELLED check (never departed) # CANCELLED check (never departed)
if (agent.state == TrainState.READY_TO_DEPART): if (agent.state.is_off_map_state()):
reward = -1 * self.cancellation_factor * \ reward = -1 * self.cancellation_factor * \
(agent.get_travel_time_on_shortest_path(self.distance_map) + self.cancellation_time_buffer) (agent.get_travel_time_on_shortest_path(self.distance_map) + self.cancellation_time_buffer)
......
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