energia.components#
energia.components module
Classes
|
Same as Economic Impact (Eco) |
|
Economic impact |
|
|
|
Environmental Impact |
|
Interaction between Players |
|
Land used by Operations |
|
Linkage between two Locations. |
|
A discretization of Space. |
|
Materials are Resources, that are used to set up Operations |
|
A discretization of Time. |
|
Player or Actor, the one taking the decisions based on information provided |
|
Process converts one Resource to another Resource at some Location |
|
A resource, can be a material, chemical, energy, etc. |
|
Social Impact |
|
Storage is a container for three main elements: 1. |
|
A temporal scale for a model. |
|
Exports Resource through Link basically, moves Resources between Locations |
|
Unit of measure for a quantity provided as input to a component |
- class Currency(*locs: Location, label: str = '', citations: str = '', **kwargs)[source]#
Bases:
CommoditySame as Economic Impact (Eco)
- Parameters:
label (str, optional) – Label of the commodity, used for plotting. Defaults to None.
name (str, optional) – Name of the commodity, used for indexing. Defaults to None.
- Variables:
model (Model) – The model to which the component belongs.
name (str) – Set when the component is assigned as a Model attribute.
constraints (list[str]) – List of constraints associated with the component.
domains (list[Domain]) – List of domains associated with the component.
aspects (dict[Aspect, list[Domain]]) – Aspects associated with the component with domains.
conversions (list[Conversion]) – List of conversions associated with the commodity. Defaults to [].
insitu (bool, optional) – If the commodity only exists insitu, i.e., does not scale any domains
- exchange: dict[Self, float]#
- property I#
gana index set (I)
- property balance: dict[Conversion | Self, int | float]#
Conversion
- property cons: list[C]#
Constraints
- get(k[, d]) D[k] if k in D, else d. d defaults to None.#
- items() a set-like object providing a view on D's items#
- keys() a set-like object providing a view on D's keys#
- property program: Prg#
Mathematical program
- show(descriptive=False, category: str = '')#
Pretty print the component
- values() an object providing a view on D's values#
- conversions: list[Conversion]#
- name: str#
- constraints: set[str]#
- class Emission(basis: Unit | None = None, label: str = '', citations: str = '', **kwargs)[source]#
Bases:
Commodity- Parameters:
label (str, optional) – Label of the commodity, used for plotting. Defaults to None.
name (str, optional) – Name of the commodity, used for indexing. Defaults to None.
basis (Unit, optional) – Unit basis of the commodity. Defaults to None.
- Variables:
model (Model) – The model to which the component belongs.
name (str) – Set when the component is assigned as a Model attribute.
constraints (list[str]) – List of constraints associated with the component.
domains (list[Domain]) – List of domains associated with the component.
aspects (dict[Aspect, list[Domain]]) – Aspects associated with the component with domains.
conversions (list[Conversion]) – List of conversions associated with the commodity. Defaults to [].
insitu (bool, optional) – If the commodity only exists insitu, i.e., does not scale any domains
- property I#
gana index set (I)
- property balance: dict[Conversion | Self, int | float]#
Conversion
- property cons: list[C]#
Constraints
- get(k[, d]) D[k] if k in D, else d. d defaults to None.#
- items() a set-like object providing a view on D's items#
- keys() a set-like object providing a view on D's keys#
- property program: Prg#
Mathematical program
- show(descriptive=False, category: str = '')#
Pretty print the component
- values() an object providing a view on D's values#
- class Land(basis: Unit | None = None, label: str = '', citations: str = '', **kwargs)[source]#
Bases:
CommodityLand used by Operations
- Parameters:
label (str, optional) – Label of the commodity, used for plotting. Defaults to None.
name (str, optional) – Name of the commodity, used for indexing. Defaults to None.
basis (Unit, optional) – Unit basis of the commodity. Defaults to None.
- Variables:
model (Model) – The model to which the component belongs.
name (str) – Set when the component is assigned as a Model attribute.
constraints (list[str]) – List of constraints associated with the component.
domains (list[Domain]) – List of domains associated with the component.
aspects (dict[Aspect, list[Domain]]) – Aspects associated with the component with domains.
conversions (list[Conversion]) – List of conversions associated with the commodity. Defaults to [].
insitu (bool, optional) – If the commodity only exists insitu, i.e., does not scale any domains
- property I#
gana index set (I)
- property balance: dict[Conversion | Self, int | float]#
Conversion
- property cons: list[C]#
Constraints
- get(k[, d]) D[k] if k in D, else d. d defaults to None.#
- items() a set-like object providing a view on D's items#
- keys() a set-like object providing a view on D's keys#
- property program: Prg#
Mathematical program
- show(descriptive=False, category: str = '')#
Pretty print the component
- values() an object providing a view on D's values#
- class Material(basis: Unit | None = None, label: str = '', citations: str = '', **kwargs)[source]#
Bases:
ResourceMaterials are Resources, that are used to set up Operations
- Parameters:
label (str, optional) – Label of the commodity, used for plotting. Defaults to None.
name (str, optional) – Name of the commodity, used for indexing. Defaults to None.
basis (Unit, optional) – Unit basis of the commodity. Defaults to None.
- Variables:
model (Model) – The model to which the component belongs.
name (str) – Set when the component is assigned as a Model attribute.
constraints (list[str]) – List of constraints associated with the component.
domains (list[Domain]) – List of domains associated with the component.
aspects (dict[Aspect, list[Domain]]) – Aspects associated with the component with domains.
conversions (list[Conversion]) – List of conversions associated with the commodity. Defaults to [].
insitu (bool, optional) – If the commodity only exists insitu, i.e., does not scale any domains
- property I#
gana index set (I)
- property balance: dict[Conversion | Self, int | float]#
Conversion
- property cons: list[C]#
Constraints
- get(k[, d]) D[k] if k in D, else d. d defaults to None.#
- items() a set-like object providing a view on D's items#
- keys() a set-like object providing a view on D's keys#
- property program: Prg#
Mathematical program
- show(descriptive=False, category: str = '')#
Pretty print the component
- values() an object providing a view on D's values#
- class Resource(basis: Unit | None = None, label: str = '', citations: str = '', **kwargs)[source]#
Bases:
CommodityA resource, can be a material, chemical, energy, etc.
- Parameters:
label (str, optional) – Label of the commodity, used for plotting. Defaults to None.
name (str, optional) – Name of the commodity, used for indexing. Defaults to None.
basis (Unit, optional) – Unit basis of the commodity. Defaults to None.
- Variables:
model (Model) – The model to which the component belongs.
name (str) – Set when the component is assigned as a Model attribute.
constraints (list[str]) – List of constraints associated with the component.
domains (list[Domain]) – List of domains associated with the component.
aspects (dict[Aspect, list[Domain]]) – Aspects associated with the component with domains.
conversions (list[Conversion]) – List of conversions associated with the commodity. Defaults to [].
insitu (bool, optional) – If the commodity only exists insitu, i.e., does not scale any domains
- property I#
gana index set (I)
- property balance: dict[Conversion | Self, int | float]#
Conversion
- property cons: list[C]#
Constraints
- get(k[, d]) D[k] if k in D, else d. d defaults to None.#
- items() a set-like object providing a view on D's items#
- keys() a set-like object providing a view on D's keys#
- property program: Prg#
Mathematical program
- show(descriptive=False, category: str = '')#
Pretty print the component
- values() an object providing a view on D's values#
- class Player(label: str = '', citations: str = '', **kwargs)[source]#
Bases:
_ComponentPlayer or Actor, the one taking the decisions based on information provided
Players own certain processes and be responsible for the streams and impact caused by their decisions pertaining to this
- Parameters:
label (str, optional) – An optional label for the component. Defaults to None.
citations (str | list[str] | dict[str, str | list[str]], optional) – An optional citation or description for the component. Defaults to None.
- Variables:
model (Model) – The model to which the component belongs.
name (str) – Set when the component is assigned as a Model attribute.
constraints (list[str]) – List of constraints associated with the component.
domains (list[Domain]) – List of domains associated with the component.
aspects (dict[Aspect, list[Domain]]) – Aspects associated with the component with domains.
- property I#
gana index set (I)
- property cons: list[C]#
Constraints
- property program: Prg#
Mathematical program
- show(descriptive=False, category: str = '')#
Pretty print the component
- class Economic(label: str = '', citations: str = '', **kwargs)[source]#
Bases:
IndicatorEconomic impact
- Parameters:
label (str, optional) – An optional label for the component. Defaults to None.
citations (str | list[str] | dict[str, str | list[str]], optional) – An optional citation or description for the component. Defaults to None.
- Variables:
model (Model) – The model to which the component belongs.
name (str) – Set when the component is assigned as a Model attribute.
constraints (list[str]) – List of constraints associated with the component.
domains (list[Domain]) – List of domains associated with the component.
aspects (dict[Aspect, list[Domain]]) – Aspects associated with the component with domains.
- property I#
gana index set (I)
- property cons: list[C]#
Constraints
- property program: Prg#
Mathematical program
- show(descriptive=False, category: str = '')#
Pretty print the component
- class Environ(label: str = '', citations: str = '', **kwargs)[source]#
Bases:
IndicatorEnvironmental Impact
- Parameters:
label (str, optional) – An optional label for the component. Defaults to None.
citations (str | list[str] | dict[str, str | list[str]], optional) – An optional citation or description for the component. Defaults to None.
- Variables:
model (Model) – The model to which the component belongs.
name (str) – Set when the component is assigned as a Model attribute.
constraints (list[str]) – List of constraints associated with the component.
domains (list[Domain]) – List of domains associated with the component.
aspects (dict[Aspect, list[Domain]]) – Aspects associated with the component with domains.
- property I#
gana index set (I)
- property cons: list[C]#
Constraints
- property program: Prg#
Mathematical program
- show(descriptive=False, category: str = '')#
Pretty print the component
- class Social(label: str = '', citations: str = '', **kwargs)[source]#
Bases:
IndicatorSocial Impact
- Parameters:
label (str, optional) – An optional label for the component. Defaults to None.
citations (str | list[str] | dict[str, str | list[str]], optional) – An optional citation or description for the component. Defaults to None.
- Variables:
model (Model) – The model to which the component belongs.
name (str) – Set when the component is assigned as a Model attribute.
constraints (list[str]) – List of constraints associated with the component.
domains (list[Domain]) – List of domains associated with the component.
aspects (dict[Aspect, list[Domain]]) – Aspects associated with the component with domains.
- property I#
gana index set (I)
- property cons: list[C]#
Constraints
- property program: Prg#
Mathematical program
- show(descriptive=False, category: str = '')#
Pretty print the component
- class Unit(basis: Self | None = None, times: int | float | None = None, label: str = '')[source]#
Bases:
_NameUnit of measure for a quantity provided as input to a component
- Parameters:
label (str, optional) – Label of the component, used for plotting. Defaults to None.
basis (Unit, optional) – Basis of the unit, if defined based on another Unit. Defaults to None.
times (int | float, optional) – How many times the basis is contained in the unit. Defaults to None.
- Variables:
name (str) – Name of the object. Defaults to ‘’.
- class Process(*args, label: str = '', citations: str = '', **kwargs)[source]#
Bases:
OperationProcess converts one Resource to another Resource at some Location
- Parameters:
label (str, optional) – An optional label for the component. Defaults to None.
citations (str | list[str] | dict[str, str | list[str]], optional) – An optional citation or description for the component. Defaults to None.
- Variables:
model (Model) – The model to which the component belongs.
name (str) – Set when the component is assigned as a Model attribute.
constraints (list[str]) – List of constraints associated with the component.
domains (list[Domain]) – List of domains associated with the component.
aspects (dict[Aspect, list[Domain]]) – Aspects associated with the component with domains.
conversion (Conversion, optional) – Operational conversion associated with the operation. Defaults to None.
_conv (bool) – True if the operational conversion has been set. Defaults to False.
fab (Conversion, optional) – Material conversion associated with the operation. Defaults to None.
_fab_balanced (bool) – True if the material conversion has been balanced. Defaults to False.
locations (list[Location]) – Locations at which the process is balanced. Defaults to [].
charges (Storage, optional) – If the Process is Storage charging. Defaults to None.
discharges (Storage, optional) – If the Process is Storage discharging. Defaults to None.
- property production#
Alias for primary_conversion
- property I#
gana index set (I)
- property cons: list[C]#
Constraints
- property program: Prg#
Mathematical program
- show(descriptive=False, category: str = '')#
Pretty print the component
- class Storage(*args, label: str = '', citations: str = '', **kwargs)[source]#
Bases:
_ComponentStorage is a container for three main elements: 1. A Stored resource 2. A charge Process that puts the resource into storage 3. A discharge Process that withdraws the resource from storage
- Parameters:
basis (Unit, optional) – Unit basis of the component. Defaults to None.
label (str, optional) – An optional label for the component. Defaults to None.
citations (str | list[str] | dict[str, str | list[str]], optional) – An optional citation or description for the component. Defaults to None.
store (Resource, optional) – The resource to be stored. Defaults to None.
- Variables:
model (Model) – The model to which the component belongs.
name (str) – Set when the component is assigned as a Model attribute.
constraints (list[str]) – List of constraints associated with the component.
domains (list[Domain]) – List of domains associated with the component.
aspects (dict[Aspect, list[Domain]]) – Aspects associated with the component with domains.
stored (Stored, optional) – The resource being stored. Defaults to None.
conversion (Conversion, optional) – Operational conversion associated with the storage. Defaults to None.
_conv (bool) – True if the operational conversion has been set. Defaults to False.
charge (Process) – The charge process associated with the storage.
discharge (Process) – The discharge process associated with the storage.
locations (list[Location]) – List of locations where the storage is located. Defaults to [].
- property space_times: list[tuple[Location, Periods]][source]#
List of location, time tuples where storage is located
- property cons: list[C]#
Constraints
- write_construction(space_times: list[tuple[Location, Periods]])[source]#
write fabrication constraints for the operation
- property I#
gana index set (I)
- property program: Prg#
Mathematical program
- show(descriptive=False, category: str = '')#
Pretty print the component
- class Transport(*args, label: str = '', citations: str = '', **kwargs)[source]#
Bases:
OperationExports Resource through Link basically, moves Resources between Locations
- Parameters:
basis (Unit, optional) – Unit basis of the component. Defaults to None.
label (str, optional) – An optional label for the component. Defaults to None.
citations (str | list[str] | dict[str, str | list[str]], optional) – An optional citation or description for the component. Defaults to None.
- Variables:
model (Model) – The model to which the component belongs.
name (str) – Set when the component is assigned as a Model attribute.
constraints (list[str]) – List of constraints associated with the component.
domains (list[Domain]) – List of domains associated with the component.
aspects (dict[Aspect, list[Domain]]) – Aspects associated with the component with domains.
conversion (Conversion, optional) – Operational conversion associated with the operation. Defaults to None.
_conv (bool) – True if the operational conversion has been set. Defaults to False.
fab (Conversion, optional) – Material conversion associated with the operation. Defaults to None.
_fab_balanced (bool) – True if the material conversion has been balanced. Defaults to False.
linkages (list[Linkage]) – List of Linkages where the transport is located. Defaults to [].
- property transportation#
Alias for primary_conversion
- property I#
gana index set (I)
- property cons: list[C]#
Constraints
- property program: Prg#
Mathematical program
- show(descriptive=False, category: str = '')#
Pretty print the component
- class Location(*has: Self, label: str = '', citations: str = '')[source]#
Bases:
_XA discretization of Space. A location can be inclusive of other locations
- Parameters:
has (tuple[IsLocation]) – Locations contained in this Location.
label (str, optional) – Label of the Location. Defaults to None.
- Variables:
model (Model) – Model to which the Location belongs.
name (str) – Name of the Location. Set when the Location is assigned as a Model attribute.
constraints (list[str]) – List of constraints associated with the Location.
domains (list[Domain]) – List of domains associated with the Location.
aspects (dict[Aspect, list[Domain]]) – Aspects associated with the Location with domains.
isin (IsLocation, optional) – Location in which this Location is contained. Defaults to None.
currency (Currency, optional) – Currency used in the Location. Defaults to None.
alsohas (tuple[IsLocation]) – Locations contained in this Location, but not directly. Defaults to ()
hierarchy (int, optional) – Level of hierarchy of the Location. Defaults to None.
- property tree: dict[Self, dict]#
Prints the tree of Locations
- property parent: Self | None#
Finds the parent Location
- property depth#
Finds the depth of the Location
- property network: Self#
Network to which the Location belongs
- property isnetwork: bool#
Is this the network of the model?
- links(location, show: bool = True) list[Linkage][source]#
Finds the links between two Locations
- Parameters:
location (IsLocation) – Location to find links with
show (bool, optional) – Whether the links are to be printed. Defaults to True.
- Returns:
Links between the Locations
- Return type:
list[Linkage]
- connected(location, show: bool = False) bool[source]#
Finds whether the Locations are connected
- Parameters:
location (IsLocation) – Location to verify Links with
show (bool, optional) – Whether to print the Links. Defaults to False.
- Returns:
True if Locations are connected
- Return type:
bool
- property cons: list[C]#
Constraints
- property program: Prg#
Mathematical program
- show(descriptive=False, category: str = '')#
Pretty print the component
- class Linkage(source: Location, sink: Location, dist: float | None = None, bi: bool = False, auto: bool = False, label: str = '', citations: str = '')[source]#
Bases:
_XLinkage 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:
- property isnetwork: bool#
Is this the network of the model? Linkage can never be the network
- property cons: list[C]#
Constraints
- property program: Prg#
Mathematical program
- show(descriptive=False, category: str = '')#
Pretty print the component
- class Periods(size: int | float = 1, of: Self | None = None, n: int | None = None, label: str = '', citations: str = '')[source]#
Bases:
_XA discretization of Time.
- Parameters:
- Variables:
model (Model) – Model to which the Periods belongs.
time (Time) – Time to which the Periods belongs.
horizon (Periods) – Horizon of the Time.
I (I) – Index set of the Periods.
constraints (list[str]) – List of constraints associated with the Periods. Defaults to [].
domains (list[Domain]) – List of domains associated with the Periods. Defaults to [].
aspects (dict[Aspect, list[Domain]]) – Aspects associated with the Periods.
- property tree: dict[Self, dict]#
Tree representation of the Periods
- property cons: list[C]#
Constraints
- property horizon: Self#
Time Horizon
- property true_size: float#
True size of the Periods
- property program: Prg#
Mathematical program
- show(descriptive=False, category: str = '')#
Pretty print the component
- class TemporalScales(discretizations: list[int], names: list[str] | None = None)[source]#
Bases:
objectA temporal scale for a model.
- Parameters:
discretizations (list[int]) – List of discretizations for the temporal scale.
names (list[str], optional) – Names of the discretizations. Defaults to [t<i>] for each discretization.
Modules
energiapy.commodities module |
|
energiapy.game init file |
|
energia.operation init file |
|
energia.spatial init file |
|
energia.temporal init file |