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

[Task] Allow Storage initial condition and periodic boundaries together #369

Open
10 tasks
sobinc1 opened this issue Jun 19, 2024 · 1 comment
Open
10 tasks
Labels
task Feature requests

Comments

@sobinc1
Copy link

sobinc1 commented Jun 19, 2024


Defect Description

Describe the defect

What did you expect to see happen?

The system should stick to the periodic condition for the defined initial storage level as configured in the system settings.

What did you see instead?

During a debug run, an arbitrary initial storage level was detected, which does not comply with the predefined periodic condition constraints.

Do you have a suggested fix for the development team?
 ----> I found adding this script works for it under" if comp.get_interaction().apply_periodic_level:" pyomomodel handler
  initial = self.initial_storage[comp]
  rule = lambda mod, t: prl.periodic_level_rule(comp, level_name, initial, r, mod, t)
  setattr(self.model, periodic_rule_name, pyo.Constraint(self.model.T, rule=rule))

Describe how to Reproduce
Steps to reproduce the behavior:
1.
2.
3.
4.

Screenshots and Input Files
Please attach the input file(s) that generate this error. The simpler the input, the faster we can find the issue.

Platform (please complete the following information):

  • OS: [e.g. iOS]
  • Version: [e.g. 22]
  • Dependencies Installation: [CONDA or PIP]

For Change Control Board: Issue Review

This review should occur before any development is performed as a response to this issue.

  • 1. Is it tagged with a type: defect or task?
  • 2. Is it tagged with a priority: critical, normal or minor?
  • 3. If it will impact requirements or requirements tests, is it tagged with requirements?
  • 4. If it is a defect, can it cause wrong results for users? If so an email needs to be sent to the users.
  • 5. Is a rationale provided? (Such as explaining why the improvement is needed or why current code is wrong.)

For Change Control Board: Issue Closure

This review should occur when the issue is imminently going to be closed.

  • 1. If the issue is a defect, is the defect fixed?
  • 2. If the issue is a defect, is the defect tested for in the regression test system? (If not explain why not.)
  • 3. If the issue can impact users, has an email to the users group been written (the email should specify if the defect impacts stable or master)?
  • 4. If the issue is a defect, does it impact the latest release branch? If yes, is there any issue tagged with release (create if needed)?
  • 5. If the issue is being closed without a pull request, has an explanation of why it is being closed been provided?
@sobinc1 sobinc1 added the defect Something isn't working label Jun 19, 2024
@PaulTalbot-INL
Copy link
Collaborator

PaulTalbot-INL commented Jun 19, 2024

Hi, @sobinc1! This change was the result of work done in #346 , in which we recognized that both allowing periodic boundary conditions and setting the initial level was over-constraining the problem. Because the boundary conditions are an approximation, allowing the initial (and hence final) level of the storage units to fluctuate gives the greatest chance to observe how the storage units could ideally be used within the optimization periods. I believe this is a better modeling representation for most HERON analysis. Analysts can either choose to set an initial level and let the end point vary, or let the start and end point match but not specify the initial level.

If being able to specify both periodic level as well as set the initial stored level is desirable, we can look into the feature request that you suggest here. Let me know what you think.

@PaulTalbot-INL PaulTalbot-INL added task Feature requests and removed defect Something isn't working labels Jun 19, 2024
@PaulTalbot-INL PaulTalbot-INL changed the title [DEFECT] T [Task] Allow Storage initial condition and periodic boundaries together Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task Feature requests
Projects
None yet
Development

No branches or pull requests

2 participants