flixopt 2.2.0b0__py3-none-any.whl → 2.2.0rc2__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.

Potentially problematic release.


This version of flixopt might be problematic. Click here for more details.

Files changed (48) hide show
  1. docs/examples/00-Minimal Example.md +1 -1
  2. docs/examples/01-Basic Example.md +1 -1
  3. docs/examples/02-Complex Example.md +1 -1
  4. docs/examples/index.md +1 -1
  5. docs/faq/contribute.md +26 -14
  6. docs/faq/index.md +1 -1
  7. docs/javascripts/mathjax.js +1 -1
  8. docs/user-guide/Mathematical Notation/Bus.md +1 -1
  9. docs/user-guide/Mathematical Notation/Effects, Penalty & Objective.md +13 -13
  10. docs/user-guide/Mathematical Notation/Flow.md +1 -1
  11. docs/user-guide/Mathematical Notation/LinearConverter.md +2 -2
  12. docs/user-guide/Mathematical Notation/Piecewise.md +1 -1
  13. docs/user-guide/Mathematical Notation/Storage.md +1 -1
  14. docs/user-guide/Mathematical Notation/index.md +1 -1
  15. docs/user-guide/Mathematical Notation/others.md +1 -1
  16. docs/user-guide/index.md +2 -2
  17. flixopt/__init__.py +5 -0
  18. flixopt/aggregation.py +0 -1
  19. flixopt/calculation.py +40 -72
  20. flixopt/commons.py +10 -1
  21. flixopt/components.py +326 -154
  22. flixopt/core.py +459 -966
  23. flixopt/effects.py +67 -270
  24. flixopt/elements.py +76 -84
  25. flixopt/features.py +172 -154
  26. flixopt/flow_system.py +70 -99
  27. flixopt/interface.py +315 -147
  28. flixopt/io.py +27 -56
  29. flixopt/linear_converters.py +3 -3
  30. flixopt/network_app.py +755 -0
  31. flixopt/plotting.py +16 -34
  32. flixopt/results.py +108 -806
  33. flixopt/structure.py +11 -67
  34. flixopt/utils.py +9 -6
  35. {flixopt-2.2.0b0.dist-info → flixopt-2.2.0rc2.dist-info}/METADATA +63 -42
  36. flixopt-2.2.0rc2.dist-info/RECORD +54 -0
  37. {flixopt-2.2.0b0.dist-info → flixopt-2.2.0rc2.dist-info}/WHEEL +1 -1
  38. scripts/extract_release_notes.py +45 -0
  39. docs/release-notes/_template.txt +0 -32
  40. docs/release-notes/index.md +0 -7
  41. docs/release-notes/v2.0.0.md +0 -93
  42. docs/release-notes/v2.0.1.md +0 -12
  43. docs/release-notes/v2.1.0.md +0 -31
  44. docs/release-notes/v2.2.0.md +0 -55
  45. docs/user-guide/Mathematical Notation/Investment.md +0 -115
  46. flixopt-2.2.0b0.dist-info/RECORD +0 -59
  47. {flixopt-2.2.0b0.dist-info → flixopt-2.2.0rc2.dist-info}/licenses/LICENSE +0 -0
  48. {flixopt-2.2.0b0.dist-info → flixopt-2.2.0rc2.dist-info}/top_level.txt +0 -0
flixopt/structure.py CHANGED
@@ -19,7 +19,7 @@ from rich.console import Console
19
19
  from rich.pretty import Pretty
20
20
 
21
21
  from .config import CONFIG
22
- from .core import Scalar, TimeSeries, TimeSeriesCollection, TimeSeriesData, TimestepData
22
+ from .core import NumericData, Scalar, TimeSeries, TimeSeriesCollection, TimeSeriesData
23
23
 
24
24
  if TYPE_CHECKING: # for type checking and preventing circular imports
25
25
  from .effects import EffectCollectionModel
@@ -58,7 +58,6 @@ class SystemModel(linopy.Model):
58
58
  self.flow_system = flow_system
59
59
  self.time_series_collection = flow_system.time_series_collection
60
60
  self.effects: Optional[EffectCollectionModel] = None
61
- self.scenario_weights = self._calculate_scenario_weights(flow_system.scenario_weights)
62
61
 
63
62
  def do_modeling(self):
64
63
  self.effects = self.flow_system.effects.create_model(self)
@@ -70,24 +69,6 @@ class SystemModel(linopy.Model):
70
69
  for bus_model in bus_models: # Buses after Components, because FlowModels are created in ComponentModels
71
70
  bus_model.do_modeling()
72
71
 
73
- def _calculate_scenario_weights(self, weights: Optional[TimeSeries] = None) -> xr.DataArray:
74
- """Calculates the weights of the scenarios. If None, all scenarios have the same weight. All weights are normalized to 1.
75
- If no scenarios are present, s single weight of 1 is returned.
76
- """
77
- if weights is not None and not isinstance(weights, TimeSeries):
78
- raise TypeError(f'Weights must be a TimeSeries or None, got {type(weights)}')
79
- if self.time_series_collection.scenarios is None:
80
- return xr.DataArray(1)
81
- if weights is None:
82
- weights = xr.DataArray(
83
- np.ones(len(self.time_series_collection.scenarios)),
84
- coords={'scenario': self.time_series_collection.scenarios}
85
- )
86
- elif isinstance(weights, TimeSeries):
87
- weights = weights.selected_data
88
-
89
- return weights / weights.sum()
90
-
91
72
  @property
