Skip to content

Preserve bidirectional unit identity in time-sequential ramp inputs - #43

Open
zack-dev-cm wants to merge 1 commit into
UNSW-CEEM:masterfrom
zack-dev-cm:fix/time-sequential-dispatch-identity
Open

zack-dev-cm wants to merge 1 commit into
UNSW-CEEM:masterfrom
zack-dev-cm:fix/time-sequential-dispatch-identity

Conversation

@zack-dev-cm

@zack-dev-cm zack-dev-cm commented Sep 14, 2026 •

Copy link
Copy Markdown

Related to #42 and #39; thanks to tytowatt for identifying the helper and example failures.

Joining prior dispatch to ramp bids on unit alone duplicates generator/load rows, while a stale initial_output produces suffixed columns. Join on (unit, dispatch_type) when available, validate cardinality, and retain authoritative prior output. New units without prior dispatch start at zero; missing ramp values remain available for validation.

The solver regression also establishes the bidirectional-unit contract: both rows need signed net output, generation minus consumption, for the composite ramp constraints. With prior net generation of 4 MW and a 12 MW/hour ramp limit over five minutes, the next bound is 5 MW. Tests cover both signs and crossing zero. Historical unit-level seed output is already net output; single-direction loads retain their positive-consumption convention.

The example passes the three violation costs by keyword, as reported in #42. Scope is limited to the two helpers, their example calls and regressions.

Validation, based on 2d3cef0:

  • Original helpers: 23 failing regression cases and four passing controls, including actual two-interval CBC dispatch.
  • Hosted Python 3.9/pandas 1.5 and Python 3.12/pandas 3: 83 selected offline tests, two helper doctests and 83 installed-wheel tests pass on each without skips. Installed module bytes match the tested source. These runs combine this PR's source with Prevent bundled CBC crashes with CFFI 2.x on Linux #44's dependency metadata.
  • On macOS arm64/Python 3.12.8, all 83 selected tests pass, including the interconnector case.

Linux compatibility: the unchanged upstream interconnector test aborts with CFFI 2.x and passes with 1.17.1. Review the independently scoped #44 first; its installed-wheel checks pass on Python 3.9/3.12. This PR alone retains the existing dependency metadata.

These are contributor-reported results; upstream workflows await approval. Historical cache-dependent benchmarks and complete resolution of #39 are outside the validated scope. The signed-net-output and missing-identity contracts remain explicit review points.

This branch has not been deployed

No deployments
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.

1 participant