aequilibrae.project.data package#
Submodules#
aequilibrae.project.data.matrices module#
- class aequilibrae.project.data.matrices.Matrices(project)[source]#
Bases:
objectGateway into the matrices available/recorded in the model
- update_database() None[source]#
Adds records to the matrices database for matrix files found on disk
- list() DataFrame[source]#
List of all matrices available :returns: ) Pandas DataFrame listing all matrices available in the model :rtype: df (
pd.DataFrame
- get_matrix(matrix_name: str) AequilibraeMatrix[source]#
Returns an AequilibraE matrix available in the project
Raises an error if matrix does not exist
:param matrix_name (
str: ) Name of the matrix to be loaded- Returns:
) Matrix object
- Return type:
matrix (
AequilibraeMatrix
- get_record(matrix_name: str) MatrixRecord[source]#
Returns a model Matrix Record for manipulation in memory
- check_exists(name: str) bool[source]#
Checks whether a matrix with a given name exists
- Returns:
) Does the matrix exist?
- Return type:
exists (
bool
- delete_record(matrix_name: str) None[source]#
Deletes a Matrix Record from the model and attempts to remove from disk
- new_record(name: str, file_name: str, matrix=None) MatrixRecord[source]#
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
- Parameters:
*name* (
str) – Name of the matrix*file_name* (
str) – Name of the file on disk
- Returns:
A matrix record that can be manipulated in memory before saving
- Return type:
matrix_record (
MatrixRecord)