-
Notifications
You must be signed in to change notification settings - Fork 19
Add minimum node state constraint #1204
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new constraint to ensure a minimum storage content for nodes in the SpineOpt model. Key changes include the addition of the constraint_min_node_state
, its integration into the SpineOpt workflow, and updates to data preprocessing, variable bounds, testing, and documentation.
Files not reviewed (6)
- src/SpineOpt.jl: Language not supported
- src/constraints/constraint_min_node_state.jl: Language not supported
- src/data_structure/preprocess_data_structure.jl: Language not supported
- src/run_spineopt_basic.jl: Language not supported
- src/variables/variable_node_state.jl: Language not supported
- test/constraints/constraint_node.jl: Language not supported
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1204 +/- ##
==========================================
+ Coverage 87.35% 87.39% +0.04%
==========================================
Files 144 145 +1
Lines 4451 4466 +15
==========================================
+ Hits 3888 3903 +15
Misses 563 563 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
4259bc2
to
09ad40e
Compare
09ad40e
to
1739c50
Compare
This pull request introduces a new constraint,
constraint_min_node_state
, to ensure a minimum storage content for nodes in the SpineOpt model. It includes updates to the codebase, documentation, and tests to support this new functionality. Below are the most important changes grouped by theme:New Constraint Implementation:
constraint_min_node_state
implementation insrc/constraints/constraint_min_node_state.jl
, including the constraint logic, indices, and helper functions. This ensures that thenode_state
variable meets a minimum threshold based on storage capacity andnode_state_min
.Integration into SpineOpt Workflow:
constraint_min_node_state.jl
insrc/SpineOpt.jl
.function _add_constraints!
insrc/run_spineopt_basic.jl
to add the new constraint during the model-building process.Data Preprocessing:
generate_node_state_lower_limit
, insrc/data_structure/preprocess_data_structure.jl
to compute the lower limit fornode_state
based on input parameters.function preprocess_data_structure
to include the generation ofnode_state_lower_limit
.Variable Updates:
function add_variable_node_state!
insrc/variables/variable_node_state.jl
to use the new lower bound functionnode_state_lb
for thenode_state
variable.node_state_lb
insrc/variables/variable_node_state.jl
to calculate the lower bound fornode_state
.Testing:
test_constraint_min_node_state_investments
, intest/constraints/constraint_node.jl
to validate the behavior of the new constraint.Documentation:
docs/src/mathematical_formulation/constraints.md
under the "Minimum node state" section.Fixes #1200
Checklist before merging