Skip to content

Refactor Tgov1 model: new parameter parsing, safe valve logic#195

Merged
pelesh merged 13 commits intodevelopfrom
wiktoria_zielinska-tgov_refactor
Jul 24, 2025
Merged

Refactor Tgov1 model: new parameter parsing, safe valve logic#195
pelesh merged 13 commits intodevelopfrom
wiktoria_zielinska-tgov_refactor

Conversation

@WiktoriaZielinskaORNL
Copy link
Copy Markdown
Contributor

@WiktoriaZielinskaORNL WiktoriaZielinskaORNL commented Jul 23, 2025

Description

This PR refactors the Tgov1 governor model in GridKit to improve code clarity, parameter handling, and testability.
Changes include:
Parameter parsing is now cleanly handled through Tgov1Data, consistent with other models.

Closes: #176

Proposed changes

Refactored Tgov1.cpp and Tgov1.hpp to use parameter maps from Tgov1Data.

Checklist

  • All tests pass. - Test 13 does not pass and is an unrelated issue.
  • Code compiles cleanly with flags -Wall -Wpedantic -Wconversion -Wextra.
  • The new code follows GridKit™ style guidelines.
  • There are unit tests for the new code.
  • The new code is documented.
  • The feature branch is rebased with respect to the target branch.

Copy link
Copy Markdown
Collaborator

@shakedregev shakedregev left a comment

Choose a reason for hiding this comment

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

This looks good. I was not able to build myself because of constantly evolving dependencies, but I witnessed the tests passing on Wiktoria's machine. Note that test 13 is failing unrelatedly.

Comment thread examples/PhasorDynamics/Tiny/TwoBus/Tgov1/TwoBusTgov1.cpp Outdated
@pelesh pelesh requested a review from superwhiskers July 23, 2025 17:00
@shakedregev shakedregev marked this pull request as ready for review July 23, 2025 17:01
Comment thread src/Model/PhasorDynamics/Governor/Tgov1/Tgov1.cpp
@pelesh pelesh requested review from lukelowry and removed request for superwhiskers July 23, 2025 17:37
@WiktoriaZielinskaORNL WiktoriaZielinskaORNL changed the title Adding new files that we changed Refactor Tgov1 model: new parameter parsing, safe valve logic Jul 23, 2025
@shakedregev
Copy link
Copy Markdown
Collaborator

I was able to run this successfully.

Copy link
Copy Markdown
Collaborator

@superwhiskers superwhiskers left a comment

Choose a reason for hiding this comment

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

i don't see anything wrong with this. once this one comment is addressed, this can be merged.

Comment thread examples/PhasorDynamics/Tiny/TwoBus/Tgov1/TwoBusTgov1.cpp Outdated
@pelesh pelesh force-pushed the wiktoria_zielinska-tgov_refactor branch from caa9f4d to ac53335 Compare July 24, 2025 01:50
@pelesh pelesh merged commit 49ffd8a into develop Jul 24, 2025
4 checks passed
@pelesh pelesh deleted the wiktoria_zielinska-tgov_refactor branch July 24, 2025 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extend the json parser to add governor components Tgov1 as needed

4 participants