Skip to content

Commit

Permalink
create agents data path
Browse files Browse the repository at this point in the history
  • Loading branch information
AnastasiaPsarou committed Dec 5, 2024
1 parent cdb3a4a commit 8e0d7a0
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion RouteRL/create_agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def create_agent_objects(params, free_flow_times):
# Getting parameters
action_space_size = params[kc.ACTION_SPACE_SIZE]

agents_data_path = params[kc.AGENTS_DATA_PATH]
agents_data_path = params[kc.CREATE_AGENTS_DATA_PATH]
if os.path.isfile(agents_data_path):
logging.info("[CONFIRMED] Agents data file is ready.")
else:
Expand Down
3 changes: 2 additions & 1 deletion RouteRL/keychain.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ class Keychain:
RATIO_MUTATING = "ratio_mutating"
AGENT_ATTRIBUTES = "agent_attributes"
NEW_MACHINES_AFTER_MUTATION = "new_machines_after_mutation"
CREATE_AGENTS_DATA_PATH = "create_agents_data_path"

### Path generation
NUMBER_OF_PATHS = "number_of_paths"
Expand Down Expand Up @@ -157,7 +158,7 @@ class Keychain:
SUMO_FCD = "sumo_fcd"

PATHS_CSV_SAVE_PATH = "paths_csv_save_path"
AGENTS_DATA_PATH = "agents_data_path"
AGENTS_DATA_PATH = "gen_agents_data_path"
SAVE_TRIPINFO_XML = "save_tripinfo_xml"
SAVE_TRAJECTORIES_XML = "save_trajectories_xml"
SAVE_FCD_BASED_SPEEDS = "save_fcd_based_speeds"
Expand Down
2 changes: 1 addition & 1 deletion tutorials/MarlAlgorithmsCsomorNet/params.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

"agent_parameters" :
{
"agents_data_path" : "${agent_generation_parameters.agents_data_path}",
"create_agents_data_path": "../../RouteRL/network_and_config/agents_data.csv",
"action_space_size" : "${path_generation_parameters.number_of_paths}",

"machine_parameters" :
Expand Down
2 changes: 1 addition & 1 deletion tutorials/MarlAlgorithmsTwoRouteNet/params.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

"agent_parameters" :
{
"agents_data_path" : "${agent_generation_parameters.agents_data_path}",
"create_agents_data_path": "../../RouteRL/network_and_config/agents_data.csv",
"action_space_size" : "${path_generation_parameters.number_of_paths}",

"machine_parameters" :
Expand Down
2 changes: 1 addition & 1 deletion tutorials/PettingZooEnv/params_main.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

"agent_parameters" :
{
"agents_data_path" : "${agent_generation_parameters.agents_data_path}",
"create_agents_data_path": "../../RouteRL/network_and_config/agents_data.csv",
"action_space_size" : "${path_generation_parameters.number_of_paths}",

"machine_parameters" :
Expand Down
5 changes: 3 additions & 2 deletions tutorials/SoftwareXExperiments/params.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

"agent_parameters" :
{
"agents_data_path" : "${agent_generation_parameters.agents_data_path}",
"create_agents_data_path": "../../RouteRL/network_and_config/agents_data.csv",
"action_space_size" : "${path_generation_parameters.number_of_paths}",

"machine_parameters" :
Expand Down Expand Up @@ -132,7 +132,8 @@
"origins" : "${path_generation_parameters.origins}",
"destinations" : "${path_generation_parameters.destinations}",

"agents_data_path": "../../RouteRL/network_and_config/agents_data.csv"
"gen_agents_data_path": "RouteRL/network_and_config/agents_data.csv"

},


Expand Down

0 comments on commit 8e0d7a0

Please sign in to comment.