aequilibrae.project.network.Period#

class aequilibrae.project.network.Period(dataset, project)[source]#

A Period object represents a single record in the periods table

>>> from aequilibrae import Project

>>> proj = Project.from_path("/tmp/test_project")

>>> all_periods = proj.network.periods

# We can just get one link in specific
>>> period1 = all_periods.get(1)

# We can find out which fields exist for the period
>>> which_fields_do_we_have = period1.data_fields()

# It succeeds if the period_id already does not exist
>>> period1.renumber(998877)

# We can just save the period
>>> period1.save()
__init__(dataset, project)[source]#

Methods

__init__(dataset, project)

connect_db()

data_fields()

Lists all data fields for the period, as available in the database

renumber(new_id)

Renumbers the period in the network

save()

Saves period to database

save()[source]#

Saves period to database

data_fields() list[source]#

Lists all data fields for the period, as available in the database

Returns:

data fields (list): list of all fields available for editing

renumber(new_id: int)[source]#

Renumbers the period in the network

Logs a warning if another period already exists with this period_id

Arguments:

new_id (int): New period_id

connect_db()#