Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Flatland
Flatland
Commits
1d63feb8
Commit
1d63feb8
authored
Sep 14, 2021
by
Dipam Chakraborty
Browse files
fix cancelled check to off map state
parent
cc04d63f
Changes
1
Hide whitespace changes
Inline
Side-by-side
flatland/envs/rail_env.py
View file @
1d63feb8
...
...
@@ -414,7 +414,7 @@ class RailEnv(Environment):
# Agents not done (arrival_time is None)
else
:
# CANCELLED check (never departed)
if
(
agent
.
state
==
TrainState
.
READY_TO_DEPART
):
if
(
agent
.
state
.
is_off_map_state
()
):
reward
=
-
1
*
self
.
cancellation_factor
*
\
(
agent
.
get_travel_time_on_shortest_path
(
self
.
distance_map
)
+
self
.
cancellation_time_buffer
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment