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

missing history time indices for units_on variable in constraint_unit_state_transition with representative temporal structure #1018

Open
nnhjy opened this issue May 22, 2024 · 1 comment
Labels
Type: bug Something isn't working as expected

Comments

@nnhjy
Copy link
Collaborator

nnhjy commented May 22, 2024

constraint_unit_state_transition (and some other similar constraints) needs a units_on variable with t_before time slice that could go beyond the variable's time indices at the beginning of a model horizon. With ordinary temporal structures, this missing index will be generated when adding the variable. However, when a representative temporal structure is used, the t_before at the beginning of a model is missing.

This DB test.zip would reproduce the error.

PR #1015 attempts to fix this. There seem to be 2 directions:

  1. cut the pair of (t_before, t_after) that contains a "history" t_before for constraint_unit_state_transition when units_on uses representative temporal blocks
  2. ensure the variable available for the corresponding "history" time indices

This issue could be generic for variables defined by "non-dynamic" time indices and used in constraints defined by "dynamic" time indices (e.g. units_invested as to constraint_unit_investment_transition). But fortunately, those other cases seem unlikely for representative temporal blocks.

@clizbe clizbe added Zone: model implementation How the formulation is implemented in code Type: new feature Add something that doesn't exist yet labels May 28, 2024
@nnhjy nnhjy added Type: bug Something isn't working as expected and removed Zone: model implementation How the formulation is implemented in code Type: new feature Add something that doesn't exist yet labels May 28, 2024
@nnhjy
Copy link
Collaborator Author

nnhjy commented May 28, 2024

@manuelma

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

2 participants