Skip to content
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

Representative periods with constraint_ratio_out_in_connection_flow causing problems #1139

Open
Mastomaki opened this issue Nov 15, 2024 · 0 comments

Comments

@Mastomaki
Copy link
Contributor

Mastomaki commented Nov 15, 2024

Describe the bug
The constraint constraint_ratio_out_in_connection_flow causes problems when representative periods are used. That is, when the constraint is present in the first place. Often it is removed by _has_simple_fix_ratio_out_in_connection_flow() – in this case I artificially make sure that it will be added by returning false from this function.

What seems to happen when representative periods are used, the function _past_connection_input_flow_indices() produces indices both from the original temporal block associated with a node and the representative period temporal block when the same time slice exists in both. This totally messes up the constraint, producing weird results.

To Reproduce

  • make sure the constraint is added by returning false from _has_simple_fix_ratio_out_in_connection_flow()
  • use the example model in aug_elexia.json

Desktop (please complete the following information):

  • Which SpineOpt version? latest master

suggested fix
Remove temporal_block=anything in call to connection_flow_indices() in _past_connection_input_flow_indices()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant