aequilibrae.project.project#
Classes
|
AequilibraE project class |
- class aequilibrae.project.project.Project[source]#
AequilibraE project class
Create Project#>>> new_project = Project() >>> new_project.new(project_path) # Safely closes the project >>> new_project.close()
Open Project#>>> existing_project = Project() >>> existing_project.open(project_path) >>> existing_project.close()
- check_file_indices() None[source]#
Makes results_database.sqlite and the matrices folder compatible with project database
- clone_scenario(scenario_name: str, description: str = '')[source]#
Clones the active scenario.
- Arguments:
scenario_name (
str): scenario namedescription (
str): useful scenario description
- create_empty_scenario(scenario_name: str, description: str = '')[source]#
Creates an empty scenario, without any links, nodes, and zones.
- Arguments:
scenario_name (
str): scenario namedescription (
str): useful scenario description
- list_scenarios()[source]#
Lists the existing scenarios.
- Returns:
scenarios (
pd.DataFrame): Pandas DataFrame with existing scenarios
- new(project_path: str) None[source]#
Creates a new project
- Arguments:
project_path (
str): Full path to the project data folder. If folder exists, it will fail
- open(project_path: str) None[source]#
Loads project from disk
- Arguments:
project_path (
str): Full path to the project data folder. If the project inside does not exist, it will fail.
- upgrade(ignore_project: bool = False, ignore_transit: bool = False, ignore_results: bool = False)[source]#
Find and apply all applicable migrations.
All database upgrades are applied within a single transaction.
Optionally ignore specific databases. This is useful when a database is known to be incompatible with some migrations but you’d still like to upgrade the others. Take care when ignoring a database. For a particular version of aequilibrae, it is assumed that all migrations have been applied successfully or the project was created with the latest schema, skipping/ignoring migrations will likely lead to issues/broken assumptions.
If skipping a specific migration is required, use the
aequilibrae.project.tools.MigrationManagerobject directly. Consult it’s documentation page for details. Take care when skipping migrations.- Arguments:
- ignore_project (
bool, optional): Ignore the project database. No direct migrations will be applied. Defaults to False.
- ignore_transit (
bool, optional): Ignore the transit database. No direct migrations will be applied. Defaults to False.
- ignore_results (
bool, optional): Ignore the results database. No direct migrations will be applied. Defaults to False.
- ignore_project (
- use_scenario(scenario_name: str)[source]#
Switch the active scenario.
- Arguments:
scenario_name (
str): name of the scenario to be activated
- property db_connection#
- property db_connection_spatial#
- property logger: Logger#
- property parameters: dict#
- property path_to_file#
- property project_base_path#
- property project_parameters: Parameters#
- property results_connection#
- property run#
Load and return the AequilibraE run module with the default arguments from
parameters.ymlpartially applied.Refer to
run/__init__.pyfile within the project folder for documentation.
- property transit_connection#
- property zoning#