aequilibrae.project.data.matrices#
Classes
|
Gateway into the matrices available/recorded in the model |
- class aequilibrae.project.data.matrices.Matrices(project)[source]#
Gateway into the matrices available/recorded in the model
- check_exists(name: str) bool [source]#
Checks whether a matrix with a given name exists
- Returns:
exists (
bool
): Does the matrix exist?
- clear_database() None [source]#
Removes records from the matrices database that do not exist in disk
- delete_record(matrix_name: str) None [source]#
Deletes a Matrix Record from the model and attempts to remove from disk
- get_matrix(matrix_name: str) AequilibraeMatrix [source]#
Returns an AequilibraE matrix available in the project
Raises an error if matrix does not exist
- Arguments:
matrix_name (
str
): Name of the matrix to be loaded- Returns:
matrix (
AequilibraeMatrix
): Matrix object
- get_record(matrix_name: str) MatrixRecord [source]#
Returns a model Matrix Record for manipulation in memory
- list() DataFrame [source]#
List of all matrices available
- Returns:
df (
pd.DataFrame
): Pandas DataFrame listing all matrices available in the model
- 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
- Arguments:
name (
str
): Name of the matrixfile_name (
str
): Name of the file on disk- Returns:
matrix_record (
MatrixRecord
): A matrix record that can be manipulated in memory before saving