Skip to content

Conversation

@cfe316
Copy link
Collaborator

@cfe316 cfe316 commented Jan 28, 2025

Description

Lightly clean up the syntax and some logic in the storage model. This

What type of PR is this? (check all applicable)

  • Feature
  • Bug Fix
  • Documentation Update
  • Code Refactor
  • Performance Improvements

Related Tickets & Documents

n/a

Checklist

  • Code changes are sufficiently documented; i.e. new functions contain docstrings and .md files under /docs/src have been updated if necessary.
  • The latest changes on the target branch have been incorporated, so that any conflicts are taken care of before merging. This can be accomplished either by merging in the target branch (e.g. 'git merge develop') or by rebasing on top of the target branch (e.g. 'git rebase develop'). Please do not hesitate to reach out to the GenX development team if you need help with this.
  • Code has been tested to ensure all functionality works as intended.
  • CHANGELOG.md has been updated (if this is a 'notable' change).
  • I consent to the release of this PR's code under the GNU General Public license.

How this can be tested

Strictly internal change. Should test symmetric, asymmetric, and LDS.

Post-approval checklist for GenX core developers

After the PR is approved

  • Check that the latest changes on the target branch are incorporated, either via merge or rebase
  • Remember to squash and merge if incorporating into develop

@cfe316 cfe316 requested a review from lbonaldo January 28, 2025 21:09
@cfe316 cfe316 force-pushed the cleanupStorage branch 6 times, most recently from 8fb4513 to 8a9f1de Compare January 30, 2025 20:48
@cfe316
Copy link
Collaborator Author

cfe316 commented Jan 30, 2025

I've now tested this on a variant of the example 5_three_zones_w_piecewise_fuel by adding OperationalReserves to the storage resources. As expected the results are identical before and after.

Reduces three possible @constraint calls to one, in a single
higher-level function
Copy link
Collaborator

@lbonaldo lbonaldo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with a couple of minor comments. Great refactoring! Thanks, @cfe316!

@cfe316 cfe316 merged commit 4c653ed into GenXProject:develop Feb 1, 2025
7 checks passed
sambuddhac pushed a commit to sambuddhac/GenX.jl that referenced this pull request Mar 5, 2025
* Access variables directly rather than with EP[:_]

* Eliminate repeated/branching logic

Reduces three possible @constraint calls to one, in a single higher-level function

---------

Co-authored-by: lbonaldo <[email protected]>
sambuddhac pushed a commit to sambuddhac/GenX.jl that referenced this pull request Mar 5, 2025
* Access variables directly rather than with EP[:_]

* Eliminate repeated/branching logic

Reduces three possible @constraint calls to one, in a single higher-level function

---------

Co-authored-by: lbonaldo <[email protected]>
NLaws pushed a commit to NLaws/GenX.jl that referenced this pull request Nov 8, 2025
* Access variables directly rather than with EP[:_]

* Eliminate repeated/branching logic

Reduces three possible @constraint calls to one, in a single higher-level function

---------

Co-authored-by: lbonaldo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants