energia.components.spatial.linkage#

Linkage links Locations through Transits

Functions

is_(a, b, /)

Same as a is b.

Classes

I(*members[, size, start, mutable, tag, ...])

Set of index elements (X).

Linkage(source, sink[, dist, bi, auto, ...])

Linkage between two Locations.

cached_property(func)

class Linkage(source: Location, sink: Location, dist: float | None = None, bi: bool = False, auto: bool = False, label: str = '', citations: str = '')[source]#

Bases: _X

Linkage between two Locations.

Parameters:
  • name (str, optional) – Name of the Linkage. Defaults to None.

  • label (str, optional) – Label of the Linkage. Defaults to None.

  • source (Loc) – Source Location.

  • sink (Loc) – Sink Location.

  • dist (float | Unit) – Distance between the two Locations.

  • bi (bool, optional) – Is the Linkage bidirectional? Defaults to False.

  • auto (bool, optional) – Is the Linkage automatically generated? Defaults to False.

Variables:
  • model (Model) – Model to which the Linkage belongs.

  • space (Space) – Space to which the Linkage belongs.

  • network (Loc) – Network to which the Linkage belongs.

property space: Space[source]#

Space to which the Location belongs

property network: Location#

Network to which the Location belongs

property isnetwork: bool#

Is this the network of the model? Linkage can never be the network

property isin: Location | None#

Location to which the Linkage belongs

rev()[source]#

Reversed Link

property I: I[source]#

gana index set (I)

update_hierarchy(hierarchy: int = 0)[source]#

Updates the hierarchy of the locations

property cons: list[C]#

Constraints

property program: Prg#

Mathematical program

show(descriptive=False, category: str = '')#

Pretty print the component