Skip to content
Discussion options

You must be logged in to vote

In 7.x, clustering delegates to tsam_xarray, and the original vs clustered data lives on fs_clustered.clustering.aggregation_result (available before saving). Both profiles are on the original time axis and cover all clustered variables. flixopt bundles the .plotly accessor (xarray_plotly), so a faceted compare plot is a one-liner — stack original/clustered onto a profile dim, then plot:

import xarray as xr

agg = fs_clustered.clustering.aggregation_result
(
    xr.Dataset({'original': agg.original, 'clustered': agg.reconstructed})
    .to_dataarray(dim='profile')
    .plotly.line(x='time', color='profile', facet_row='variable')
    .update_yaxes(matches=None)   # variables have differen…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@FBumann
Comment options

@lienertajun-glitch
Comment options

Answer selected by FBumann
@FBumann
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants