aequilibrae.project.data package#

Submodules#

aequilibrae.project.data.matrices module#

class aequilibrae.project.data.matrices.Matrices(project)[source]#

Bases: object

Gateway into the matrices available/recorded in the model

reload()[source]#

Discards all memory matrices in memory and loads recreate them

clear_database() None[source]#

Removes records from the matrices database that do not exist in disk

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)

aequilibrae.project.data.matrix_record module#

class aequilibrae.project.data.matrix_record.MatrixRecord(data_set: dict, project)[source]#

Bases: SafeClass

save()[source]#

Saves matrix record to the project database

delete()[source]#

Deletes this matrix record and the underlying data from disk

update_cores()[source]#

Updates this matrix record with the matrix core count in disk

get_data() AequilibraeMatrix[source]#

Returns the actual matrix for further computation

Returns:

) Matrix object

Return type:

matrix (AequilibraeMatrix

Module contents#