Implement tagDifferentiable in PowerElectronics models - #540
Open
alexander-novo wants to merge 9 commits into
Open
Implement tagDifferentiable in PowerElectronics models#540alexander-novo wants to merge 9 commits into
alexander-novo wants to merge 9 commits into
Conversation
nkoukpaizan
requested changes
Aug 19, 2026
nkoukpaizan
left a comment
Collaborator
There was a problem hiding this comment.
Please address the failing test.
nkoukpaizan
reviewed
Aug 23, 2026
nkoukpaizan
left a comment
Collaborator
There was a problem hiding this comment.
A few comments on the code. Should other examples exercise the sysmodel->tagDifferentiable() as well?
Added tags to `Resistor`, which has no internal variables, but still need the appropriate tag size to be set.
Resistor, like MicrogridBusDQ, doesn't have an internal variables, so does not need to set any tags in tagDifferentiable()
Also removed check that isn't necessary anymore due to tag_ being alllocated in allocate()
alexander-novo
force-pushed
the
alex/powerelec-tags
branch
from
August 24, 2026 16:55
e117f29 to
f1fb08c
Compare
nkoukpaizan
self-requested a review
August 24, 2026 18:21
nkoukpaizan
reviewed
Aug 24, 2026
| * \brief Identify differential variables | ||
| */ | ||
| /// There are no internal variables in this component, so \ref tag_ can be set arbitrarily. | ||
| template <class ScalarT, typename IdxT> |
Collaborator
There was a problem hiding this comment.
Is there a particular reason for changing the documentation format from /* ... */ to ///?
Comment on lines
-135
to
+138
| y_ext_ = std::make_unique<const ScalarT*[]>(static_cast<size_t>(size_)); | ||
| yp_ext_ = std::make_unique<const ScalarT*[]>(static_cast<size_t>(size_)); | ||
| f_ext_ = std::make_unique<ScalarT*[]>(static_cast<size_t>(size_)); | ||
| connection_nodes_ = std::make_unique<IdxT[]>(static_cast<size_t>(size_)); | ||
| y_ext_ = std::make_unique<const ScalarT*[]>(static_cast<IdxT>(size_)); | ||
| yp_ext_ = std::make_unique<const ScalarT*[]>(static_cast<IdxT>(size_)); | ||
| f_ext_ = std::make_unique<ScalarT*[]>(static_cast<IdxT>(size_)); | ||
| connection_nodes_ = std::make_unique<IdxT[]>(static_cast<IdxT>(size_)); |
Collaborator
There was a problem hiding this comment.
This needs to be reverted, no?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Implemented
tagDifferentiable()inPowerElectronicsmodels, so that they can be used for scaling testing ofRosenbrock.Proposed changes
Checklist
Put an
xin the boxes that apply. You can also fill these out after creatingthe PR. If you're unsure about any of them, don't hesitate to ask. We're here
to help! This is simply a reminder of what we are going to look for before
merging your code.
-Wall -Wpedantic -Wconversion -Wextra.Further comments