92
73
  def solution(self):
93
74
  solution = super().solution
@@ -106,10 +87,6 @@ class SystemModel(linopy.Model):
106
87
  effect.label_full: effect.model.results_structure()
107
88
  for effect in sorted(self.flow_system.effects, key=lambda effect: effect.label_full.upper())
108
89
  },
109
- 'Flows': {
110
- flow.label_full: flow.model.results_structure()
111
- for flow in sorted(self.flow_system.flows.values(), key=lambda flow: flow.label_full.upper())
112
- },
113
90
  }
114
91
  return solution.reindex(time=self.time_series_collection.timesteps_extra)
115
92
 
@@ -121,40 +98,13 @@ class SystemModel(linopy.Model):
121
98
  def hours_of_previous_timesteps(self):
122
99
  return self.time_series_collection.hours_of_previous_timesteps
123
100
 
124
- def get_coords(
125
- self, scenario_dim=True, time_dim=True, extra_timestep=False
126
- ) -> Optional[Union[Tuple[pd.Index], Tuple[pd.Index, pd.Index]]]:
127
- """
128
- Returns the coordinates of the model
129
-
130
- Args:
131
- scenario_dim: If True, the scenario dimension is included in the coordinates
132
- time_dim: If True, the time dimension is included in the coordinates
133
- extra_timestep: If True, the extra timesteps are used instead of the regular timesteps
134
-
135
- Returns:
136
- The coordinates of the model. Might also be None if no scenarios are present and time_dim is False
137
- """
138
- if not scenario_dim and not time_dim:
139
- return None
140
- scenarios = self.time_series_collection.scenarios
141
- timesteps = (
142
- self.time_series_collection.timesteps if not extra_timestep else self.time_series_collection.timesteps_extra
143
- )
144
-
145
- if scenario_dim and time_dim:
146
- if scenarios is None:
147
- return (timesteps,)
148
- return timesteps, scenarios
149
-
150
- if scenario_dim and not time_dim:
151
- if scenarios is None:
152
- return None
153
- return (scenarios,)
154
- if time_dim and not scenario_dim:
155
- return (timesteps,)
101
+ @property
102
+ def coords(self) -> Tuple[pd.DatetimeIndex]:
103
+ return (self.time_series_collection.timesteps,)
156
104
 
157
- raise ValueError(f'Cannot get coordinates with both {scenario_dim=} and {time_dim=}')
105
+ @property
106
+ def coords_extra(self) -> Tuple[pd.DatetimeIndex]:
107
+ return (self.time_series_collection.timesteps_extra,)
158
108
 
159
109
 
160
110
  class Interface:
@@ -353,9 +303,7 @@ class Element(Interface):
353
303
  class Model:
354
304
  """Stores Variables and Constraints."""
355
305
 
