tsam 2.3.5__tar.gz → 2.3.6__tar.gz

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.
Files changed (98) hide show
  1. {tsam-2.3.5 → tsam-2.3.6}/PKG-INFO +68 -18
  2. {tsam-2.3.5 → tsam-2.3.6}/README.md +31 -9
  3. tsam-2.3.6/pyproject.toml +53 -0
  4. {tsam-2.3.5 → tsam-2.3.6}/requirements.yml +1 -3
  5. {tsam-2.3.5 → tsam-2.3.6}/requirements_dev.txt +1 -2
  6. {tsam-2.3.5 → tsam-2.3.6/src}/tsam/utils/durationRepresentation.py +44 -28
  7. {tsam-2.3.5 → tsam-2.3.6/src}/tsam.egg-info/PKG-INFO +68 -18
  8. tsam-2.3.6/src/tsam.egg-info/SOURCES.txt +54 -0
  9. {tsam-2.3.5 → tsam-2.3.6/src}/tsam.egg-info/requires.txt +9 -0
  10. {tsam-2.3.5 → tsam-2.3.6}/test/test_durationRepresentation.py +7 -16
  11. {tsam-2.3.5 → tsam-2.3.6}/test/test_k_maxoids.py +3 -1
  12. {tsam-2.3.5 → tsam-2.3.6}/test/test_properties.py +17 -3
  13. {tsam-2.3.5 → tsam-2.3.6}/test/test_samemean.py +3 -5
  14. {tsam-2.3.5 → tsam-2.3.6}/test/test_subhourlyResolution.py +3 -3
  15. tsam-2.3.5/.github/workflows/daily_tests.yml +0 -48
  16. tsam-2.3.5/.github/workflows/test_on_push_and_pull.yml +0 -71
  17. tsam-2.3.5/.gitignore +0 -17
  18. tsam-2.3.5/.gitlab-ci.yml +0 -11
  19. tsam-2.3.5/.readthedocs.yml +0 -15
  20. tsam-2.3.5/Makefile +0 -27
  21. tsam-2.3.5/docs/Makefile +0 -25
  22. tsam-2.3.5/docs/make.bat +0 -36
  23. tsam-2.3.5/docs/source/_static/logo.png +0 -0
  24. tsam-2.3.5/docs/source/_static/tsam-logo.png +0 -0
  25. tsam-2.3.5/docs/source/conf.py +0 -197
  26. tsam-2.3.5/docs/source/durationRepresentationDoc.rst +0 -15
  27. tsam-2.3.5/docs/source/exactKmedoidsDoc.rst +0 -15
  28. tsam-2.3.5/docs/source/furtherReadingDoc.rst +0 -28
  29. tsam-2.3.5/docs/source/gettingStartedDoc.rst +0 -85
  30. tsam-2.3.5/docs/source/hypertunedaggregationDoc.rst +0 -20
  31. tsam-2.3.5/docs/source/index.rst +0 -44
  32. tsam-2.3.5/docs/source/installationDoc.rst +0 -38
  33. tsam-2.3.5/docs/source/integratedSoftwareDoc.rst +0 -20
  34. tsam-2.3.5/docs/source/kmaxoidsDoc.rst +0 -15
  35. tsam-2.3.5/docs/source/legalNoticeDoc.rst +0 -39
  36. tsam-2.3.5/docs/source/mathematicalBackgroundDoc.rst +0 -67
  37. tsam-2.3.5/docs/source/newsDoc.rst +0 -55
  38. tsam-2.3.5/docs/source/periodAggregationDoc.rst +0 -15
  39. tsam-2.3.5/docs/source/representationsDoc.rst +0 -15
  40. tsam-2.3.5/docs/source/segmentationDoc.rst +0 -15
  41. tsam-2.3.5/docs/source/structureOfTsamDoc.rst +0 -30
  42. tsam-2.3.5/docs/source/timeseriesaggregationDoc.rst +0 -21
  43. tsam-2.3.5/examples/aggregation_example.ipynb +0 -790
  44. tsam-2.3.5/examples/aggregation_method_showcase.ipynb +0 -281
  45. tsam-2.3.5/examples/aggregation_optiinput.ipynb +0 -480
  46. tsam-2.3.5/examples/aggregation_representation.ipynb +0 -1211
  47. tsam-2.3.5/examples/aggregation_segment_period_animation.ipynb +0 -868
  48. tsam-2.3.5/examples/aggregation_segment_period_building_timeseries.ipynb +0 -329
  49. tsam-2.3.5/examples/aggregation_segment_period_opti.ipynb +0 -249
  50. tsam-2.3.5/examples/aggregation_segmentation.ipynb +0 -1883
  51. tsam-2.3.5/examples/example_k_maxoids.ipynb +0 -674
  52. tsam-2.3.5/examples/get_clustercenter_indices.py +0 -24
  53. tsam-2.3.5/examples/predefined_sequence_example.ipynb +0 -1117
  54. tsam-2.3.5/requirements_dev.yml +0 -11
  55. tsam-2.3.5/setup.py +0 -37
  56. tsam-2.3.5/tsam.egg-info/SOURCES.txt +0 -94
  57. {tsam-2.3.5 → tsam-2.3.6}/LICENSE.txt +0 -0
  58. {tsam-2.3.5 → tsam-2.3.6}/MANIFEST.in +0 -0
  59. {tsam-2.3.5 → tsam-2.3.6}/examples/results/paretoOptimalAggregation.csv +0 -0
  60. {tsam-2.3.5 → tsam-2.3.6}/examples/results/preprocessed_wind.csv +0 -0
  61. {tsam-2.3.5 → tsam-2.3.6}/examples/results/testperiods_hierarchical.csv +0 -0
  62. {tsam-2.3.5 → tsam-2.3.6}/examples/results/testperiods_kmeans.csv +0 -0
  63. {tsam-2.3.5 → tsam-2.3.6}/examples/results/testperiods_kmedoids.csv +0 -0
  64. {tsam-2.3.5 → tsam-2.3.6}/examples/results/testperiods_predefClusterOrder.csv +0 -0
  65. {tsam-2.3.5 → tsam-2.3.6}/examples/results/testperiods_predefClusterOrderAndClusterCenters.csv +0 -0
  66. {tsam-2.3.5 → tsam-2.3.6}/examples/results/testperiods_segmentation.csv +0 -0
  67. {tsam-2.3.5 → tsam-2.3.6}/examples/testdata.csv +0 -0
  68. {tsam-2.3.5 → tsam-2.3.6}/requirements.txt +0 -0
  69. {tsam-2.3.5 → tsam-2.3.6}/setup.cfg +0 -0
  70. {tsam-2.3.5 → tsam-2.3.6/src}/tsam/__init__.py +0 -0
  71. {tsam-2.3.5 → tsam-2.3.6/src}/tsam/hyperparametertuning.py +0 -0
  72. {tsam-2.3.5 → tsam-2.3.6/src}/tsam/periodAggregation.py +0 -0
  73. {tsam-2.3.5 → tsam-2.3.6/src}/tsam/representations.py +0 -0
  74. {tsam-2.3.5 → tsam-2.3.6/src}/tsam/timeseriesaggregation.py +0 -0
  75. {tsam-2.3.5 → tsam-2.3.6/src}/tsam/utils/__init__.py +0 -0
  76. {tsam-2.3.5 → tsam-2.3.6/src}/tsam/utils/k_maxoids.py +0 -0
  77. {tsam-2.3.5 → tsam-2.3.6/src}/tsam/utils/k_medoids_contiguity.py +0 -0
  78. {tsam-2.3.5 → tsam-2.3.6/src}/tsam/utils/k_medoids_exact.py +0 -0
  79. {tsam-2.3.5 → tsam-2.3.6/src}/tsam/utils/segmentation.py +0 -0
  80. {tsam-2.3.5 → tsam-2.3.6/src}/tsam.egg-info/dependency_links.txt +0 -0
  81. {tsam-2.3.5 → tsam-2.3.6/src}/tsam.egg-info/top_level.txt +0 -0
  82. {tsam-2.3.5 → tsam-2.3.6}/test/test_accuracyIndicators.py +0 -0
  83. {tsam-2.3.5 → tsam-2.3.6}/test/test_adjacent_periods.py +0 -0
  84. {tsam-2.3.5 → tsam-2.3.6}/test/test_aggregate_hiearchical.py +0 -0
  85. {tsam-2.3.5 → tsam-2.3.6}/test/test_assert_raises.py +0 -0
  86. {tsam-2.3.5 → tsam-2.3.6}/test/test_averaging.py +0 -0
  87. {tsam-2.3.5 → tsam-2.3.6}/test/test_cluster_order.py +0 -0
  88. {tsam-2.3.5 → tsam-2.3.6}/test/test_durationCurve.py +0 -0
  89. {tsam-2.3.5 → tsam-2.3.6}/test/test_extremePeriods.py +0 -0
  90. {tsam-2.3.5 → tsam-2.3.6}/test/test_hierarchical.py +0 -0
  91. {tsam-2.3.5 → tsam-2.3.6}/test/test_hypertuneAggregation.py +0 -0
  92. {tsam-2.3.5 → tsam-2.3.6}/test/test_k_medoids.py +0 -0
  93. {tsam-2.3.5 → tsam-2.3.6}/test/test_k_medoids_contiguity.py +0 -0
  94. {tsam-2.3.5 → tsam-2.3.6}/test/test_minmaxRepresentation.py +0 -0
  95. {tsam-2.3.5 → tsam-2.3.6}/test/test_preprocess.py +0 -0
  96. {tsam-2.3.5 → tsam-2.3.6}/test/test_segmentation.py +0 -0
  97. {tsam-2.3.5 → tsam-2.3.6}/test/test_subhourly_periods.py +0 -0
  98. {tsam-2.3.5 → tsam-2.3.6}/test/test_weightingFactors.py +0 -0
@@ -1,10 +1,30 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tsam
3
- Version: 2.3.5
3
+ Version: 2.3.6
4
4
  Summary: Time series aggregation module (tsam) to create typical periods
5
- Home-page: https://github.com/FZJ-IEK3-VSA/tsam
6
- Author: Leander Kotzur, Maximilian Hoffmann
7
- Author-email: leander.kotzur@googlemail.com, maximilian.hoffmann@julumni.fz-juelich.de
5
+ Author-email: Leander Kotzur <leander.kotzur@googlemail.com>, Maximilian Hoffmann <maximilian.hoffmann@julumni.fz-juelich.de>
6
+ Maintainer-email: Julian Belina <j.belina@fz-juelich.de>
7
+ License: MIT License
8
+
9
+ Copyright (c) 2017 Leander Kotzur (FZJ IEK-3), Maximilian Hoffmann (FZJ IEK-3), Peter Markewitz (FZJ IEK-3), Martin Robinius (FZJ IEK-3), Detlef Stolten (FZJ IEK-3)
10
+
11
+ Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ of this software and associated documentation files (the "Software"), to deal
13
+ in the Software without restriction, including without limitation the rights
14
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ copies of the Software, and to permit persons to whom the Software is
16
+ furnished to do so, subject to the following conditions:
17
+
18
+ The above copyright notice and this permission notice shall be included in all
19
+ copies or substantial portions of the Software.
20
+
21
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
+ SOFTWARE.
8
28
  Keywords: clustering,optimization
