aequilibrae.project.data package¶
Submodules¶
aequilibrae.project.data.matrices module¶
-
class
aequilibrae.project.data.matrices.Matrices¶ Bases:
objectGateway into the matrices available/recorded in the model
-
__init__()¶ Initialize self. See help(type(self)) for accurate signature.
-
reload()¶ Discards all memory matrices in memory and loads recreate them
-
clear_database() → None¶ Removes records from the matrices database that do not exist in disk
-
update_database() → None¶ Adds records to the matrices database for matrix files found on disk
-
list() → pandas.core.frame.DataFrame¶ List of all matrices available Returns:
df (
pd.DataFrame:) Pandas DataFrame listing all matrices available in the model
-
get_matrix(matrix_name: str) → aequilibrae.matrix.aequilibrae_matrix.AequilibraeMatrix¶ Returns an AequilibraE matrix available in the project
Raises an error if matrix does not exist
- Args:
matrix_name (
str:) Name of the matrix to be loaded- Returns:
matrix (
AequilibraeMatrix:) Matrix object
-
get_record(matrix_name: str) → aequilibrae.project.data.matrix_record.MatrixRecord¶ Returns a model Matrix Record for manipulation in memory
-
check_exists(name: str) → bool¶ Checks whether a matrix with a given name exists
- Returns:
exists (
bool:) Does the matrix exist?
-
delete_record(matrix_name: str) → None¶ Deletes a Matrix Record from the model and attempts to remove from disk
-
new_record(name: str, file_name: str, matrix=<aequilibrae.matrix.aequilibrae_matrix.AequilibraeMatrix object>) → aequilibrae.project.data.matrix_record.MatrixRecord¶ Creates a new record for a matrix in disk, but does not save it
If the matrix file is not already on disk, it will fail
- Args:
name (
str): Name of the matrix file_name (str): Name of the file on disk- Return:
matrix_record (
MatrixRecord): A matrix record that can be manipulated in memory before saving
-
aequilibrae.project.data.matrix_record module¶
-
class
aequilibrae.project.data.matrix_record.MatrixRecord(data_set: dict)¶ Bases:
aequilibrae.project.network.safe_class.SafeClass-
__init__(data_set: dict)¶ Initialize self. See help(type(self)) for accurate signature.
-
save()¶ Saves matrix record to the project database
-
delete()¶ Deletes this matrix record and the underlying data from disk
-
update_cores()¶ Updates this matrix record with the matrix core count in disk
-
get_data() → aequilibrae.matrix.aequilibrae_matrix.AequilibraeMatrix¶ Returns the actual matrix for further computation
- Returns:
matrix (
AequilibraeMatrix:) Matrix object
-