You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the existing issues and confirmed this feature doesn't already exist.
I have checked the documentation to ensure this feature isn't already available.
Is your feature request related to a problem?
At the moment I'm not able to model the piecewise (in reality non-linear) relationships between flows and effects.
Describe the solution you'd like
I would like to use PiecewiseEffects in Flow: flixopt.Flow( ... , effects_per_flow_hour=flixopt.PiecewiseEffects( ... ))
Energy System Use Case
I try to implement pressure losses for transmission objects on a very simplified basis. The pressure loss of a pipe is non-linear in respect to the flow in the pipe. To represent the pressure loss more precisely, I would like to use PiecewiseEffects.
Desired Code Example (optional)
# example with pressure losses, which my_effect takes into accountmy_piecewise_effect=fx.PiecewiseEffects(
piecewise_origin=fx.Piecewise(flow_list),
piecewise_shares={my_effect.label: fx.Piecewise(pressure_loss_list)},
)
flixopt.Flow( ... , effects_per_flow_hour=my_piecewise_effect)
@JonaGL Thanks for your request.
We will work on this.
It might also be possible to use a linear Transformer with fx.PiecewiseConversioninstead.
This would lead to the losses being accounted for in a Flow (with a connected Bus and Sink probably), instead of an Effect.
You should be able to achieve what you are looking for while we work on a more elegant solution.
If you have any Questions on this don't hesitate to ask here.
Activity
FBumann commentedon Sep 4, 2025
@JonaGL Thanks for your request.
We will work on this.
It might also be possible to use a linear Transformer with
fx.PiecewiseConversioninstead.This would lead to the losses being accounted for in a Flow (with a connected Bus and Sink probably), instead of an Effect.
You should be able to achieve what you are looking for while we work on a more elegant solution.
If you have any Questions on this don't hesitate to ask here.
FBumann commentedon Sep 10, 2025
@JonaGL I will try to solve this on Friday. I can't promise that I'll finish it, but ill keep you updated.
JonaGL commentedon Sep 11, 2025
@FBumann Thanks a lot!
FBumann commentedon Sep 18, 2025
@JonaGL i hope you got the news #310 (comment)