Skip to content

Commit

Permalink
updating app.py to work with agnostic path
Browse files Browse the repository at this point in the history
  • Loading branch information
ebalogun01 committed Dec 13, 2023
1 parent 5854d23 commit ed6f1d5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,12 @@ def simulate(user_inputs, sequential_run=True, parallel_run=False):
# Updating the user inputs based on frontend inputs.
create_results_folder() # Make a results folder if it does not exist.

path_prefix = os.getcwd()
path_prefix = os.getcwd() # TODO WORK ON THIS
# repo_name = path_prefix.split('\\')[-1]
# print("path_prefix is ", path_prefix)
# print(path_prefix.split('\\'))
# Change below to name of the repo.
results_folder_path = path_prefix[: path_prefix.index('EV-EcoSim')] + 'EV-EcoSim/analysis/results'
path_prefix = path_prefix[: path_prefix.index('EV-EcoSim')] + 'EV-EcoSim'
results_folder_path = path_prefix + '/analysis/results'

# PRELOAD
station_config = open(path_prefix + '/test_cases/battery/feeder_population/config.txt', 'r')
Expand Down
7 changes: 7 additions & 0 deletions charging_sim/simulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ def make_month_str(month_int: int):
return f'0{str(month_int)}'


def get_repository_name():
"""
Helps obtain the current directory which houses the repository currently in.
:return:
"""

# GET THE PATH PREFIX FOR SAVING THE INPUTS
# user_inputs = load_default_input()

Expand Down

0 comments on commit ed6f1d5

Please sign in to comment.