356
- def __init__(
357
- self, model: SystemModel, label_of_element: str, label: str = '', label_full: Optional[str] = None
358
- ):
306
+ def __init__(self, model: SystemModel, label_of_element: str, label: str = '', label_full: Optional[str] = None):
359
307
  """
360
308
  Args:
361
309
  model: The SystemModel that is used to create the model.
@@ -499,7 +447,8 @@ class ElementModel(Model):
499
447
 
500
448
  def results_structure(self):
501
449
  return {
502
- 'label': self.label_full,
450
+ 'label': self.label,
451
+ 'label_full': self.label_full,
503
452
  'variables': list(self.variables),
504
453
  'constraints': list(self.constraints),
505
454
  }
@@ -583,12 +532,9 @@ def copy_and_convert_datatypes(data: Any, use_numpy: bool = True, use_element_la
583
532
  return copy_and_convert_datatypes(data.tolist(), use_numpy, use_element_label)
584
533
 
585
534
  elif isinstance(data, TimeSeries):
586
- return copy_and_convert_datatypes(data.selected_data, use_numpy, use_element_label)
535
+ return copy_and_convert_datatypes(data.active_data, use_numpy, use_element_label)
587
536
  elif isinstance(data, TimeSeriesData):
588
537
  return copy_and_convert_datatypes(data.data, use_numpy, use_element_label)
589
- elif isinstance(data, (pd.Series, pd.DataFrame)):
590
- #TODO: This can be improved
591
- return copy_and_convert_datatypes(data.values, use_numpy, use_element_label)
592
538
 
593
539
  elif isinstance(data, Interface):
594
540
  if use_element_label and isinstance(data, Element):
@@ -636,8 +582,6 @@ def get_compact_representation(data: Any, array_threshold: int = 50, decimals: i
636
582
 
637
583
  def normalized_center_of_mass(array: Any) -> float:
638
584
  # position in array (0 bis 1 normiert)
639
- if array.ndim >= 2: # No good way to calculate center of mass for 2D arrays
640
- return np.nan
641
585
  positions = np.linspace(0, 1, len(array)) # weights w_i
642
586
  # mass center
643
587
  if np.sum(array) == 0:
flixopt/utils.py CHANGED
@@ -11,6 +11,15 @@ import xarray as xr
11
11
  logger = logging.getLogger('flixopt')
12
12
 
13
13
 
14
+ def is_number(number_alias: Union[int, float, str]):
15
+ """Returns True is string is a number."""
16
+ try:
17
+ float(number_alias)
18
+ return True
19
+ except ValueError:
20
+ return False
21
+
22
+
14
23
  def round_floats(obj, decimals=2):
15
24
  if isinstance(obj, dict):
16
25
  return {k: round_floats(v, decimals) for k, v in obj.items()}
@@ -18,12 +27,6 @@ def round_floats(obj, decimals=2):
18
27
  return [round_floats(v, decimals) for v in obj]
19
28
  elif isinstance(obj, float):
20
29
  return round(obj, decimals)
21
- elif isinstance(obj, int):
22
- return obj
23
- elif isinstance(obj, np.ndarray):
24
- return np.round(obj, decimals).tolist()
25
- elif isinstance(obj, xr.DataArray):
26
- return obj.round(decimals).values.tolist()
27
30
  return obj
28
31
 
29
32
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flixopt
3
- Version: 2.2.0b0
3
+ Version: 2.2.0rc2
4
4
  Summary: Vector based energy and material flow optimization framework in Python.
5
5
  Author-email: "Chair of Building Energy Systems and Heat Supply, TU Dresden" <peter.stange@tu-dresden.de>, Felix Bumann <felixbumann387@gmail.com>, Felix Panitz <baumbude@googlemail.com>, Peter Stange <peter.stange@tu-dresden.de>
6
6
  Maintainer-email: Felix Bumann <felixbumann387@gmail.com>, Peter Stange <peter.stange@tu-dresden.de>
@@ -22,40 +22,56 @@ Classifier: License :: OSI Approved :: MIT License
22
22
  Requires-Python: >=3.10
23
23
  Description-Content-Type: text/markdown
24
24
  License-File: LICENSE
25
- Requires-Dist: numpy>=1.21.5
26
- Requires-Dist: PyYAML>=6.0
27
- Requires-Dist: linopy>=0.5.1
28
- Requires-Dist: netcdf4>=1.6.1
29
- Requires-Dist: rich>=13.0.1
25
+ Requires-Dist: numpy<3,>=1.21.5
26
+ Requires-Dist: pandas<3,>=2.0.0
27
+ Requires-Dist: linopy<0.5.8,>=0.5.7
28
+ Requires-Dist: netcdf4<2,>=1.6.1
29
+ Requires-Dist: PyYAML<7,>=6.0.0
30
+ Requires-Dist: rich>=13.0.0
31
+ Requires-Dist: tomli>=2.0.1; python_version < "3.11"
30
32
  Requires-Dist: highspy>=1.5.3
31
- Requires-Dist: pandas<3,>=2
32
- Requires-Dist: matplotlib>=3.5.2
33
- Requires-Dist: plotly>=5.15
34
- Requires-Dist: tomli>=2.0.1
35
- Provides-Extra: dev
36
- Requires-Dist: pytest; extra == "dev"
37
- Requires-Dist: ruff; extra == "dev"
38
- Requires-Dist: pyvis==0.3.1; extra == "dev"
39
- Requires-Dist: tsam>=2.3.1; extra == "dev"
40
- Requires-Dist: scipy>=1.15.1; extra == "dev"
41
- Requires-Dist: gurobipy>=10.0; extra == "dev"
33
+ Requires-Dist: matplotlib<4.0.0,>=3.5.2
34
+ Requires-Dist: plotly<6.0.0,>=5.15.0
35
+ Provides-Extra: network-viz
36
+ Requires-Dist: dash>=3.0.0; extra == "network-viz"
37
+ Requires-Dist: dash-cytoscape>=1.0.0; extra == "network-viz"
38
+ Requires-Dist: dash-daq>=0.6.0; extra == "network-viz"
39
+ Requires-Dist: networkx>=3.0.0; extra == "network-viz"
40
+ Requires-Dist: werkzeug>=3.0.0; extra == "network-viz"
42
41
  Provides-Extra: full
43
- Requires-Dist: pyvis==0.3.1; extra == "full"
44
- Requires-Dist: tsam>=2.3.1; extra == "full"
45
- Requires-Dist: scipy>=1.15.1; extra == "full"
46
- Requires-Dist: streamlit>=1.44.0; extra == "full"
47
- Requires-Dist: gurobipy>=10.0; extra == "full"
42
+ Requires-Dist: pyvis==0.3.2; extra == "full"
43
+ Requires-Dist: tsam<3.0.0,>=2.3.1; extra == "full"
44
+ Requires-Dist: scipy<2.0.0,>=1.15.1; extra == "full"
45
+ Requires-Dist: gurobipy>=10.0.0; extra == "full"
46
+ Requires-Dist: dash>=3.0.0; extra == "full"
47
+ Requires-Dist: dash-cytoscape>=1.0.0; extra == "full"
48
+ Requires-Dist: dash-daq>=0.6.0; extra == "full"
49
+ Requires-Dist: networkx>=3.0.0; extra == "full"
50
+ Requires-Dist: werkzeug>=3.0.0; extra == "full"
51
+ Provides-Extra: dev
52
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
53
+ Requires-Dist: ruff>=0.9.0; extra == "dev"
54
+ Requires-Dist: pre-commit>=4.0.0; extra == "dev"
55
+ Requires-Dist: pyvis==0.3.2; extra == "dev"
56
+ Requires-Dist: tsam<3.0.0,>=2.3.1; extra == "dev"
57
+ Requires-Dist: scipy<2.0.0,>=1.15.1; extra == "dev"
58
+ Requires-Dist: gurobipy>=10.0.0; extra == "dev"
59
+ Requires-Dist: dash>=3.0.0; extra == "dev"
60
+ Requires-Dist: dash-cytoscape>=1.0.0; extra == "dev"
61
+ Requires-Dist: dash-daq>=0.6.0; extra == "dev"
62
+ Requires-Dist: networkx>=3.0.0; extra == "dev"
63
+ Requires-Dist: werkzeug>=3.0.0; extra == "dev"
48
64
  Provides-Extra: docs
49
- Requires-Dist: mkdocs-material>=9.0.0; extra == "docs"
50
- Requires-Dist: mkdocstrings-python; extra == "docs"
51
- Requires-Dist: mkdocs-table-reader-plugin; extra == "docs"
52
- Requires-Dist: mkdocs-gen-files; extra == "docs"
53
- Requires-Dist: mkdocs-include-markdown-plugin; extra == "docs"
54
- Requires-Dist: mkdocs-literate-nav; extra == "docs"
55
- Requires-Dist: markdown-include; extra == "docs"
56
- Requires-Dist: pymdown-extensions; extra == "docs"
57
- Requires-Dist: pygments; extra == "docs"
58
- Requires-Dist: mike; extra == "docs"
65
+ Requires-Dist: mkdocs-material<10,>=9.0.0; extra == "docs"
66
+ Requires-Dist: mkdocstrings-python>=1.0.0; extra == "docs"
67
+ Requires-Dist: mkdocs-table-reader-plugin>=2.0.0; extra == "docs"
68
+ Requires-Dist: mkdocs-gen-files>=0.4.0; extra == "docs"
69
+ Requires-Dist: mkdocs-include-markdown-plugin>=6.0.0; extra == "docs"
70
+ Requires-Dist: mkdocs-literate-nav>=0.6.0; extra == "docs"
71
+ Requires-Dist: markdown-include>=0.8.0; extra == "docs"
72
+ Requires-Dist: pymdown-extensions>=10.0.0; extra == "docs"
73
+ Requires-Dist: pygments>=2.14.0; extra == "docs"
74
+ Requires-Dist: mike>=2.0.0; extra == "docs"
59
75
  Dynamic: license-file
60
76
 
61
77
  # FlixOpt: Energy and Material Flow Optimization Framework
@@ -78,7 +94,7 @@ Dynamic: license-file
78
94
 
79
95
  **flixopt** provides a user-friendly interface with options for advanced users.
80
96
 
81
- It was originally developed by [TU Dresden](https://github.com/gewv-tu-dresden) as part of the SMARTBIOGRID project, funded by the German Federal Ministry for Economic Affairs and Energy (FKZ: 03KB159B). Building on the Matlab-based flixOptMat framework (developed in the FAKS project), FlixOpt also incorporates concepts from [oemof/solph](https://github.com/oemof/oemof-solph).
97
+ It was originally developed by [TU Dresden](https://github.com/gewv-tu-dresden) as part of the SMARTBIOGRID project, funded by the German Federal Ministry for Economic Affairs and Energy (FKZ: 03KB159B). Building on the Matlab-based flixOptMat framework (developed in the FAKS project), FlixOpt also incorporates concepts from [oemof/solph](https://github.com/oemof/oemof-solph).
82
98
 
83
99
  ---
84
100
 
@@ -103,7 +119,7 @@ It was originally developed by [TU Dresden](https://github.com/gewv-tu-dresden)
103
119
 
104
120
  - **Calculation Modes**
105
121
  - **Full** - Solve the model with highest accuracy and computational requirements.
106
- - **Segmented** - Speed up solving by using a rolling horizon.
122
+ - **Segmented** - Speed up solving by using a rolling horizon.
107
123
  - **Aggregated** - Speed up solving by identifying typical periods using [TSAM](https://github.com/FZJ-IEK3-VSA/tsam). Suitable for large models.
108
124
 
109
125
  ---
@@ -125,22 +141,27 @@ The documentation is available at [https://flixopt.github.io/flixopt/latest/](ht
125
141
 
126
142
  ---
127
143
 
128
- ## 🛠️ Solver Integration
144
+ ## 🎯️ Solver Integration
129
145
 
130
- By default, FlixOpt uses the open-source solver [HiGHS](https://highs.dev/) which is installed by default. However, it is compatible with additional solvers such as:
146
+ By default, FlixOpt uses the open-source solver [HiGHS](https://highs.dev/) which is installed by default. However, it is compatible with additional solvers such as:
131
147
 
132
- - [Gurobi](https://www.gurobi.com/)
133
- - [CBC](https://github.com/coin-or/Cbc)
148
+ - [Gurobi](https://www.gurobi.com/)
149
+ - [CBC](https://github.com/coin-or/Cbc)
134
150
  - [GLPK](https://www.gnu.org/software/glpk/)
135
151
  - [CPLEX](https://www.ibm.com/analytics/cplex-optimizer)
136
152
 
137
- For detailed licensing and installation instructions, refer to the respective solver documentation.
153
+ For detailed licensing and installation instructions, refer to the respective solver documentation.
154
+
155
+ ---
156
+
157
+ ## 🛠 Development Setup
158
+ Look into our docs for [development setup](https://flixopt.github.io/flixopt/latest/contribute/)
138
159
 
139
160
  ---
140
161
 
141
162
  ## 📖 Citation
142
163
 
143
- If you use FlixOpt in your research or project, please cite the following:
164
+ If you use FlixOpt in your research or project, please cite the following:
144
165
 
145
- - **Main Citation:** [DOI:10.18086/eurosun.2022.04.07](https://doi.org/10.18086/eurosun.2022.04.07)
146
- - **Short Overview:** [DOI:10.13140/RG.2.2.14948.24969](https://doi.org/10.13140/RG.2.2.14948.24969)
166
+ - **Main Citation:** [DOI:10.18086/eurosun.2022.04.07](https://doi.org/10.18086/eurosun.2022.04.07)
167
+ - **Short Overview:** [DOI:10.13140/RG.2.2.14948.24969](https://doi.org/10.13140/RG.2.2.14948.24969)
@@ -0,0 +1,54 @@
1
+ docs/examples/00-Minimal Example.md,sha256=TjtnI8o96YNOCFwRC8BSXFGoVqfB53BtvOG4b29FwkQ,80
2
+ docs/examples/01-Basic Example.md,sha256=sZHonC6A_wtZ2IEy_6BAMY8wViyIcivmcj8GYIZ_qck,78
3
+ docs/examples/02-Complex Example.md,sha256=5cczYkXFpzpQTNp9dkmOEdTXxoWLETKty417q6MyT8s,287
4
+ docs/examples/03-Calculation Modes.md,sha256=FZPBXmrkir6QhQsiXwWp2sOOntIIkODCgh3lVqOrP6w,231
5
+ docs/examples/index.md,sha256=KwXrsxxiHk563bny4I4B2X_CfPNiSXx8TsfI671MLdg,179
6
+ docs/faq/contribute.md,sha256=CL7Z85zyPes1Kl16_8oWLU2RTTbMdPfhmvt4tsnkikU,2508
7
+ docs/faq/index.md,sha256=MH_SPZllm_5npxPP6DHXbJlpLXZc-nbWTFJvMmZYz9Q,50
8
+ docs/images/architecture_flixOpt-pre2.0.0.png,sha256=9RWSA3vys588aadr2437zor-_-xBTQNQ0bAf8xGcu5g,70605
9
+ docs/images/architecture_flixOpt.png,sha256=KjN1bJwESbkHmTW7UsJ7dZyiKZlTO7Dx20dg8KlR1HU,260219
10
+ docs/images/flixopt-icon.svg,sha256=_1a6bk2pDOVEy233LC1nM6jZ35NdzD8Hd3UqGxW1Xpg,135341
11
+ docs/javascripts/mathjax.js,sha256=LJDaO5MM_5W8gI5-S5SiZ17qeMgeoVJO-inMyBNy7UE,402
12
+ docs/user-guide/index.md,sha256=TBO7lk13M95w2A9WiT5asfZn9oU9GZ1O0XW9eUm5GLo,7450
13
+ docs/user-guide/Mathematical Notation/Bus.md,sha256=pqjGa3PZBSmuO4YR44bK21bMmRcWC8dkzP3z0XX-PJw,1613
14
+ "docs/user-guide/Mathematical Notation/Effects, Penalty & Objective.md",sha256=OZnpxhX0R6NpJNP-FJ4g3lXWTRlv-Hhpp484Wits-ZI,5664
15
+ docs/user-guide/Mathematical Notation/Flow.md,sha256=wqUgP_SntSyzcJNxbkxa2TmApqpPaq6GZ_Qk_qcAAlw,1095
16
+ docs/user-guide/Mathematical Notation/LinearConverter.md,sha256=9oFHIA3-QLSOV-QQ3a6je7kcIluJGZH8qtgquf5zieE,1322
17
+ docs/user-guide/Mathematical Notation/Piecewise.md,sha256=GgTQ7dVTTb0lq14GFuuZeGYrUXtMy1wkztJLIVchchw,1993
18
+ docs/user-guide/Mathematical Notation/Storage.md,sha256=Zk5Irnr4bxIqI2KL2wcbAg8PdFDGTxhDFlRrnvjK6Bk,2200
19
+ docs/user-guide/Mathematical Notation/index.md,sha256=2d6k4zbKET1kg7zBt1fEdKsG8jM5j2IIe6yclMTUlDw,1254
20
+ docs/user-guide/Mathematical Notation/others.md,sha256=z6LOzcnvfI-1qQx0Fg7Q6wSK9tAzH2d34KbW4lYNyCE,48
21
+ flixopt/__init__.py,sha256=yW3zslmBnNDYoYTGUq1XkBL7UqpP9O1iDV1d3V00iyM,721
22
+ flixopt/aggregation.py,sha256=xgQu2U5YEbtdDAEMjWiuP9uo_KjhzC95VNmY4ZcSX3I,16939
23
+ flixopt/calculation.py,sha256=pj8nvAG3Vv6NHNyvhU3YbrMDogClFni5CfuJk4631Fw,19914
24
+ flixopt/commons.py,sha256=6exWKBgcWCUjcqolw1kG6Aee4bm_6DF1kTrSUzZbs1M,1353
25
+ flixopt/components.py,sha256=N5_xmhFtOjCJnNl-o_V12lvUxp5tUyuGQRgkUVaNnuk,36868
26
+ flixopt/config.py,sha256=Kt8QYk7hX5qHcQUtfgjM862C6SQr4K2lDvtk_LLER8Y,9085
27
+ flixopt/config.yaml,sha256=imzAnnhcJhIfKNTTXFB5Td7Pvk5ARn5j720k-oGGRug,392
28
+ flixopt/core.py,sha256=vaIBRQE0w9Ro5Xe_jWHKXMLRenSS2P1Tpy9-geTuWcE,38103
29
+ flixopt/effects.py,sha256=7kwZwfv3oRmkzc30kdjeOyB4qnyA9zxsPun1ysQdDxM,16662
30
+ flixopt/elements.py,sha256=S89IykQmXxKTtfNn8HW6fWLdb64UePaY0vaittCAJ2M,28153
31
+ flixopt/features.py,sha256=AI3pW8UbyYLZFDIiPtexmNRkLT7UU-ckmcse9lWRPgw,46263
32
+ flixopt/flow_system.py,sha256=Gowg5k7LWlF6VYRHtrIbKVCKWKMrzlZQtBCfdeEq4jQ,19607
33
+ flixopt/interface.py,sha256=Be3IWcYCLATDCoTliiv6Ky1V_srn1KiCHY3tBriVd_U,22631
34
+ flixopt/io.py,sha256=2QKdtu2-mkzSGBIqHtUcF9UaG32nq9qcIRxZghf1hLw,11284
35
+ flixopt/linear_converters.py,sha256=ej5V_ML_3m1k9HbDnuey6pHEpQtguYkxBXHxWyE9sq0,10936
36
+ flixopt/network_app.py,sha256=oVdARrTDV43H5ZAypJP3dmIL4A9x-Y3ec0zZC5gS8rA,28019
37
+ flixopt/plotting.py,sha256=wUwBSQxxwy1uui-mi2hgj6h__O6EvxCnocIbX0ewpMk,54111
38
+ flixopt/results.py,sha256=GKSZmz0GCuJwspTC8Ot6MOKinvy_mhnDXCafb_f7uVY,35161
39
+ flixopt/solvers.py,sha256=k1bSoiXec3asWED70-erXkgtpn2C8KRBfSZj0FLviSM,2436
40
+ flixopt/structure.py,sha256=CZIz_8UVF56BT4tiDQYzfH4WCR-yaiZHW0--u6olHx4,26281
41
+ flixopt/utils.py,sha256=f-_vFDvvG27-c_VMpzkv3lb79Yny4rvoSmemushbzhU,1687
42
+ flixopt-2.2.0rc2.dist-info/licenses/LICENSE,sha256=HKsZnbrM_3Rvnr_u9cWSG90cBsj5_slaqI_z_qcxnGI,1118
43
+ pics/architecture_flixOpt-pre2.0.0.png,sha256=9RWSA3vys588aadr2437zor-_-xBTQNQ0bAf8xGcu5g,70605
44
+ pics/architecture_flixOpt.png,sha256=KjN1bJwESbkHmTW7UsJ7dZyiKZlTO7Dx20dg8KlR1HU,260219
45
+ pics/flixOpt_plotting.jpg,sha256=zn7ZPAtXm5eRTxtOj86e4-PPhHpCar1jqGh7vMBgQGY,518862
46
+ pics/flixopt-icon.svg,sha256=_1a6bk2pDOVEy233LC1nM6jZ35NdzD8Hd3UqGxW1Xpg,135341
47
+ pics/pics.pptx,sha256=ImWeGGvjtWJ6BGruipsnZYmWtHj5sWdbw1NSFePbkC8,683344
48
+ scripts/extract_release_notes.py,sha256=3UUE4hWhdd2t2m2x0ZpchGP-A0MvfqO2Wc5EdNN-fgE,1249
49
+ scripts/gen_ref_pages.py,sha256=AYRtXyz78x5I_Hn0oRtGVbTxgLLj2QNyRX6vWRefPjc,1960
50
+ tests/ressources/Zeitreihen2020.csv,sha256=kbsDTKZS0iUsNZAS7m3DohzZI_OHHWe44s3GwLvcTLw,1918412
51
+ flixopt-2.2.0rc2.dist-info/METADATA,sha256=OVQsScG4XvEoQVhF3m3qde_FmII3gGFHVRhcwjHklc0,8232
52
+ flixopt-2.2.0rc2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
53
+ flixopt-2.2.0rc2.dist-info/top_level.txt,sha256=DEuo4R1z7GmEp5R3pjbQEJbaPRjKHFvNX2ceiBnVOL0,32
54
+ flixopt-2.2.0rc2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.4.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -0,0 +1,45 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Extract release notes from CHANGELOG.md for a specific version.
4
+ Usage: python extract_release_notes.py <version>
5
+ """
6
+
7
+ import re
8
+ import sys
9
+ from pathlib import Path
10
+
11
+
12
+ def extract_release_notes(version: str) -> str:
13
+ """Extract release notes for a specific version from CHANGELOG.md"""
14
+ changelog_path = Path('CHANGELOG.md')
15
+
16
+ if not changelog_path.exists():
17
+ print('❌ Error: CHANGELOG.md not found', file=sys.stderr)
18
+ sys.exit(1)
19
+
20
+ content = changelog_path.read_text(encoding='utf-8')
21
+
22
+ # Pattern to match version section: ## [2.1.2] - 2025-06-14
23
+ pattern = rf'## \[{re.escape(version)}\] - [^\n]+\n(.*?)(?=\n## \[|\n\[Unreleased\]|\Z)'
24
+ match = re.search(pattern, content, re.DOTALL)
25
+
26
+ if not match:
27
+ print(f"❌ Error: No release notes found for version '{version}'", file=sys.stderr)
28
+ sys.exit(1)
29
+
30
+ return match.group(1).strip()
31
+
32
+
33
+ def main():
34
+ if len(sys.argv) != 2:
35
+ print('Usage: python extract_release_notes.py <version>')
36
+ print('Example: python extract_release_notes.py 2.1.2')
37
+ sys.exit(1)
38
+
39
+ version = sys.argv[1]
40
+ release_notes = extract_release_notes(version)
41
+ print(release_notes)
42
+
43
+
44
+ if __name__ == '__main__':
45
+ main()
@@ -1,32 +0,0 @@
1
- # Release v{version}
2
-
3
- **Release Date:** YYYY-MM-DD
4
-
5
- ## What's New
6
-
7
- * Feature 1 - Description
8
- * Feature 2 - Description
9
-
10
- ## Improvements
11
-
12
- * Improvement 1 - Description
13
- * Improvement 2 - Description
14
-
15
- ## Bug Fixes
16
-
17
- * Fixed issue with X
18
- * Resolved problem with Y
19
-
20
- ## Breaking Changes
21
-
22
- * Change 1 - Migration instructions
23
- * Change 2 - Migration instructions
24
-
25
- ## Deprecations
26
-
27
- * Feature X will be removed in v{next_version}
28
-
29
- ## Dependencies
30
-
31
- * Added dependency X v1.2.3
32
- * Updated dependency Y to v2.0.0
@@ -1,7 +0,0 @@
1
- # Release Notes
2
-
3
- This page provides links to release notes for all versions of flixopt.
4
-
5
- ## Latest Release
6
-
7
- * [v2.0.0](v2.0.0.md) - 29.03.2025 - Migration from pyomo to linopy. Alround improvements in performance and usability
@@ -1,93 +0,0 @@
1
- # Release v2.0.0
2
-
3
- **Release Date:** March 29, 2025
4
-
5
- ## 🚀 Major Framework Changes
6
-
7
- - **Migration from Pyomo to Linopy**: Completely rebuilt the optimization foundation to use Linopy instead of Pyomo
8
- - Significant performance improvements, especially for large models
9
- - Internal useage of linopys mathematical modeling language
10
- - **xarray-Based Data Architecture**: Redesigned data handling to rely on xarray.Dataset throughout the package for:
11
- - Improved solution representation and analysis
12
- - Enhanced time series management
13
- - Consistent serialization across all elements
14
- - Reduced file size and improved performance
15
- - **Saving and restoring unsolved Models**: The FlowSystem is now fully serializable and can be saved to a file.
16
- - Share your work with others by saving the FlowSystem to a file
17
- - Load a FlowSystem from a file to extend or modify your work
18
-
19
- ## 🔧 Key Improvements
20
-
21
- ### Model Handling
22
-
23
- - **Extend every flixopt model with the linopy language**: Add any additional constraint or variable to your flixopt model by using the linopy language.
24
- - **Full Model Export/Import**: As a result of the migration to Linopy, the linopy.Model can be exported before or after the solve.
25
- - **Improved Infeasible Model Handling**: Added better detection and reporting for infeasible optimization models
26
- - **Improved Model Documentation**: Every model can be documented in a .yaml file, containing human readable mathematical formulations of all variables and constraints. THis is used to document every Calculation.
27
-
28
- ### Calculation Results and documentation:
29
- The `CalculationResults` class has been completely redesigned to provide a more streamlined and intuitive interface.
30
- Accessing the results of a Calculation is now as simple as:
31
- ```python
32
- fx.FullCalculation('Sim1', flow_system)
33
- calculation.solve(fx.solvers.HighsSolver())
34
- calculation.results # This object can be entirely saved and reloaded to file without any information loss
35
- ```
36
- This access doesn't change if you save and load the results to a file or use them in your script directly!
37
-
38
- - **Improved Documentation**: The FlowSystem as well as a model Documentation is created for every model run.
39
- - **Results without saving to file**: The results of a Calculation can now be properly accessed without saving the results to a file first.
40
- - **Unified Solution exploration**: Every `Calculation` has a `Calculation.results` attribute, which accesses the solution. This can be saved and reloaded without any information loss.
41
- - **Improved Calculation Results**: The results of a Calculation are now more intuitive and easier to access. The `CalculationResults` class has been completely redesigned to provide a more streamlined and intuitive interface.
42
-
43
- ### Data Management & I/O
44
-
45
- - **Unified Serialization**: Standardized serialization and deserialization across all elements
46
- - **Compression Support**: Added data compression when saving results to reduce file size
47
- - **to_netcdf/from_netcdf Methods**: Added for FlowSystem and other core components
48
-
49
- ### Details
50
- #### TimeSeries Enhancements
51
-
52
- - **xarray Integration**: Redesigned TimeSeries to depend on xr.DataArray
53
- - **datatypes**: Added support for more datatypes, with methods for conversion to TimeSeries
54
- - **Improved TimeSeriesCollection**: Enhanced indexing, representation, and dataset conversion
55
- - **Simplified Time Management**: Removed period concepts and focused on timesteps for more intuitive time handling
56
-
57
- ## 📚 Documentation
58
-
59
- - Improved documentation of the FlixOpt API and mathematical formulations
60
- - **Google Style Docstrings**: Updated all docstrings to Google style format
61
-
62
- ## 🔄 Dependencies
63
-
64
- - **Linopy**: Added as the core dependency replacing Pyomo
65
- - **xarray**: Now a critical dependency for data handling and file I/O
66
- - **netcdf4**: Dependency for fast and efficient file I/O
67
-
68
- ### Dropped Dependencies
69
- - **pyomo**: Replaced by linopy as the modeling language
70
-
71
- ## 📋 Migration Notes
72
-
73
- This version represents a significant architecture change. If you're upgrading:
74
-
75
- - Code that directly accessed Pyomo models will need to be updated to work with Linopy
76
- - Data handling now uses xarray.Dataset throughout, which may require changes in how you interact with results
77
- - The way labels are constructed has changed throughout the system
78
- - The results of calculations are now handled differently, and may require changes in how you access results
79
- - The framework was renamed from flixOpt to flixopt. Use `import flixopt as fx`.
80
-
81
- For complete details, please refer to the full commit history.
82
-
83
- ## Installation
84
-
85
- ```bash
86
- pip install flixopt==2.0.0
87
- ```
88
-
89
- ## Upgrading
90
-
91
- ```bash
92
- pip install --upgrade flixopt
93
- ```
@@ -1,12 +0,0 @@
1
- # Release v2.0.1
2
-
3
- **Release Date:** 2025-04-10
4
-
5
- ## Improvements
6
-
7
- * Add logger warning if relative_minimum is used without on_off_parameters in Flow, as this prevents the flow_rate from switching "OFF"
8
-
9
- ## Bug Fixes
10
-
11
- * Replace "|" with "__" in filenames when saving figures, as "|" can lead to issues on windows
12
- * Fixed a Bug that prevented the load factor from working without InvestmentParameters
@@ -1,31 +0,0 @@
1
- # Release v2.1.0
2
-
3
- **Release Date:** 2025-04-11
4
-
5
- ## Improvements
6
-
7
- * Add logger warning if relative_minimum is used without on_off_parameters in Flow, as this prevents the flow_rate from switching "OFF"
8
- * Python 3.13 support added
9
- * Greatly improved internal testing infrastructure by leveraging linopy's testing framework
10
-
11
- ## Bug Fixes
12
-
13
- * Bugfixing the lower bound of `flow_rate` when using optional investments without OnOffParameters.
14
- * Fixes a Bug that prevented divest effects from working.
15
- * added lower bounds of 0 to two unbounded vars (only numerical better)
16
-
17
- ## Breaking Changes
18
-
19
- * We restructured the modeling of the On/Off state of FLows or Components. This leads to slightly renaming of variables and constraints.
20
-
21
- ### Variable renaming
22
- * "...|consecutive_on_hours" is now "...|ConsecutiveOn|hours"
23
- * "...|consecutive_off_hours" is now "...|ConsecutiveOff|hours"
24
-
25
- ### Constraint renaming
26
- * "...|consecutive_on_hours_con1" is now "...|ConsecutiveOn|con1"
27
- * "...|consecutive_on_hours_con2a" is now "...|ConsecutiveOn|con2a"
28
- * "...|consecutive_on_hours_con2b" is now "...|ConsecutiveOn|con2b"
29
- * "...|consecutive_on_hours_initial" is now "...|ConsecutiveOn|initial"
30
- * "...|consecutive_on_hours_minimum_duration" is now "...|ConsecutiveOn|minimum"
31
- The same goes for "...|consecutive_off..." --> "...|ConsecutiveOff|..."