Skip to content

Commit

Permalink
remove warmstart folder
Browse files Browse the repository at this point in the history
  • Loading branch information
i-am-sijia committed Dec 18, 2024
1 parent e4e9b3b commit ab4627a
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 19 deletions.
26 changes: 13 additions & 13 deletions examples/setup_config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,32 @@
#######################

# this is where user want to create the MTC model
ROOT_DIR = "V:/projects/MTC/US0024934.9168/setup_model"
ROOT_DIR = "D:/"

# user-defined model folder name (naming convention: ModelYear_ModelVersion_Project_Scenario)
MODEL_FOLDER_NAME = "2023_TM22_Demo"
MODEL_FOLDER_NAME = "TM2.2.1.3_clean_setup"

# location of the networks
# this includes file such as tolls, transit fares etc.
INPUT_NETWORK_DIR = "V:/projects/MTC/US0024934.9168/setup_model/model_inputs/2015-tm22-dev-sprint-02"
INPUT_NETWORK_DIR = "Z:/projects/MTC/US0024934.9168/setup_model/model_inputs/2015-tm22-dev-sprint-03"

# this is location/folder for Emme Netorks (built from Lasso)
INPUT_EMME_NETWORK_DIR = "V:/projects/MTC/US0024934.9168/setup_model/emme_network"
# this is the location/folder for Emme Netorks (built from Lasso)
INPUT_EMME_NETWORK_DIR = "Z:/projects/MTC/US0024934.9168/setup_model/emme_network"

# location of the populationsim and land use inputs
INPUT_POPLU_DIR = "V:/projects/MTC/US0024934.9168/setup_model/model_inputs/2015-tm22-dev-sprint-02"
INPUT_POPLU_DIR = "Z:/projects/MTC/US0024934.9168/setup_model/model_inputs/2015-tm22-dev-sprint-03"

# location of nonres inputs
INPUT_NONRES_DIR = "V:/projects/MTC/US0024934.9168/setup_model/model_inputs/2015-tm22-dev-sprint-02"
INPUT_NONRES_DIR = "Z:/projects/MTC/US0024934.9168/setup_model/model_inputs/2015-tm22-dev-sprint-03"

# this is location of demand matrices for warm start
WARMSTART_DEMAND_DIR = "V:/projects/MTC/transit_path_builder_calib/TM2.2.1.2/warmstart"
# this is the location of a previous run folder which has the warm start demand or skims
WARMSTART_FILES_DIR = "Z:/projects/MTC/transit_path_builder_calib/TM2.2.1.2/warmstart"

# this is location/folder for Emme Netorks
EMME_TEMPLATE_PROJECT_DIR = "V:/projects/MTC/US0024934.9168/setup_model/emme_23_project_template"
# this is the location/folder for Emme Netorks
EMME_TEMPLATE_PROJECT_DIR = "Z:/projects/MTC/US0024934.9168/setup_model/emme_23_project_template"

# github raw link for toml config files
CONFIGS_GITHUB_PATH = "https://raw.githubusercontent.com/BayAreaMetro/travel-model-two-config/sprint_02/2015-tm22-dev-sprint-02"
CONFIGS_GITHUB_PATH = "https://raw.githubusercontent.com/BayAreaMetro/travel-model-two-config/refs/heads/main/2015-tm22-dev-sprint-03"

# travel model two release tag to fetch
TRAVEL_MODEL_TWO_RELEASE_TAG = "TM2.2.2"
TRAVEL_MODEL_TWO_RELEASE_TAG = "TM2.2.3"
26 changes: 20 additions & 6 deletions tm2py/setup_model/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ def run_setup(self):
"emme_project",
"inputs",
"logs",
"warmstart",
"notebooks",
"output_summaries",
"skim_matrices",
Expand Down Expand Up @@ -358,10 +357,25 @@ def _copy_model_inputs(self, configs, model_dir, logger):
logger,
)

# Copy warmstart demand
self._copy_folder(
configs.WARMSTART_DEMAND_DIR, os.path.join(model_dir, "warmstart"), logger
)
# Copy warmstart demand if exists
if os.path.exists(
os.path.join(configs.WARMSTART_FILES_DIR, "demand_matrices")
):
self._copy_folder(
os.path.join(configs.WARMSTART_FILES_DIR, "demand_matrices"),
os.path.join(model_dir, "demand_matrices"),
logger
)

# Copy warmstart skims
if os.path.exists(
os.path.join(configs.WARMSTART_FILES_DIR, "skim_matrices")
):
self._copy_folder(
os.path.join(configs.WARMSTART_FILES_DIR, "skim_matrices"),
os.path.join(model_dir, "skim_matrices"),
logger
)

def _copy_emme_project_and_database(self, configs, model_dir, logger):
"""
Expand Down Expand Up @@ -426,7 +440,7 @@ def validate(self):
"MODEL_FOLDER_NAME",
"INPUT_NETWORK_DIR",
"INPUT_POPLU_DIR",
"WARMSTART_DEMAND_DIR",
"WARMSTART_FILES_DIR",
"CONFIGS_GITHUB_PATH",
"TRAVEL_MODEL_TWO_RELEASE_TAG",
]
Expand Down

0 comments on commit ab4627a

Please sign in to comment.