Skip to content

Modules

parc

the parc

parc.configs

parc.configs

Provide different grid configurations.

The module contains the following configs:

  • edf - All sites under EDF control.
  • endesa
  • enel
  • rwe
  • tepco

parc.constants

UnitTechnology

Bases: StrEnum

NUCLEAR class-attribute instance-attribute

NUCLEAR = 'nuclear'

THERMAL class-attribute instance-attribute

THERMAL = 'thermal'

HYDRO class-attribute instance-attribute

HYDRO = 'hydro'

PHOTO class-attribute instance-attribute

PHOTO = 'photo'

WIND class-attribute instance-attribute

WIND = 'wind'

OTHER class-attribute instance-attribute

OTHER = 'other'

parc.databases

parc.grids

parc.naming

parc.sites

parc.technologies

parc.types

Grid

Grid(*, name='grid', sites=None)

A grid is just a list of units

PARAMETER DESCRIPTION
name

TYPE: str DEFAULT: 'grid'

sites

TYPE: Optional[list[Site]] DEFAULT: None

Source code in parc/types/grid.py
12
13
14
15
16
def __init__(self, *, name: str = "grid", sites: Optional[list[Site]] = None):
    if sites is None:
        sites = []
    self.name = name
    self.sites = sites

sites instance-attribute

sites = sites

name instance-attribute

name = name

Site

Site(*, name, units)

units: only use

PARAMETER DESCRIPTION
name

TYPE: str

units

TYPE: list[Unit]

Source code in parc/types/site.py
12
13
14
def __init__(self, *, name: str, units: list[Unit]):
    self.name = name
    self.units = units

name instance-attribute

name = name

units instance-attribute

units = units

Unit

Unit(*, technology, name, electricity_producer=True)

electricity_producer: can be false for common buildings (storage, control rooms...)

PARAMETER DESCRIPTION
technology

TYPE: UnitTechnology

name

TYPE: str

electricity_producer

TYPE: bool DEFAULT: True

Source code in parc/types/unit.py
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
def __init__(
    self,
    *,
    technology: UnitTechnology,
    name: str,
    electricity_producer: bool = True,
):
    self.name = name
    self.technology = technology
    self.electricity_producer = electricity_producer
    self._unique_key = name + technology + str(electricity_producer)
    if self._unique_key in _ALL_UNITS:
        # a unit must be unique
        raise UniqueUnitError(_ALL_UNITS[self._unique_key])
    _ALL_UNITS[self._unique_key] = self

name instance-attribute

name = name

technology instance-attribute

technology = technology

electricity_producer instance-attribute

electricity_producer = electricity_producer

parc.utils