mosaik-emissions 0.1.0__py3-none-any.whl → 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +0,0 @@
1
- Authors
2
- =======
3
-
4
- The adapter was initially developed by Danila Valko.
@@ -1,162 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: mosaik-emissions
3
- Version: 0.1.0
4
- Summary: Emissions simulator for Mosaik
5
- License: LICENSE
6
- Author: Danila Valko
7
- Author-email: mosaik@offis.de
8
- Requires-Python: >=3.9,<4.0
9
- Classifier: License :: Other/Proprietary License
10
- Classifier: Programming Language :: Python :: 3
11
- Classifier: Programming Language :: Python :: 3.9
12
- Classifier: Programming Language :: Python :: 3.10
13
- Classifier: Programming Language :: Python :: 3.11
14
- Classifier: Programming Language :: Python :: 3.12
15
- Requires-Dist: arrow (>=1.3.0,<2.0.0)
16
- Requires-Dist: mosaik (>=3.2.0,<4.0.0)
17
- Requires-Dist: mosaik-api-v3 (>=3.0.7,<4.0.0)
18
- Requires-Dist: numpy (>=1.26.1,<2.0.0)
19
- Requires-Dist: pandas (>=2.1.2,<3.0.0)
20
- Requires-Dist: tqdm (>=4.66.1,<5.0.0)
21
- Description-Content-Type: text/markdown
22
-
23
- This is a simulator that implements CO₂ emissions calculation for certain [mosaik] scenario and [pandapower] network configuration.
24
-
25
- This simulator is still work in progress. In particular, not every desirable attribute is implemented yet. If you have need for a particular attribute, leave an [issue here].
26
-
27
- [pandapower]: https://www.pandapower.org
28
- [mosaik]: https://mosaik.offis.de
29
- [issue here]: https://gitlab.com/mosaik/components/energy/mosaik-emissions/-/issues
30
-
31
- ## Methodology
32
-
33
- CO₂ emissions are dynamically aggregated based on predefined pandapower network characteristics.
34
-
35
- To obtain the emission factor for a particular fuel, we refer to [2006 IPCC](https://www.ipcc-nggip.iges.or.jp/public/2006gl/) and in particular to the chapter [Stationary Combustion](https://www.ipcc-nggip.iges.or.jp/public/2006gl/pdf/2_Volume2/V2_2_Ch2_Stationary_Combustion.pdf).
36
-
37
- To obtain the carbon intensity depending on a country's energy mix, we refer to [OurWorldInData](https://ourworldindata.org/grapher/carbon-intensity-electricity?tab=table), which aggregates data from Ember's European Electricity Review and the Energy Institute's Statistical Review of World Energy.
38
-
39
- For Germany, the state can be specified, in which case historical carbon intensity estimates from [co2map.de](https://co2map.de/) will be used.
40
-
41
- ### Units
42
-
43
- * Power produced - [MW]
44
- * Default emission factor - [tones CO₂eq. / MWh]
45
- * Carbon intensity of the electricity - [tones CO₂eq. / MWh]
46
- * Carbon emissions - [tones CO₂eq.]
47
-
48
- ## Installation and usage
49
-
50
- ```
51
- pip install mosaik-emissions
52
- ```
53
-
54
- If you don't want to install this through PyPI, you can use pip to install the requirements.txt file:
55
- ```
56
- pip install -r requirements.txt # To use this, you have to install at least version 3.2.0 of mosaik.
57
- ```
58
-
59
- The simulator uses `P[MW]` as an input and `E[tCO2eq]` as an output attribute.
60
- For each connected *generator* or *external grid*, one of the parameters must be defined: the emission factor, the fuel used, the country, and the state, see *the configuration* section bellow. You can also use the *method* option, which is callable, directly transforms input data to output, and takes precedence over other options. Thus, each emissions model can be configured while creation by using `model_params`:
61
-
62
- * method - callable that directly transforms input data to output
63
- * co2_emission_factor - float number that directly represents conversion factor [tones CO₂eq. / MWh]
64
- * fuel - string that matches with a certain type of fuel used to produce electricity
65
- * state - string that matches with a certain state of the country to filter the carbon intensity database out, it shuld be defined along with the country
66
- * country - string that matches with a country to filter the carbon intensity database out
67
- * coefficient - float number that multiplies emissions output, default is 1.0
68
-
69
- ```
70
- emission_config = {
71
- 'co2_emission_factor' : 0.385,
72
- 'fuel' : 'Natural Gas Liquids',
73
- 'country' : 'Germany',
74
- 'state' : 'SN', # it shuld be defined along with the country if so
75
- 'coefficient' : 2.0 # multiplies total emissions output
76
- }
77
-
78
- em = em_sim.Emission.create(1, **emission_config)
79
- ```
80
-
81
- **Note**: the model applies the first option defined according to the order described, e.g. if `co2_emission_factor` is defined, it does not check `fuel` or `country`.
82
-
83
- Specify simulators configurations within your scenario script:
84
- ```
85
- sim_config = {
86
- 'Grid': {
87
- 'python': 'mosaik_components.pandapower:Simulator'
88
- },
89
- 'Emissions': {
90
- 'python': 'mosaik_components.emissions:Simulator'
91
- },
92
- ...
93
- }
94
- ```
95
-
96
- Initialize the pandapower grid and emissions simulator:
97
- ```
98
- gridsim = world.start('Grid', step_size=STEP_SIZE)
99
- em_sim = world.start('Emissions')
100
- ```
101
-
102
- Instantiate model entities:
103
- ```
104
- grid = gridsim.Grid(json=GRID_FILE)
105
- em = em_sim.Emission.create(1, **emission_config)
106
- ```
107
-
108
- Connect and run:
109
- ```
110
- gens = [e for e in grid.children if e.type in ['Gen', 'ControlledGen']]
111
- world.connect(gens[0], em[0], 'P[MW]')
112
- world.run(until=END)
113
- ```
114
-
115
- You can see the demo scenario in the `demo` folder.
116
-
117
- ## Possible configuration
118
-
119
- To relate to an emission factor derived from the country's energy mix, the full name of the country should be provided (see [OurWorldInData](https://ourworldindata.org/grapher/carbon-intensity-electricity?tab=table)), e.g.:
120
- - Germany
121
- - Greece
122
- - Iceland
123
- - ...
124
-
125
- For Germany certain states are available (see [co2map.de](https://co2map.de/)): DE (country average), BB, BW, BY, HE, MV, NI, NW, RP, SH, SL, SN, ST, TH
126
-
127
- To relate to certain fuel type, the fuel name should be provided (see [Stationary Combustion](https://gitlab.com/mosaik/components/energy/mosaik-emissions/-/blob/main/misc/fuel_combustion.pdf?ref_type=heads), Table 2.2):
128
- - Crude Oil
129
- - Natural Gas Liquids
130
- - Natural Gas
131
- - Charcoal
132
- - Gas/Diesel Oil
133
- - Ethane
134
- - ...
135
-
136
- ## Developer notes
137
-
138
- Note that emission factor and carbon intensity of electricity values for specific fuels and countries are stored in `data/data.csv` with the units specified in the source and are converted internally once been called.
139
-
140
- Raw data files and `data.csv` preparation notebook can be found in the `misc` folder.
141
-
142
- ## Sources and References
143
-
144
- * Ember - Yearly Electricity Data (2023); Ember - European Electricity Review (2022); Energy Institute - Statistical Review of World Energy (2023) – with major processing by Our World in Data. “Carbon intensity of electricity generation” [dataset]. Ember, “Yearly Electricity Data”; Ember, “European Electricity Review”; Energy Institute, “Statistical Review of World Energy” [original data]. Retrieved February 27, 2024 from https://ourworldindata.org/grapher/carbon-intensity-electricity
145
-
146
- * Hourly consumption-based CO2 emissions intensity in Germany / [co2map.de](https://co2map.de/), INATECH, University of Freiburg. Retrieved February 27, 2024 from https://api.co2map.de/docs
147
- Changelog
148
- =========
149
-
150
- 0.1.0 - 2024-04-08
151
- ------------------
152
-
153
- - Carbon intensity from co2map.de was added
154
- - Restructured as a mosaik component
155
- - Readme and examples are added
156
- - Initial release of version implemented by Danila Valko
157
-
158
- Authors
159
- =======
160
-
161
- The adapter was initially developed by Danila Valko.
162
-
@@ -1,8 +0,0 @@
1
- mosaik_components/emissions/__init__.py,sha256=675WeC6CdJbcGiK0XBInHn4-ewRW-uuIjpBnWGGv_jQ,94
2
- mosaik_components/emissions/data/data.csv,sha256=NgwjIVeP8W9RuPeueqPnxle-xbJPQAmEq_jQpVKqblw,26611502
3
- mosaik_components/emissions/emission_simulator.py,sha256=sVnoUG6ff88FHQ4Sb7bh6gBD0Gxt7HEefoofO0TXv2c,7306
4
- mosaik_emissions-0.1.0.dist-info/AUTHORS.txt,sha256=88P5koCAXcaB9XQ47Hg-lRLGfT7EOTIt4NhcKiYPQA8,70
5
- mosaik_emissions-0.1.0.dist-info/LICENSE,sha256=D5xGfjaZ9n4SzfIVDhPfM-2gkQYLfAHHCI60AFr3Cgk,1080
6
- mosaik_emissions-0.1.0.dist-info/METADATA,sha256=j5u16RDjYnWaZH8M-7MakAmE_B-yWFxB_Z-Zs0nWnaM,7034
7
- mosaik_emissions-0.1.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
8
- mosaik_emissions-0.1.0.dist-info/RECORD,,