zen-garden 2.8.1__py3-none-any.whl → 2.8.3__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/__init__.py +2 -1
- zen_garden/__main__.py +2 -2
- zen_garden/cli/{zen_example.py → zen_example_cli.py} +1 -1
- zen_garden/cli/{zen_garden.py → zen_garden_cli.py} +3 -3
- zen_garden/cli/{zen_visualization.py → zen_visualization_cli.py} +1 -1
- zen_garden/utils.py +2 -0
- {zen_garden-2.8.1.dist-info → zen_garden-2.8.3.dist-info}/METADATA +1 -1
- {zen_garden-2.8.1.dist-info → zen_garden-2.8.3.dist-info}/RECORD +11 -11
- zen_garden-2.8.3.dist-info/entry_points.txt +5 -0
- zen_garden-2.8.1.dist-info/entry_points.txt +0 -5
- {zen_garden-2.8.1.dist-info → zen_garden-2.8.3.dist-info}/WHEEL +0 -0
- {zen_garden-2.8.1.dist-info → zen_garden-2.8.3.dist-info}/licenses/LICENSE.txt +0 -0
zen_garden/__init__.py
CHANGED
|
@@ -7,8 +7,9 @@ from .optimization_setup import OptimizationSetup
|
|
|
7
7
|
from .runner import run
|
|
8
8
|
from .postprocess.results.results import Results
|
|
9
9
|
from .utils import download_example_dataset
|
|
10
|
+
from .postprocess.comparisons import compare_model_values, compare_configs, compare_dicts
|
|
10
11
|
|
|
11
|
-
__all__ = ["run", "Results", "download_example_dataset"]
|
|
12
|
+
__all__ = ["run", "Results", "download_example_dataset", "compare_model_value", "compare_configs", "compare_dicts"]
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
# set the element classes of the EnergySystem class
|
zen_garden/__main__.py
CHANGED
|
@@ -3,7 +3,7 @@ Runs the main function of ZEN-Garden.
|
|
|
3
3
|
Compilation of the optimization problem.
|
|
4
4
|
"""
|
|
5
5
|
from .runner import run
|
|
6
|
-
from .cli.
|
|
6
|
+
from .cli.zen_garden_cli import create_zen_garden_cli
|
|
7
7
|
import warnings
|
|
8
8
|
|
|
9
9
|
def run_module(config = "./config.py", dataset = None,
|
|
@@ -68,4 +68,4 @@ def run_module(config = "./config.py", dataset = None,
|
|
|
68
68
|
|
|
69
69
|
if __name__ == "__main__":
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
create_zen_garden_cli()
|
|
@@ -39,8 +39,8 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
39
39
|
Returns:
|
|
40
40
|
argparse.ArgumentParser: An argument parser configured for the
|
|
41
41
|
ZEN-Garden command-line interface.
|
|
42
|
-
"""
|
|
43
42
|
|
|
43
|
+
"""
|
|
44
44
|
description = (
|
|
45
45
|
"Run ZEN-Garden with a given config file. By default, the config file "
|
|
46
46
|
"is read from the current working directory. You may specify a config "
|
|
@@ -103,8 +103,8 @@ def resolve_job_index(job_index:str, job_index_var:str) -> list[int]:
|
|
|
103
103
|
Returns:
|
|
104
104
|
list[int] | None: List of job indices to run in the current instance of
|
|
105
105
|
ZEN-garden, or ``None`` if no job index is specified.
|
|
106
|
-
"""
|
|
107
106
|
|
|
107
|
+
"""
|
|
108
108
|
if job_index:
|
|
109
109
|
return [int(i) for i in job_index.split(",")]
|
|
110
110
|
elif ((env_value := os.environ.get(job_index_var)) is not None):
|
|
@@ -112,7 +112,7 @@ def resolve_job_index(job_index:str, job_index_var:str) -> list[int]:
|
|
|
112
112
|
else:
|
|
113
113
|
return None
|
|
114
114
|
|
|
115
|
-
def
|
|
115
|
+
def create_zen_garden_cli():
|
|
116
116
|
"""
|
|
117
117
|
Entry point for the `zen-garden` command-line interface.
|
|
118
118
|
|
zen_garden/utils.py
CHANGED
|
@@ -351,6 +351,8 @@ def slice_df_by_index(df,index_tuple) -> dict:
|
|
|
351
351
|
if isinstance(index[key], list):
|
|
352
352
|
df = df.loc[df.index.get_level_values(key).isin(index[key])]
|
|
353
353
|
else:
|
|
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
356
|
df = df.xs(index[key], level=key, drop_level=False)
|
|
355
357
|
return df
|
|
356
358
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: zen_garden
|
|
3
|
-
Version: 2.8.
|
|
3
|
+
Version: 2.8.3
|
|
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>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
zen_garden/__init__.py,sha256=
|
|
2
|
-
zen_garden/__main__.py,sha256=
|
|
1
|
+
zen_garden/__init__.py,sha256=WBclzn3dV9EIAu5idZiGHaEj8SQGr_q2IaUz9qPrQSw,700
|
|
2
|
+
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=IA52GLccjTbx8pQekc9pAdQD-CO90kfGzkhLBqDcJNs,60519
|
|
7
7
|
zen_garden/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
-
zen_garden/cli/
|
|
9
|
-
zen_garden/cli/
|
|
10
|
-
zen_garden/cli/
|
|
8
|
+
zen_garden/cli/zen_example_cli.py,sha256=hCYlAxM5BdphMzXA5LyHmTN3UiYIhMlG7G9sxYi0G_s,1411
|
|
9
|
+
zen_garden/cli/zen_garden_cli.py,sha256=ikiJZoIP4_D-eoNuo4m2f2Z4ydU0sHLDUpCEWn93nnU,6505
|
|
10
|
+
zen_garden/cli/zen_visualization_cli.py,sha256=vSK2jbe6rNguXwLDMpU3-boreRtjjuDncCkZDCy7CSA,760
|
|
11
11
|
zen_garden/model/__init__.py,sha256=7QIygxkUlNsOBbJPr5VdAxcJQCz6t_FSlD1uytUhuDE,48
|
|
12
12
|
zen_garden/model/component.py,sha256=NeMV47l6Ec_ij_jburCx4cz6lI5k1-b6t0_DfuWFhhY,40488
|
|
13
13
|
zen_garden/model/element.py,sha256=VoKM3qwnuysNx78vx-vuAIQl9lgQEr2f5bcXfVCShMs,21574
|
|
@@ -33,8 +33,8 @@ zen_garden/preprocess/extract_input_data.py,sha256=PWKdel7s488SELseyAaoFkwXpzJU4
|
|
|
33
33
|
zen_garden/preprocess/parameter_change_log.py,sha256=WNhLYTyuaFkUl_e4QH36W1chpqg00m7zg__PawPogAY,387
|
|
34
34
|
zen_garden/preprocess/time_series_aggregation.py,sha256=v8xRRk4I9WZ2yi7V3I_Ersj2RV1T2WIKslx8ohkMfWI,32112
|
|
35
35
|
zen_garden/preprocess/unit_handling.py,sha256=y78oxoPVqcA3y9aEiyr0MU5zITf2BPNGVKOfyMhhCvY,63040
|
|
36
|
-
zen_garden-2.8.
|
|
37
|
-
zen_garden-2.8.
|
|
38
|
-
zen_garden-2.8.
|
|
39
|
-
zen_garden-2.8.
|
|
40
|
-
zen_garden-2.8.
|
|
36
|
+
zen_garden-2.8.3.dist-info/entry_points.txt,sha256=FkXXB0MgvdZG_p_zPifgXc0G2GSPJi0NncG3hZ8TXkU,232
|
|
37
|
+
zen_garden-2.8.3.dist-info/licenses/LICENSE.txt,sha256=_kEtxPe9gWOwMzdiy8nLzgABiPdMvUS0kaSCOIrEA_E,1101
|
|
38
|
+
zen_garden-2.8.3.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
39
|
+
zen_garden-2.8.3.dist-info/METADATA,sha256=TcnGCmbml2108unb-EwfsGX0ToywSNt7VVbXMwO1GZ0,5648
|
|
40
|
+
zen_garden-2.8.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|