aequilibrae package

Subpackages

Submodules

aequilibrae.context module

aequilibrae.context.activate_project(project)
aequilibrae.context.get_active_project(must_exist=True)
aequilibrae.context.get_logger()

aequilibrae.log module

class aequilibrae.log.Log(project_base_path: str)

Bases: object

API entry point to the log file contents

from aequilibrae import Project

p = Project()
p.open('path/to/project/folder')

log = p.log()

# We get all entries for the log file
entries = log.contents()

# Or clear everything (NO UN-DOs)
log.clear()
__init__(project_base_path: str)
contents() list

Returns contents of log file

Return:

log_contents (list): List with all entries in the log file

clear()

Clears the log file. Use it wisely

aequilibrae.log.get_log_handler(log_file: str, ensure_file_exists=True)

return a log handler that writes to the given log_file

aequilibrae.parameters module

class aequilibrae.parameters.Parameters(project=None)

Bases: object

Global parameters module

Parameters are used in many procedures, and are often defined only in the parameters.yml file ONLY Parameters are organized in the following groups:

  • assignment

  • distribution

  • system
    • cpus: Maximum threads to be used in any procedure

    • default_directory: If is the directory QGIS file opening/saving dialogs will try to open as standard

    • driving side: For purposes of plotting on QGIS

    • logging: Level of logging to be written to temp/aequilibrae.log: Levels are those from the Python logging library
      • 0: ‘NOTSET’

      • 10: ‘DEBUG’

      • 20: ‘INFO’

      • 30: ‘WARNING’

      • 40: ‘ERROR’

      • 50: ‘CRITICAL’

  • report zeros

  • temp directory

file_default: str = '/home/runner/work/aequilibrae/aequilibrae/aequilibrae/parameters.yml'
__init__(project=None)

Loads parameters from file. The place is always the same. The root of the package

write_back()

Writes the parameters back to file

restore_default()

Restores parameters to generic default

Module contents

aequilibrae.setup()
aequilibrae.cleaning()