zen-garden 2.8.5__py3-none-any.whl → 2.8.10__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.
- zen_garden/postprocess/results/solution_loader.py +2 -0
- zen_garden/utils.py +4 -3
- {zen_garden-2.8.5.dist-info → zen_garden-2.8.10.dist-info}/METADATA +3 -1
- {zen_garden-2.8.5.dist-info → zen_garden-2.8.10.dist-info}/RECORD +7 -7
- {zen_garden-2.8.5.dist-info → zen_garden-2.8.10.dist-info}/WHEEL +0 -0
- {zen_garden-2.8.5.dist-info → zen_garden-2.8.10.dist-info}/entry_points.txt +0 -0
- {zen_garden-2.8.5.dist-info → zen_garden-2.8.10.dist-info}/licenses/LICENSE.txt +0 -0
|
@@ -353,6 +353,8 @@ class SolutionLoader():
|
|
|
353
353
|
next_year = year + 1
|
|
354
354
|
decision_horizon = tuple(range(year, next_year))
|
|
355
355
|
current_mf = pd_dict[year]
|
|
356
|
+
if current_mf.empty:
|
|
357
|
+
return pd.Series(dtype=float)
|
|
356
358
|
if component.timestep_type is TimestepType.yearly:
|
|
357
359
|
year_series = current_mf[
|
|
358
360
|
current_mf.index.get_level_values("year").isin(decision_horizon)
|
zen_garden/utils.py
CHANGED
|
@@ -21,6 +21,7 @@ import requests
|
|
|
21
21
|
from importlib.metadata import metadata
|
|
22
22
|
import zipfile
|
|
23
23
|
import io
|
|
24
|
+
import pandas as pd
|
|
24
25
|
|
|
25
26
|
def setup_logger(level=logging.INFO):
|
|
26
27
|
""" set up logger
|
|
@@ -350,10 +351,10 @@ def slice_df_by_index(df,index_tuple) -> dict:
|
|
|
350
351
|
if key in df.index.names:
|
|
351
352
|
if isinstance(index[key], list):
|
|
352
353
|
df = df.loc[df.index.get_level_values(key).isin(index[key])]
|
|
353
|
-
|
|
354
|
-
if index[key] not in df.index.get_level_values(key):
|
|
355
|
-
df = pd.DataFrame(columns=df.columns) # return empty dataframe if value not in index
|
|
354
|
+
elif index[key] in df.index.get_level_values(key):
|
|
356
355
|
df = df.xs(index[key], level=key, drop_level=False)
|
|
356
|
+
else:
|
|
357
|
+
df = pd.DataFrame(columns=df.columns) # return empty dataframe if value not in index
|
|
357
358
|
return df
|
|
358
359
|
|
|
359
360
|
def get_label_position(obj,label:int):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: zen_garden
|
|
3
|
-
Version: 2.8.
|
|
3
|
+
Version: 2.8.10
|
|
4
4
|
Summary: ZEN-garden is an optimization model of energy systems and value chains.
|
|
5
5
|
Author: Alissa Ganter, Johannes Burger, Francesco De Marco, Lukas Kunz, Lukas Schmidt-Engelbertz, Christoph Funke, Paolo Gabrielli, Giovanni Sansavini
|
|
6
6
|
Author-email: Jacob Mannhardt <zen-garden@ethz.ch>
|
|
@@ -62,6 +62,8 @@ Provides-Extra: vis
|
|
|
62
62
|
|
|
63
63
|
<img src="https://github.com/ZEN-universe/ZEN-garden/assets/114185605/d6a9aca9-74b0-4a82-8295-43e6a78b8450" alt="drawing" width="200"/>
|
|
64
64
|
|
|
65
|
+
|
|
66
|
+
|
|
65
67
|
Welcome to the ZEN-garden! ZEN-garden is an optimization framework for energy transition pathways.
|
|
66
68
|
It is currently used to model the electricity system, hydrogen value chains, and carbon capture, storage and utilization (CCUS) value chains.
|
|
67
69
|
However, it is designed to be modular and flexible, and can be extended to model other types of energy systems, value chains or other network-based systems.
|
|
@@ -3,7 +3,7 @@ zen_garden/__main__.py,sha256=Zrz6zr81gXN3_NLPwWz3a-8HiiRgqGx_OzQHarBcxtQ,2508
|
|
|
3
3
|
zen_garden/default_config.py,sha256=ozz2LBSGSaMH8alEAzh-6ziM9IE9zXM9PfRD3nulAIs,8663
|
|
4
4
|
zen_garden/optimization_setup.py,sha256=Rv_IciR_Y9GF-OaPDDAvTQ2huTuAt94jrWpcDJCQgWQ,42176
|
|
5
5
|
zen_garden/runner.py,sha256=gLjHh3DZbgUAiz5lsnDiSwAZT5RFw52-Pnr1K_nPaMM,7207
|
|
6
|
-
zen_garden/utils.py,sha256=
|
|
6
|
+
zen_garden/utils.py,sha256=GFR-LBIkMA7pDQ46J07mr0ujqyIfNPlI0UVnvBDfHRw,60529
|
|
7
7
|
zen_garden/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
8
|
zen_garden/cli/zen_example_cli.py,sha256=hCYlAxM5BdphMzXA5LyHmTN3UiYIhMlG7G9sxYi0G_s,1411
|
|
9
9
|
zen_garden/cli/zen_garden_cli.py,sha256=ikiJZoIP4_D-eoNuo4m2f2Z4ydU0sHLDUpCEWn93nnU,6505
|
|
@@ -28,14 +28,14 @@ zen_garden/postprocess/postprocess.py,sha256=0_1iy028iZmvf2egXUFO2ZS13HmkacMt7A5
|
|
|
28
28
|
zen_garden/postprocess/results/__init__.py,sha256=363lzC0uRJ5F42cOEhD9jxMPCioTt8WRt0qwZG0IizY,49
|
|
29
29
|
zen_garden/postprocess/results/cache.py,sha256=t-1P7k9EVkSxR1oB1NIodux3JbfhBhxxwgRytcQ8vjQ,1592
|
|
30
30
|
zen_garden/postprocess/results/results.py,sha256=S21h0Unf4l3a8WD0UFvn8IeMgDxKitZRaiX7iLvJnL0,41012
|
|
31
|
-
zen_garden/postprocess/results/solution_loader.py,sha256=
|
|
31
|
+
zen_garden/postprocess/results/solution_loader.py,sha256=YmGqu4lbbxUv-qTO3Uxq1yxpiHHYCEi5lFfcnuHfI3w,31506
|
|
32
32
|
zen_garden/preprocess/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
33
33
|
zen_garden/preprocess/extract_input_data.py,sha256=PWKdel7s488SELseyAaoFkwXpzJU4MZg0pW0wO2ZHoI,51523
|
|
34
34
|
zen_garden/preprocess/parameter_change_log.py,sha256=WNhLYTyuaFkUl_e4QH36W1chpqg00m7zg__PawPogAY,387
|
|
35
35
|
zen_garden/preprocess/time_series_aggregation.py,sha256=v8xRRk4I9WZ2yi7V3I_Ersj2RV1T2WIKslx8ohkMfWI,32112
|
|
36
36
|
zen_garden/preprocess/unit_handling.py,sha256=y78oxoPVqcA3y9aEiyr0MU5zITf2BPNGVKOfyMhhCvY,63040
|
|
37
|
-
zen_garden-2.8.
|
|
38
|
-
zen_garden-2.8.
|
|
39
|
-
zen_garden-2.8.
|
|
40
|
-
zen_garden-2.8.
|
|
41
|
-
zen_garden-2.8.
|
|
37
|
+
zen_garden-2.8.10.dist-info/entry_points.txt,sha256=FkXXB0MgvdZG_p_zPifgXc0G2GSPJi0NncG3hZ8TXkU,232
|
|
38
|
+
zen_garden-2.8.10.dist-info/licenses/LICENSE.txt,sha256=_kEtxPe9gWOwMzdiy8nLzgABiPdMvUS0kaSCOIrEA_E,1101
|
|
39
|
+
zen_garden-2.8.10.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
40
|
+
zen_garden-2.8.10.dist-info/METADATA,sha256=nhPpZDYsSDS6f0qeNS4nFo2hQZRcJBJInIUcAPDvcls,5651
|
|
41
|
+
zen_garden-2.8.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|