9
29
  Classifier: Development Status :: 4 - Beta
10
30
  Classifier: Intended Audience :: End Users/Desktop
@@ -17,7 +37,7 @@ Classifier: Programming Language :: Python :: 2
17
37
  Classifier: Programming Language :: Python :: 3
18
38
  Classifier: Topic :: Scientific/Engineering :: Mathematics
19
39
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
20
- Requires-Python: >=3.9
40
+ Requires-Python: <3.13,>=3.9
21
41
  Description-Content-Type: text/markdown
22
42
  License-File: LICENSE.txt
23
43
  Requires-Dist: scikit-learn>=0.0
@@ -27,8 +47,16 @@ Requires-Dist: pyomo>=6.4.3
27
47
  Requires-Dist: networkx
28
48
  Requires-Dist: tqdm
29
49
  Requires-Dist: highspy
30
-
31
- [![daily pytest](https://github.com/FZJ-IEK3-VSA/tsam/actions/workflows/daily_tests.yml/badge.svg?branch=master)](https://github.com/FZJ-IEK3-VSA/tsam/actions) [![Version](https://img.shields.io/pypi/v/tsam.svg)](https://pypi.python.org/pypi/tsam) [![Conda Version](https://img.shields.io/conda/vn/conda-forge/tsam.svg)](https://anaconda.org/conda-forge/tsam) [![Documentation Status](https://readthedocs.org/projects/tsam/badge/?version=latest)](https://tsam.readthedocs.io/en/latest/) [![PyPI - License](https://img.shields.io/pypi/l/tsam)]((https://github.com/FZJ-IEK3-VSA/tsam/blob/master/LICENSE.txt)) [![codecov](https://codecov.io/gh/FZJ-IEK3-VSA/tsam/branch/master/graph/badge.svg)](https://codecov.io/gh/FZJ-IEK3-VSA/tsam)
50
+ Provides-Extra: dev
51
+ Requires-Dist: pytest; extra == "dev"
52
+ Requires-Dist: pytest-cov; extra == "dev"
53
+ Requires-Dist: codecov; extra == "dev"
54
+ Requires-Dist: sphinx; extra == "dev"
55
+ Requires-Dist: sphinx-autobuild; extra == "dev"
56
+ Requires-Dist: sphinx_book_theme; extra == "dev"
57
+ Requires-Dist: twine; extra == "dev"
58
+
59
+ [![daily pytest](https://github.com/FZJ-IEK3-VSA/tsam/actions/workflows/daily_tests.yml/badge.svg?branch=master)](https://github.com/FZJ-IEK3-VSA/tsam/actions) [![Version](https://img.shields.io/pypi/v/tsam.svg)](https://pypi.python.org/pypi/tsam) [![Conda Version](https://img.shields.io/conda/vn/conda-forge/tsam.svg)](https://anaconda.org/conda-forge/tsam) [![Documentation Status](https://readthedocs.org/projects/tsam/badge/?version=latest)](https://tsam.readthedocs.io/en/latest/) [![PyPI - License](https://img.shields.io/pypi/l/tsam)]((https://github.com/FZJ-IEK3-VSA/tsam/blob/master/LICENSE.txt)) [![codecov](https://codecov.io/gh/FZJ-IEK3-VSA/tsam/branch/master/graph/badge.svg)](https://codecov.io/gh/FZJ-IEK3-VSA/tsam)
32
60
  [![badge](https://img.shields.io/badge/launch-binder-579aca.svg?logo=data:image/png;base64,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)](https://mybinder.org/v2/gh/FZJ-IEK3-VSA/voila-tsam/HEAD?urlpath=voila/render/Time-Series-Aggregation-Module.ipynb)
33
61
 
34
62
  <a href="https://www.fz-juelich.de/en/iek/iek-3"><img src="https://www.fz-juelich.de/static/media/Logo.2ceb35fc.svg" alt="Forschungszentrum Juelich Logo" width="230px"></a>
@@ -49,28 +77,50 @@ The documentation of the tsam code can be found [**here**](https://tsam.readthed
49
77
 
50
78
 
51
79
  ## Installation
80
+ It is recommended to install tsam within its own environment. If you are no familiar with python environments, plaese consider to read some [external documentation](https://realpython.com/python-virtual-environments-a-primer/). In the following we assume you have a [mamba](https://mamba.readthedocs.io/en/latest/installation/mamba-installation.html) or [conda](https://www.anaconda.com/) installation. All conda and mamba command are interchangeable.
81
+
82
+ ### Direct Installations from Package Manager Repositories
83
+
84
+ If you want to prevent any possible dependency conflicts create a new environment using the following command:
85
+
86
+ mamba create -n tsam_env python pip
87
+
88
+ Activate an existing or the newly create environment afterward
89
+
90
+ mamba activate tsam_env
91
+
52
92
  Directly install via pip from pypi as follows:
53
93
 
54
94
  pip install tsam
55
95
 
56
- of install from conda forge with the following command:
96
+ or install from conda forge with the following command:
57
97
 
58
98
  conda install tsam -c conda-forge
59
99
 
100
+ ### Local Installation for Development
60
101
  Alternatively, clone a local copy of the repository to your computer
61
102
 
62
103
  git clone https://github.com/FZJ-IEK3-VSA/tsam.git
63
-
64
- Then install tsam via pip as follow
65
-
104
+
105
+ Change the directory of your shell into the root folder of the repository
106
+
66
107
  cd tsam
67
- pip install .
68
-
69
- Or install directly via python as
70
108
 
71
- python setup.py install
109
+ For development, it is recommended to install tsam into its own environment using conda e.g.
110
+
111
+ conda env create --file=requirement.yml
112
+
113
+ Afterward activate the environment
114
+
115
+ conda activate tsam_env
116
+
117
+ Then install tsam via pip as follows
118
+
119
+
120
+ pip install -e .[dev]
72
121
 
73
- In order to use the k-medoids clustering, make sure that you have installed a MILP solver. As default [HiGHS](https://github.com/ERGO-Code/HiGHS) is used. Nevertheless, in case you have access to a license we recommend commercial solvers (e.g. Gurobi or CPLEX) since they have a better performance.
122
+ ### Installation of MILP Solver for k-medoids
123
+ In order to use the k-medoids clustering, make sure that you have installed a MILP solver. As default [HiGHS](https://github.com/ERGO-Code/HiGHS) is installed and used. Nevertheless, in case you have access to a license we recommend commercial solvers (e.g. Gurobi or CPLEX) since they have a better performance.
74
124
 
75
125
  ### Developer installation
76
126
 
@@ -136,7 +186,7 @@ Copyright (C) 2016-2022 Leander Kotzur (FZJ IEK-3), Maximilian Hoffmann (FZJ IEK
136
186
  You should have received a copy of the MIT License along with this program.
137
187
  If not, see https://opensource.org/licenses/MIT
138
188
 
139
- The core developer team sits in the [Institute of Energy and Climate Research - Techno-Economic Energy Systems Analysis (IEK-3)](https://www.fz-juelich.de/iek/iek-3/EN/Home/home_node.html) belonging to the [Forschungszentrum Jülich](https://www.fz-juelich.de/).
189
+ The core developer team sits in the [Institute of Energy and Climate Research - Techno-Economic Energy Systems Analysis (IEK-3)](https://www.fz-juelich.de/iek/iek-3/EN/Home/home_node.html) belonging to the [Forschungszentrum Jülich](https://www.fz-juelich.de/).
140
190
 
141
191
  ## Citing and further reading
142
192
 
@@ -155,7 +205,7 @@ The publications about time series aggregation for energy system optimization mo
155
205
  [**Typical periods or typical time steps? A multi-model analysis to determine the optimal temporal aggregation for energy system models**](https://www.sciencedirect.com/science/article/abs/pii/S0306261921011545)
156
206
  * Hoffmann et al. (2020):\
157
207
  [**A Review on Time Series Aggregation Methods for Energy System Models**](https://www.mdpi.com/1996-1073/13/3/641)
158
- * Kannengießer et al. (2019):\
208
+ * Kannengießer et al. (2019):\
159
209
  [**Reducing Computational Load for Mixed Integer Linear Programming: An Example for a District and an Island Energy System**](https://www.mdpi.com/1996-1073/12/14/2825)
160
210
  * Kotzur et al. (2018):\
161
211
  [**Time series aggregation for energy system design: Modeling seasonal storage**](https://www.sciencedirect.com/science/article/pii/S0306261918300242)\
@@ -19,28 +19,50 @@ The documentation of the tsam code can be found [**here**](https://tsam.readthed
19
19
 
20
20
 
21
21
  ## Installation
22
+ It is recommended to install tsam within its own environment. If you are no familiar with python environments, plaese consider to read some [external documentation](https://realpython.com/python-virtual-environments-a-primer/). In the following we assume you have a [mamba](https://mamba.readthedocs.io/en/latest/installation/mamba-installation.html) or [conda](https://www.anaconda.com/) installation. All conda and mamba command are interchangeable.
23
+
24
+ ### Direct Installations from Package Manager Repositories
25
+
26
+ If you want to prevent any possible dependency conflicts create a new environment using the following command:
27
+
28
+ mamba create -n tsam_env python pip
29
+
30
+ Activate an existing or the newly create environment afterward
31
+
32
+ mamba activate tsam_env
33
+
22
34
  Directly install via pip from pypi as follows:
23
35
 
24
36
  pip install tsam
25
37
 
26
- of install from conda forge with the following command:
38
+ or install from conda forge with the following command:
27
39
 
28
40
  conda install tsam -c conda-forge
29
41
 
42
+ ### Local Installation for Development
30
43
  Alternatively, clone a local copy of the repository to your computer
31
44
 
32
45
  git clone https://github.com/FZJ-IEK3-VSA/tsam.git
33
-
34
- Then install tsam via pip as follow
35
-
46
+
47
+ Change the directory of your shell into the root folder of the repository
48
+
36
49
  cd tsam
37
- pip install .
38
-
39
- Or install directly via python as
40
50
 
41
- python setup.py install
51
+ For development, it is recommended to install tsam into its own environment using conda e.g.
52
+
53
+ conda env create --file=requirement.yml
54
+
55
+ Afterward activate the environment
56
+
57
+ conda activate tsam_env
58
+
59
+ Then install tsam via pip as follows
60
+
61
+
62
+ pip install -e .[dev]
42
63
 
43
- In order to use the k-medoids clustering, make sure that you have installed a MILP solver. As default [HiGHS](https://github.com/ERGO-Code/HiGHS) is used. Nevertheless, in case you have access to a license we recommend commercial solvers (e.g. Gurobi or CPLEX) since they have a better performance.
64
+ ### Installation of MILP Solver for k-medoids
65
+ In order to use the k-medoids clustering, make sure that you have installed a MILP solver. As default [HiGHS](https://github.com/ERGO-Code/HiGHS) is installed and used. Nevertheless, in case you have access to a license we recommend commercial solvers (e.g. Gurobi or CPLEX) since they have a better performance.
44
66
 
45
67
  ### Developer installation
46
68
 
@@ -0,0 +1,53 @@
1
+ [build-system]
2
+ requires = ["setuptools>=64.0.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+
6
+ [project]
7
+ name = "tsam"
8
+ version = "2.3.6"
9
+ description = "Time series aggregation module (tsam) to create typical periods"
10
+ authors = [
11
+ { name = "Leander Kotzur", email = "leander.kotzur@googlemail.com" },
12
+ { name = "Maximilian Hoffmann", email = "maximilian.hoffmann@julumni.fz-juelich.de" },
13
+ ]
14
+ maintainers = [
15
+ {name = "Julian Belina", email = "j.belina@fz-juelich.de"}
16
+ ]
17
+ license = { file = "LICENSE.txt" }
18
+ keywords = ["clustering", "optimization"]
19
+ requires-python = ">=3.9,<3.13"
20
+ readme = "README.md"
21
+ classifiers=[
22
+ "Development Status :: 4 - Beta",
23
+ "Intended Audience :: End Users/Desktop",
24
+ "Intended Audience :: Science/Research",
25
+ "License :: OSI Approved :: MIT License",
26
+ "Natural Language :: English",
27
+ "Operating System :: OS Independent",
28
+ "Programming Language :: Python",
29
+ "Programming Language :: Python :: 2",
30
+ "Programming Language :: Python :: 3",
31
+ "Topic :: Scientific/Engineering :: Mathematics",
32
+ "Topic :: Software Development :: Libraries :: Python Modules",
33
+ ]
34
+ dynamic = ["dependencies", "optional-dependencies"]
35
+
36
+
37
+ [tool.setuptools.packages.find]
38
+ where = ["src"]
39
+
40
+ [tool.setuptools.dynamic]
41
+ dependencies = {file = ["requirements.txt"]}
42
+ optional-dependencies = {dev = { file = ["requirements_dev.txt"] }}
43
+
44
+
45
+ #Configureation options
46
+ # https://docs.pytest.org/en/7.1.x/reference/reference.html#configuration-options
47
+
48
+ [tool.pytest.ini_options]
49
+ testpaths = ["test"] # Sets the path where to look for tests
50
+ pythonpath =["test"] # Sets the path which should be prepended to pythonpath relative to the root folder
51
+ console_output_style = "count"
52
+
53
+
@@ -1,8 +1,6 @@
1
- name: tsam
1
+ name: tsam_env
2
2
  channels:
3
3
  - conda-forge
4
4
  dependencies:
5
5
  - python>=3.9,<3.13
6
6
  - pip
7
- - pip:
8
- - -r requirements.txt
@@ -1,8 +1,7 @@
1
- -r requirements.txt
2
-
3
1
  # Testing
4
2
  pytest
5
3
  pytest-cov
4
+ codecov
6
5
 
7
6
  # Documentation
8
7
  sphinx
@@ -57,17 +57,18 @@ def durationRepresentation(
57
57
  # get all the values of a certain attribute and cluster
58
58
  candidateValues = candidates.loc[indice[0], a]
59
59
  # sort all values
60
- sortedAttr = candidateValues.stack(future_stack=True,).sort_values()
60
+ sortedAttr = candidateValues.stack(
61
+ future_stack=True,
62
+ ).sort_values()
61
63
  # reindex and arrange such that every sorted segment gets represented by its mean
62
64
  sortedAttr.index = pd.MultiIndex.from_tuples(clean_index)
63
65
  representationValues = sortedAttr.unstack(level=0).mean(axis=1)
64
66
  # respect max and min of the attributes
65
67
  if representMinMax:
66
68
  representationValues.loc[0] = sortedAttr.values[0]
67
- representationValues.loc[
68
- representationValues.index[-1]
69
- ] = sortedAttr.values[-1]
70
-
69
+ representationValues.loc[representationValues.index[-1]] = (
70
+ sortedAttr.values[-1]
71
+ )
71
72
 
72
73
  # get the order of the representation values such that euclidean distance to the candidates is minimized
73
74
  order = candidateValues.mean().sort_values().index
@@ -97,8 +98,12 @@ def durationRepresentation(
97
98
  # concat centroid values and cluster weights for all clusters
98
99
  meansAndWeights = pd.concat(
99
100
  [
100
- pd.DataFrame(np.array(meanVals)).stack(future_stack=True,),
101
- pd.DataFrame(np.array(clusterLengths)).stack(future_stack=True,),
101
+ pd.DataFrame(np.array(meanVals)).stack(
102
+ future_stack=True,
103
+ ),
104
+ pd.DataFrame(np.array(clusterLengths)).stack(
105
+ future_stack=True,
106
+ ),
102
107
  ],
103
108
  axis=1,
104
109
  )
@@ -107,7 +112,14 @@ def durationRepresentation(
107
112
  # save order of the sorted centroid values across all clusters
108
113
  order = meansAndWeightsSorted.index
109
114
  # sort all values of the original time series
110
- sortedAttr = candidates.loc[:, a].stack(future_stack=True,).sort_values().values
115
+ sortedAttr = (
116
+ candidates.loc[:, a]
117
+ .stack(
118
+ future_stack=True,
119
+ )
120
+ .sort_values()
121
+ .values
122
+ )
111
123
  # take mean of sections of the original duration curve according to the cluster and its weight the
112
124
  # respective section is assigned to
113
125
  representationValues = []
@@ -124,8 +136,7 @@ def durationRepresentation(
124
136
  keepSum=True,
125
137
  )
126
138
 
127
-
128
- # transform all representation values to a data frame and arrange it
139
+ # transform all representation values to a data frame and arrange it
129
140
  # according to the order of the sorted
130
141
  # centroid values
131
142
  representationValues = pd.DataFrame(np.array(representationValues))
@@ -139,9 +150,9 @@ def durationRepresentation(
139
150
  return clusterCenters
140
151
 
141
152
 
142
-
143
- def _representMinMax(representationValues, sortedAttr, meansAndWeightsSorted,
144
- keepSum=True):
153
+ def _representMinMax(
154
+ representationValues, sortedAttr, meansAndWeightsSorted, keepSum=True
155
+ ):
145
156
  """
146
157
  Represents the the min and max values of the original time series in the
147
158
  duration curve representation such that the min and max values of the
@@ -164,8 +175,8 @@ def _representMinMax(representationValues, sortedAttr, meansAndWeightsSorted,
164
175
  if np.any(np.array(representationValues) < 0):
165
176
  raise ValueError("Negative values in the duration curve representation")
166
177
 
167
- # first retrieve the change of the values to the min and max values
168
- # of the original time series and their duration in the original
178
+ # first retrieve the change of the values to the min and max values
179
+ # of the original time series and their duration in the original
169
180
  # time series
170
181
  delta_max = sortedAttr.max() - representationValues[-1]
171
182
  appearance_max = meansAndWeightsSorted[1].iloc[-1]
@@ -174,31 +185,36 @@ def _representMinMax(representationValues, sortedAttr, meansAndWeightsSorted,
174
185
 
175
186
  if delta_min == 0 and delta_max == 0:
176
187
  return representationValues
177
-
188
+
178
189
  if keepSum:
179
190
 
180
- # now anticipate the shift of the sum of the time series
191
+ # now anticipate the shift of the sum of the time series
181
192
  # due to the change of the min and max values
182
193
  # of the duration curve
183
194
  delta_sum = delta_max * appearance_max + delta_min * appearance_min
184
- # and derive how much the other values have to be changed to preserve
195
+ # and derive how much the other values have to be changed to preserve
185
196
  # the mean of the duration curve
186
- correction_factor = - delta_sum / (meansAndWeightsSorted[1].iloc[1:-1]
187
- * representationValues[1:-1]).sum()
188
-
197
+ correction_factor = (
198
+ -delta_sum
199
+ / (meansAndWeightsSorted[1].iloc[1:-1] * representationValues[1:-1]).sum()
200
+ )
201
+
189
202
  if correction_factor < -1 or correction_factor > 1:
190
- warnings.warn("The cluster is to small to preserve the sum of the duration curve and additionally the min and max values of the original cluster members. The min max values of the cluster are not preserved. This does not necessarily mean that the min and max values of the original time series are not preserved.")
203
+ warnings.warn(
204
+ "The cluster is too small to preserve the sum of the duration curve and additionally the min and max values of the original cluster members. The min max values of the cluster are not preserved. This does not necessarily mean that the min and max values of the original time series are not preserved."
205
+ )
191
206
  return representationValues
192
207
 
193
- # correct the values of the duration curve such
208
+ # correct the values of the duration curve such
194
209
  # that the mean of the duration curve is preserved
195
210
  # since the min and max values are changed
196
- representationValues[1:-1] = np.multiply(representationValues[1:-1], (
197
- 1+ correction_factor))
198
-
199
- # change the values of the duration curve such that the min and max
211
+ representationValues[1:-1] = np.multiply(
212
+ representationValues[1:-1], (1 + correction_factor)
213
+ )
214
+
215
+ # change the values of the duration curve such that the min and max
200
216
  # values are preserved
201
217
  representationValues[-1] += delta_max
202
218
  representationValues[0] += delta_min
203
-
219
+
204
220
  return representationValues
@@ -1,10 +1,30 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tsam
3
- Version: 2.3.5
3
+ Version: 2.3.6
4
4
  Summary: Time series aggregation module (tsam) to create typical periods
5
- Home-page: https://github.com/FZJ-IEK3-VSA/tsam
6
- Author: Leander Kotzur, Maximilian Hoffmann
7
- Author-email: leander.kotzur@googlemail.com, maximilian.hoffmann@julumni.fz-juelich.de
5
+ Author-email: Leander Kotzur <leander.kotzur@googlemail.com>, Maximilian Hoffmann <maximilian.hoffmann@julumni.fz-juelich.de>
6
+ Maintainer-email: Julian Belina <j.belina@fz-juelich.de>
7
+ License: MIT License
8
+
9
+ Copyright (c) 2017 Leander Kotzur (FZJ IEK-3), Maximilian Hoffmann (FZJ IEK-3), Peter Markewitz (FZJ IEK-3), Martin Robinius (FZJ IEK-3), Detlef Stolten (FZJ IEK-3)
10
+
11
+ Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ of this software and associated documentation files (the "Software"), to deal
13
+ in the Software without restriction, including without limitation the rights
14
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ copies of the Software, and to permit persons to whom the Software is
16
+ furnished to do so, subject to the following conditions:
17
+
18
+ The above copyright notice and this permission notice shall be included in all
19
+ copies or substantial portions of the Software.
20
+
21
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
+ SOFTWARE.
8
28
  Keywords: clustering,optimization
9
29
  Classifier: Development Status :: 4 - Beta
10
30
  Classifier: Intended Audience :: End Users/Desktop
@@ -17,7 +37,7 @@ Classifier: Programming Language :: Python :: 2
17
37
  Classifier: Programming Language :: Python :: 3
18
38
  Classifier: Topic :: Scientific/Engineering :: Mathematics
19
39
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
20
- Requires-Python: >=3.9
40
+ Requires-Python: <3.13,>=3.9
21
41
  Description-Content-Type: text/markdown
22
42
  License-File: LICENSE.txt
23
43
  Requires-Dist: scikit-learn>=0.0
@@ -27,8 +47,16 @@ Requires-Dist: pyomo>=6.4.3
27
47
  Requires-Dist: networkx
28
48
  Requires-Dist: tqdm
29
49
  Requires-Dist: highspy
30
-
31
- [![daily pytest](https://github.com/FZJ-IEK3-VSA/tsam/actions/workflows/daily_tests.yml/badge.svg?branch=master)](https://github.com/FZJ-IEK3-VSA/tsam/actions) [![Version](https://img.shields.io/pypi/v/tsam.svg)](https://pypi.python.org/pypi/tsam) [![Conda Version](https://img.shields.io/conda/vn/conda-forge/tsam.svg)](https://anaconda.org/conda-forge/tsam) [![Documentation Status](https://readthedocs.org/projects/tsam/badge/?version=latest)](https://tsam.readthedocs.io/en/latest/) [![PyPI - License](https://img.shields.io/pypi/l/tsam)]((https://github.com/FZJ-IEK3-VSA/tsam/blob/master/LICENSE.txt)) [![codecov](https://codecov.io/gh/FZJ-IEK3-VSA/tsam/branch/master/graph/badge.svg)](https://codecov.io/gh/FZJ-IEK3-VSA/tsam)
50
+ Provides-Extra: dev
51
+ Requires-Dist: pytest; extra == "dev"
52
+ Requires-Dist: pytest-cov; extra == "dev"
53
+ Requires-Dist: codecov; extra == "dev"
54
+ Requires-Dist: sphinx; extra == "dev"
55
+ Requires-Dist: sphinx-autobuild; extra == "dev"
56
+ Requires-Dist: sphinx_book_theme; extra == "dev"
57
+ Requires-Dist: twine; extra == "dev"
58
+
59
+ [![daily pytest](https://github.com/FZJ-IEK3-VSA/tsam/actions/workflows/daily_tests.yml/badge.svg?branch=master)](https://github.com/FZJ-IEK3-VSA/tsam/actions) [![Version](https://img.shields.io/pypi/v/tsam.svg)](https://pypi.python.org/pypi/tsam) [![Conda Version](https://img.shields.io/conda/vn/conda-forge/tsam.svg)](https://anaconda.org/conda-forge/tsam) [![Documentation Status](https://readthedocs.org/projects/tsam/badge/?version=latest)](https://tsam.readthedocs.io/en/latest/) [![PyPI - License](https://img.shields.io/pypi/l/tsam)]((https://github.com/FZJ-IEK3-VSA/tsam/blob/master/LICENSE.txt)) [![codecov](https://codecov.io/gh/FZJ-IEK3-VSA/tsam/branch/master/graph/badge.svg)](https://codecov.io/gh/FZJ-IEK3-VSA/tsam)
32
60
  [![badge](https://img.shields.io/badge/launch-binder-579aca.svg?logo=data:image/png;base64,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)](https://mybinder.org/v2/gh/FZJ-IEK3-VSA/voila-tsam/HEAD?urlpath=voila/render/Time-Series-Aggregation-Module.ipynb)
33
61
 
34
62
  <a href="https://www.fz-juelich.de/en/iek/iek-3"><img src="https://www.fz-juelich.de/static/media/Logo.2ceb35fc.svg" alt="Forschungszentrum Juelich Logo" width="230px"></a>
@@ -49,28 +77,50 @@ The documentation of the tsam code can be found [**here**](https://tsam.readthed
49
77
 
50
78
 
51
79
  ## Installation
80
+ It is recommended to install tsam within its own environment. If you are no familiar with python environments, plaese consider to read some [external documentation](https://realpython.com/python-virtual-environments-a-primer/). In the following we assume you have a [mamba](https://mamba.readthedocs.io/en/latest/installation/mamba-installation.html) or [conda](https://www.anaconda.com/) installation. All conda and mamba command are interchangeable.
81
+
82
+ ### Direct Installations from Package Manager Repositories
83
+
84
+ If you want to prevent any possible dependency conflicts create a new environment using the following command:
85
+
86
+ mamba create -n tsam_env python pip
87
+
88
+ Activate an existing or the newly create environment afterward
89
+
90
+ mamba activate tsam_env
91
+
52
92
  Directly install via pip from pypi as follows:
53
93
 
54
94
  pip install tsam
55
95
 
56
- of install from conda forge with the following command:
96
+ or install from conda forge with the following command:
57
97
 
58
98
  conda install tsam -c conda-forge
59
99
 
100
+ ### Local Installation for Development
60
101
  Alternatively, clone a local copy of the repository to your computer
61
102
 
62
103
  git clone https://github.com/FZJ-IEK3-VSA/tsam.git
63
-
64
- Then install tsam via pip as follow
65
-
104
+
105
+ Change the directory of your shell into the root folder of the repository
106
+
66
107
  cd tsam
67
- pip install .
68
-
69
- Or install directly via python as
70
108
 
71
- python setup.py install
109
+ For development, it is recommended to install tsam into its own environment using conda e.g.
110
+
111
+ conda env create --file=requirement.yml
112
+
113
+ Afterward activate the environment
114
+
115
+ conda activate tsam_env
116
+
117
+ Then install tsam via pip as follows
118
+
119
+
120
+ pip install -e .[dev]
72
121
 
73
- In order to use the k-medoids clustering, make sure that you have installed a MILP solver. As default [HiGHS](https://github.com/ERGO-Code/HiGHS) is used. Nevertheless, in case you have access to a license we recommend commercial solvers (e.g. Gurobi or CPLEX) since they have a better performance.
122
+ ### Installation of MILP Solver for k-medoids
123
+ In order to use the k-medoids clustering, make sure that you have installed a MILP solver. As default [HiGHS](https://github.com/ERGO-Code/HiGHS) is installed and used. Nevertheless, in case you have access to a license we recommend commercial solvers (e.g. Gurobi or CPLEX) since they have a better performance.
74
124
 
75
125
  ### Developer installation
76
126
 
@@ -136,7 +186,7 @@ Copyright (C) 2016-2022 Leander Kotzur (FZJ IEK-3), Maximilian Hoffmann (FZJ IEK
136
186
  You should have received a copy of the MIT License along with this program.
137
187
  If not, see https://opensource.org/licenses/MIT
138
188
 
139
- The core developer team sits in the [Institute of Energy and Climate Research - Techno-Economic Energy Systems Analysis (IEK-3)](https://www.fz-juelich.de/iek/iek-3/EN/Home/home_node.html) belonging to the [Forschungszentrum Jülich](https://www.fz-juelich.de/).
189
+ The core developer team sits in the [Institute of Energy and Climate Research - Techno-Economic Energy Systems Analysis (IEK-3)](https://www.fz-juelich.de/iek/iek-3/EN/Home/home_node.html) belonging to the [Forschungszentrum Jülich](https://www.fz-juelich.de/).
140
190
 
141
191
  ## Citing and further reading
142
192
 
@@ -155,7 +205,7 @@ The publications about time series aggregation for energy system optimization mo
155
205
  [**Typical periods or typical time steps? A multi-model analysis to determine the optimal temporal aggregation for energy system models**](https://www.sciencedirect.com/science/article/abs/pii/S0306261921011545)
156
206
  * Hoffmann et al. (2020):\
157
207
  [**A Review on Time Series Aggregation Methods for Energy System Models**](https://www.mdpi.com/1996-1073/13/3/641)
158
- * Kannengießer et al. (2019):\
208
+ * Kannengießer et al. (2019):\
159
209
  [**Reducing Computational Load for Mixed Integer Linear Programming: An Example for a District and an Island Energy System**](https://www.mdpi.com/1996-1073/12/14/2825)
160
210
  * Kotzur et al. (2018):\
161
211
  [**Time series aggregation for energy system design: Modeling seasonal storage**](https://www.sciencedirect.com/science/article/pii/S0306261918300242)\
@@ -0,0 +1,54 @@
1
+ LICENSE.txt
2
+ MANIFEST.in
3
+ README.md
4
+ pyproject.toml
5
+ requirements.txt
6
+ requirements.yml
7
+ requirements_dev.txt
8
+ examples/testdata.csv
9
+ examples/results/paretoOptimalAggregation.csv
10
+ examples/results/preprocessed_wind.csv
11
+ examples/results/testperiods_hierarchical.csv
12
+ examples/results/testperiods_kmeans.csv
13
+ examples/results/testperiods_kmedoids.csv
14
+ examples/results/testperiods_predefClusterOrder.csv
15
+ examples/results/testperiods_predefClusterOrderAndClusterCenters.csv
16
+ examples/results/testperiods_segmentation.csv
17
+ src/tsam/__init__.py
18
+ src/tsam/hyperparametertuning.py
19
+ src/tsam/periodAggregation.py
20
+ src/tsam/representations.py
21
+ src/tsam/timeseriesaggregation.py
22
+ src/tsam.egg-info/PKG-INFO
23
+ src/tsam.egg-info/SOURCES.txt
24
+ src/tsam.egg-info/dependency_links.txt
25
+ src/tsam.egg-info/requires.txt
26
+ src/tsam.egg-info/top_level.txt
27
+ src/tsam/utils/__init__.py
28
+ src/tsam/utils/durationRepresentation.py
29
+ src/tsam/utils/k_maxoids.py
30
+ src/tsam/utils/k_medoids_contiguity.py
31
+ src/tsam/utils/k_medoids_exact.py
32
+ src/tsam/utils/segmentation.py
33
+ test/test_accuracyIndicators.py
34
+ test/test_adjacent_periods.py
35
+ test/test_aggregate_hiearchical.py
36
+ test/test_assert_raises.py
37
+ test/test_averaging.py
38
+ test/test_cluster_order.py
39
+ test/test_durationCurve.py
40
+ test/test_durationRepresentation.py
41
+ test/test_extremePeriods.py
42
+ test/test_hierarchical.py
43
+ test/test_hypertuneAggregation.py
44
+ test/test_k_maxoids.py
45
+ test/test_k_medoids.py
46
+ test/test_k_medoids_contiguity.py
47
+ test/test_minmaxRepresentation.py
48
+ test/test_preprocess.py
49
+ test/test_properties.py
50
+ test/test_samemean.py
51
+ test/test_segmentation.py
52
+ test/test_subhourlyResolution.py
53
+ test/test_subhourly_periods.py
54
+ test/test_weightingFactors.py
@@ -5,3 +5,12 @@ pyomo>=6.4.3
5
5
  networkx
6
6
  tqdm
7
7
  highspy
8
+
9
+ [dev]
10
+ pytest
11
+ pytest-cov
12
+ codecov
13
+ sphinx
14
+ sphinx-autobuild
15
+ sphinx_book_theme
16
+ twine