Skip to content

Conversation

@FBumann
Copy link
Member

@FBumann FBumann commented Apr 11, 2025

See #214 and #222 for details

FBumann added 18 commits March 31, 2025 18:32
* Update core.py to work with another dimension

* Add scenarios to TimeSeries

* Update TimeSeriesCollection

* Update get_numeric_stats() to return values per scenario

* Update repr and str

* Improve stats

* Add utility methods to analyze data

* Move test insto class

* Improve DataConverter

* Improve DataConverter

* Improve conversion and copying

* Improve conversion and copying

* Update tests

* Update test

* Bugfix stats

* Bugfix stored_data.setter

* Improve __str__ of TimeSeries

* Bugfixes

* Add tests

* Temp

* Simplify the TImeSeriesCollection

* Simplify the TImeSeriesCollection

* Add test script

* Improve TImeSeriesAllocator

* Update TimeSeries

* Update TimeSeries

* Update selection

* Renaming

* Update TimeSeriesAllocator

* Update TimeSeriesAllocator

* Update TimeSeriesAllocator

* Update TimeSeriesAllocator

* Update selection

* Improve selection

* Improve validation of Timesteps

* Improve TimeSeries

* Improve TimeSeriesAllocator

* Update calculation and FlowSystem

* rename active_data to selected_data

* Add property

* Improve type hints

* Improve type hints

* Add options to get data without extra timestep

* Rename

* Update tests

* Bugfix for TImeSeriesData to work

* Update calculation.py

* Bugfix

* Improve as_dataset to improve aggregation

* Bugfix

* Update test

* Remove test script

* ruff check

* Revert some renaming

* Bugfix in test
* Update TImeSeries to work with only scenario data

* Get TImeSeriesCollection for  Scenario data without time index

* Simpliefy dataconverter

* Drop support for pandas dataframe and Series for now

* Remove test for pandas

* ruff check

* remove weird file

* Update methods to create timeseries in FLowSystem

* Bugfix

* Add new Datatypes

* Rename NumericData to TimestepData

* Update Datatypes

* Update Datatypes

* Update create_time_series()

* Add dimension data to Piece interfaces

* Update transform_data()

* Modify how time dimension is determined in Piecewise

* Update OnOffParameters

* Update typehints

* Update Flow

* Update Storage

* Update typehints

* Update Storage

* Bugfix

* Bugfix

* Make sure TImeSeries are only created if needed

* Bugfix

* Bugfix

* Bugfix and improve

* Use function to get the coords of the linopy model

* Updae method to determine what coords to use

* Bugfix
* Update ShareAllocationModel

* Update EffectModel

* Update Objective

* Improve float conversion in main results

* Update dims in ShareAllocationModel

* Update dims in ShareAllocationModel

* Specify dimensions for ShareAllocationModel

* Improve logic to get coords

* Bugfix

* Apply a scaling factor to the objective if ycenarios are used

* Bugfix mein results: always as floats and list of floats

* Add scenarios to calculation.py

* Improve timestep indexing.
Now adjust duration for each timestep accordingly to the new index

* Improve validation of Indexes and Bugfix calculate_hours_per_timestep()

* Add example

# Changes:
- change how main results are converted to floats
- Improved logic to get coords for vars and constraints
- Add scaling factor for the objective to have a better scaled model
- Change tilmestep indexing to also update the hours_per_timestep accordingly
- Added minimal example
# Improvements
- Add scenarios to CalculationResults
- Add Scenarios to all plotting options, defaulting to the first scenario available
- Add the scenario to the plot title and filename if scenario is used
- Improve `filter_solution`: Filter by time steps, scenarios and variable dims
- Add options `mode` to `node_balance()` and corresponding plotting methods, to allow to get/plot the flow hours instead of the flow_rate. The plot_pie() always does that
- Improve docstrings in general
Make time to always be the first dimension, improving output and consistency across the code
Add different modes to handle the size per scenario.
* Simplify InvestmentModel

* Add Scenario Weights to the SystemModel
Integrate Pandas datatypes into Conversion and update tests
# Conflicts:
#	flixopt/components.py
#	flixopt/core.py
#	flixopt/elements.py
#	flixopt/features.py
#	flixopt/interface.py
#	tests/test_timeseries.py
@FBumann FBumann mentioned this pull request Apr 11, 2025
FBumann added 11 commits April 11, 2025 17:43
* Add scenarios to io of flow_system.py

* Add test for io of scenarios

* Fix tests and docstrings (#242)

* Bugfix testing fixture

* Bugfix tests and add new tests to check for previous states/flow_rates

* Bugfix tests and add new tests to check for previous states/flow_rates

* Add comment for previous flow_rates

* Add comment for OnOffParameters in Component and LinearConverter

* Bugfix io
* Add tests for scenario calculations
* utility method to get TimeSeries as a DataArray
FBumann added 5 commits April 25, 2025 12:32
* Add methods to track effect shares of components and Flows

* Add option to include flows when retrieving effects

* Add properties and methods to store effect results in a dataset

* Reorder methods

* Rename and improve docs

* Bugfix test class name

* Fix the Network algorithm to calculate the sum of parallel paths, and be independent on nr of nodes and complexity of the network

* Add tests for the newtork chaining and the results of effect shares

* Add methods to check for circular references

* Add test to check for circular references

* Update cycle checker to return the found cycles

* Add checks in results to confirm effects are computed correctly

* BUGFIX: Remove +1 from prior testing

* Add option for grouped bars to plotting.with_plotly() and make lines of stacked bar plots invisible

* Reconstruct FlowSystem in CalculationResults on demand. DEPRECATION in CalculationResults

* ruff check

* Bugfix: save flow_system data, not the flow_system

* Update tests
* Use dataarray instead of dataset

* Change effects dataset to dataarray and use nan when no share was found

* Add method for flow_rates dataset

* Add methods to get flow_rates and flow_hours as datasets

* Rename the dataarrays to the flow

* Preserve index order

* Improve filter_edges_dataset()

* Simplify _create_flow_rates_dataarray()

* Add dataset for sizes of Flows

* Extend results structure to contain flows AND start/end infos

* Add FlowResults Object

* BUGFIX:Typo in _ElementResults.constraints

* Add flows to results of Nodes

* Simplify dataarray creation and improve FlowResults

* Add nice docstrings

* Improve filtering of flow results

* Improve filtering of flow results. Add attribute of component

* Add big dataarray with all variables but indexed

* Revert "Add big dataarray with all variables but indexed"

This reverts commit 08cd8a1.

* Improve filtering method for coords filter and add error handling for restoring the flow system

* Remove unnecessary methods in results .from_json()

* Ensure consistent coord ordering in Effects dataarray

* Rename get_effects_per_component()

* Make effects_per_component() a dataset instead of a dataarray

* Improve backwards compatability
* Deprecate .active_timesteps

* Improve logger warning

* Starting release notes
@FBumann
Copy link
Member Author

FBumann commented Apr 28, 2025

@baumbude @PStange
I would like to release this as v2.2.0
We need to improve the documentation a bit and create the release notes.
And we might need to discuss how the sizes in the Investments are related across scenarios.
But that's about it.

@FBumann FBumann marked this pull request as ready for review May 7, 2025 18:29
@FBumann
Copy link
Member Author

FBumann commented May 7, 2025

@baumbude @PStange
I would like to release this as v2.2.0. We can start with 2.2.0.alpha
We need to improve the documentation a bit and create the release notes.
And we might need to discuss how the sizes in the Investments are related across scenarios.
But that's about it.

FBumann added 4 commits May 13, 2025 11:55
* Catch bug in plot_network with 2D arrays

* Add plot_network() to test_io.py
Run on Release publishing instead of creation
and
only run for stable releases (vx.y.z)
@FBumann
Copy link
Member Author

FBumann commented May 13, 2025

@PStange @baumbude
I released a v2.2.0b0 beta release.
It can be installed via pip install flixopt==2.2.0b0

running pip install flixopt will install the latest stable release (2.1.1)
As soon as the documentation is improved, id like to make it a proper release

@FBumann FBumann mentioned this pull request Jul 2, 2025
@FBumann FBumann added the Not in Focus This seems reasonable, but we are not working on it at the moment. label Sep 23, 2025
@FBumann
Copy link
Member Author

FBumann commented Oct 13, 2025

Closed by #348

@FBumann FBumann closed this Oct 13, 2025
@FBumann FBumann deleted the scenarios/main branch October 13, 2025 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Not in Focus This seems reasonable, but we are not working on it at the moment.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants