Skip to content
Snippets Groups Projects
Commit 4c23011e authored by Egli Adrian (IT-SCI-API-PFI)'s avatar Egli Adrian (IT-SCI-API-PFI)
Browse files

removed print -> clean up code

parent 52ae5db7
No related branches found
No related tags found
No related merge requests found
...@@ -168,7 +168,6 @@ def realistic_rail_generator(num_cities=5, ...@@ -168,7 +168,6 @@ def realistic_rail_generator(num_cities=5,
x = len(track) - 1 x = len(track) - 1
end_node = track[x] end_node = track[x]
connection = connect_rail(rail_trans, grid_map, start_node, end_node) connection = connect_rail(rail_trans, grid_map, start_node, end_node)
print(start_node, end_node, "-->", connection)
if len(connection) == 0: if len(connection) == 0:
if print_out_info: if print_out_info:
print("create_switches_at_stations : connect_rail -> no path found") print("create_switches_at_stations : connect_rail -> no path found")
...@@ -482,8 +481,8 @@ if os.path.exists("./../render_output/"): ...@@ -482,8 +481,8 @@ if os.path.exists("./../render_output/"):
for itrials in range(1000): for itrials in range(1000):
print(itrials, "generate new city") print(itrials, "generate new city")
np.random.seed(itrials) np.random.seed(itrials)
env = RailEnv(width=40 + np.random.choice(100), env = RailEnv(width=20 + np.random.choice(100),
height=40 + np.random.choice(100), height=20 + np.random.choice(100),
rail_generator=realistic_rail_generator(num_cities=5 + np.random.choice(10), rail_generator=realistic_rail_generator(num_cities=5 + np.random.choice(10),
city_size=10 + np.random.choice(10), city_size=10 + np.random.choice(10),
allowed_rotation_angles=np.arange(-180, 180, 30), allowed_rotation_angles=np.arange(-180, 180, 30),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment