-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the flexible temporal resolution implementation #1119
Comments
I think a first step is cataloging any constraints that need to make an assumption or decision about how temporal discontinuitues are to be resolved. Generally, this will be any constraint that involves flow variables from different nodes or timesteps. If we assume for now that discontinuities across timesteps are handled ok, then it's just where flows from different nodes interact. |
Below is a list of all constraints in SpineOpt and their current type, power or energy. The type is determined by whether the constraint has a duration. Some constraints are marked n.a. because they do not involve flex resolution. Also note that nodes do not allow different resolutions, so only the connections and units can have flows of different resolution.
|
A draft summary of the meeting on the topic (05/11/2024), thanks to @tarskul: For flexible time steps we need to:
Some examples:
SpineOpt avoids some of this because it:
So the conflict can only arise in the units/connections. SpineOpt only uses the lowest resolution whenever two flows do come together in an equation. Is this the correct way?
TNO proposes to make the nodes flexible such that the high resolution version can be used in the unit (correct output) and the flexibility can still be used. See attached PDF file FlexRes.pdf |
First change: The constraints for connections between two nodes with different resolutions should be on the highest resolution. This option is the default value for the users.
|
@datejada with the option also to implement the lowest resolution |
Instances of handling different flow resolutions: constraint_ratio_unit_flow:
for (t, path) in t_lowest_resolution_path(
m,
unit_flow_indices(m; unit=u, node=[n1, n2]),
unit_flow_indices(m; unit=u, node=n1, direction=d1),
unit_flow_indices(m; unit=u, node=n2, direction=d2),
units_on_indices(m; unit=u),
)
constraint_ratio_out_in_connection_flow:
for (t, path_out) in t_lowest_resolution_path(
m, connection_flow_indices(m; connection=conn, node=ng_out, direction=direction(:to_node))
)
constraint_user_constraint:
for (t, path) in t_lowest_resolution_path(
m, Iterators.flatten(user_constraint_all_indices(m; user_constraint=uc))
)
constraint_minimum_operating_point:
for (t, path) in t_lowest_resolution_path(
m, unit_flow_indices(m; unit=u, node=ng, direction=d), units_on_indices(m; unit=u)
)
constraint_connection_flow_capacity:
for (t, path) in t_lowest_resolution_path(
m,
connection_flow_indices(m; connection=conn, node=ng, direction=d),
connections_invested_available_indices(m; connection=conn),
)
constraint_candidate_connection_flow_lb:
for (t, path) in t_lowest_resolution_path(
m,
Iterators.flatten(
(
connection_flow_indices(m; connection=conn, node=n, direction=d),
connections_invested_available_indices(m; connection=conn),
)
)
) |
We started with checking the constraint
However, we would like to see the following 2 constraints:
In
We tried
and
Neither are working. So we need to dive deeper with some help. |
@gnawin can you be more specific about what isn't working? |
@gnawin this is a nice start. I see that the function |
Use as a reference the table in the link below to determine the constraints resolutions in SpineOpt:
https://tulipaenergy.github.io/TulipaEnergyModel.jl/dev/30-concepts/#flex-time-res
Consider the following points:
Constraints:
fix_ratio_out_in_connection_flow
#1146The text was updated successfully, but these errors were encountered: