Skip to content

Fix ramp parsing and GENRAMP indexing in TCOPFLOW - #62

Merged
pelesh merged 5 commits into
ORNL:developfrom
willagrace:willa/tcopf-bug-fix
Aug 13, 2026
Merged

Fix ramp parsing and GENRAMP indexing in TCOPFLOW#62
pelesh merged 5 commits into
ORNL:developfrom
willagrace:willa/tcopf-bug-fix

Conversation

@willagrace

@willagrace willagrace commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Merge request type

  • New feature
  • Resolves bug
  • Documentation
  • Other

Relates to

  • OPFLOW
  • SOPFLOW
  • SCOPFLOW
  • TCOPFLOW
  • CMake build system
  • Spack configuration
  • Manual
  • Web docs
  • Other

This MR updates

  • Header files
  • Source code
  • CMake build system
  • Spack configuration
  • Web docs
  • Manual
  • Other

Summary

This PR fixes two ramp related issues in TCOPFLOW.

Issue 1 (psreaddata.cpp):
Previously, generator ramp values were overwritten by fuel type defaults in TCOPFLOW. The updated logic only applies fuel-based default ramp rates when the corresponding MATPOWER ramp-rate value is unspecified.

Issue 2 (genramp.cpp):
Previously, some generators were not actually constrained by TCOPFLOW ramp-coupling constraints.
The previous implementation computed generator Pg locations by using PSBUSGetVariableLocation and adding 2 to the index to skip Va and Vm. This approach worked on the first generator, but failed otherwise. The fix uses each generator's stored active-power locations directly (startxpowloc and startxpowlocglob), so each active generator gets its own correct ramp constraint and Jacobian entries.

@willagrace willagrace changed the title Preserve MATPOWER generator ramp rates Fix ramp parsing and GENRAMP indexing in TCOPFLOW Jun 30, 2026
Comment thread src/ps/psreaddata.cpp Outdated

@pelesh pelesh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Not scaling ramp rates by the generator MVA base may be a bug.

The code needs to be documented better. Please insert comments describing what the code does (or what is the intention behind the code).

Comment thread src/ps/psreaddata.cpp Outdated
Comment thread src/ps/psreaddata.cpp Outdated
Comment thread src/tcopflow/model/genramp/genramp.cpp
@pelesh pelesh added bug Something isn't working tcopflow Related to multiperiod optimal power flow. labels Jul 6, 2026
@pelesh pelesh added this to the Release 2.1 milestone Jul 6, 2026
@pelesh
pelesh merged commit 0f51db0 into ORNL:develop Aug 13, 2026
1 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working tcopflow Related to multiperiod optimal power flow.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants