Follow PowerSystems #1783 and the OpenAPI 1.x structs so the suite builds again - #301
Merged
Merged
Conversation
…ilds again PowerSystems #1783 replaced must_run with commitment_mode and the Bool status with OperationalStates, and left no shim. The feedforwards' _is_must_run trait moves to utils/psy_utils.jl and reads commitment_mode == MUST_RUN for ThermalGen and HydroPumpTurbine (false for anything else, so SELF_SCHEDULED and RELIABILITY stay committable); is_online reads status as ONLINE or STARTUP. The 23 must-run sites and the eleven Bool status reads go through them, as do the test utilities' duration checks, and IOM.get_must_run forwards to the trait for IOM's own start-up and ramp code. SwitchedAdmittance lost its Y field: the shunt model spans the blocks and takes solved_admittance, else the engaged blocks, as the fixed susceptance. FixValueParameter metas were string(::Type), which carries the module prefix in the test workers now that the variable types live in IOM; the four sites use nameof like the other feedforward metas. Tests construct with the enums and the current shunt fields, wrap their HVDC and converter losses in LossCurve on the component base the readers documented, and the FACTS shunt test asks for BYP instead of a nothing mode the OpenAPI 0.1.0 schema cannot encode. The test environment pins InfrastructureOptimizationModels to rh/cost_coefficient_ratio (IOM #166) until it merges: IOM main still calls the convert_cost_coefficient signature InfrastructureSystems removed.
rodrigomha
force-pushed
the
rh/openapi_1x_status_enums
branch
from
September 14, 2026 17:58
08b3349 to
2e47663
Compare
jd-lara
self-requested a review
September 14, 2026 20:40
jd-lara
approved these changes
Sep 14, 2026
rodrigomha
added a commit
that referenced
this pull request
Sep 14, 2026
… the OpenAPI 1.x line Brings main and the #1783 repair (#301) to the market-models branch and moves every environment to the 1.x line: InfrastructureSystems IS4, PowerSystems jd/openapi-1x (with #1795), the PowerOpenAPIModels subpackages on main, PowerSystemCaseBuilder, PowerFlowFileParser and PowerTableDataParser on jd/openapi-1x. Two pins stay temporary: IOM rh/market_models_1x (jd/market_models2 plus main, IOM #167) until that merge lands, and PowerFlows jd/openapi-1x-pins (#449) for the LossCurve reader. Conflicts: the template gains both new fields (market_model, events) and both validation blocks (the market network check, the outage-event discovery); the IOM.get_must_run forwarder in market_bid_plumbing.jl goes, since the repair implements it on the _is_must_run trait in psy_utils.jl; the pin files take the 1.x side.
rodrigomha
added a commit
that referenced
this pull request
Sep 14, 2026
… the OpenAPI 1.x line Brings main and the #1783 repair (#301) to the market-models branch and moves every environment to the 1.x line: InfrastructureSystems IS4, PowerSystems jd/openapi-1x (with #1795), the PowerOpenAPIModels subpackages on main, PowerSystemCaseBuilder, PowerFlowFileParser and PowerTableDataParser on jd/openapi-1x. Two pins stay temporary: IOM rh/market_models_1x (jd/market_models2 plus main, IOM #167) until that merge lands, and PowerFlows jd/openapi-1x-pins (#449) for the LossCurve reader. Conflicts: the template gains both new fields (market_model, events) and both validation blocks (the market network check, the outage-event discovery); the IOM.get_must_run forwarder in market_bid_plumbing.jl goes, since the repair implements it on the _is_must_run trait in psy_utils.jl; the pin files take the 1.x side.
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.
Repairs the test suite on the OpenAPI.jl 1.x pins (#300), which stopped at PowerSystems #1783:
must_runbecamecommitment_mode::CommitmentModesandstatus::BoolbecameOperationalStates, with no shim. The ubuntu job of #300 ended with 454get_must_runerrors, 29status is an OperationalStates valueerrors, 64 cost-coefficient method errors and 8SwitchedAdmittanceconstructor errors.Two predicates, one meaning each
_is_must_run, the dispatch trait the feedforwards already had, moves toutils/psy_utils.jl, next to the other PowerSystems helpers, and readscommitment_mode == MUST_RUNforThermalGenandHydroPumpTurbine,falsefor anything else. The 23PSY.get_must_runcall sites go through it, andIOM.get_must_run(c::PSY.Component) = _is_must_run(c)sits next to it as the one forwarder IOM's start-up and ramp code needs; nothing is left in the feedforward or market-bid files.SELF_SCHEDULEDandRELIABILITYstay committable units, the same asmust_run = falsebefore; widening that is a modeling decision for a separate PR.HydroTurbinenow carriescommitment_modetoo but had nomust_runbefore, so it keeps the fallback.is_online(d):statusisONLINEorSTARTUP. The eleven initial-condition defaults, the stored-value duration checks and theOnVariablewarm start read it instead of the Bool. A unit inSTARTUPcounts as on,SHUTDOWNas off, andtime_at_statusfollows that split.Switched shunts
PowerSystems dropped
SwitchedAdmittance.Y; the state isnumber_engagedandY_increase, overridden bysolved_admittance(PSS/E BINIT) when set._shunt_susceptance_limitsis the span the blocks can reach and_fixed_shunt_susceptanceis the engaged susceptance,solved_admittancefirst. The tests construct with the current fields and cover the override.Tests
set_must_run!becomesset_commitment_mode!, the sevenstatus = trueconstructors and oneset_status!take the enum, andtest_device_reserve_offersreads the IOM predicate. The FACTS shunt test asked forcontrol_mode = nothing, which PowerSystems still accepts but the OpenAPI 0.1.0 schema cannot encode, so the system export insidesolve!failed; it now usesBYP, which leaves Q free the same way. That PowerSystems/schema disagreement is worth an upstream issue.Fix-value parameter meta
FixValueParametercontainers were stored under"$U"and read back under"$var_type":string(::Type)carries the module prefix whenever the type is not visible fromMain, so the key becameInfrastructureOptimizationModels.ActivePowerVariablein the test workers once the variable types moved to IOM, and the tests'nameoflookups missed. Both write sites and both read sites usenameofnow, like every other feedforward meta in POM. PowerSimulations addresses that parameter by key, not by rebuilding the string.Loss curves in the tests
PowerSystems types HVDC and converter losses as
LossCurve{T, U}and rejects a bareLinearCurve; the 31 test constructions wrap their curves inLossCurve(curve, SU), which is the base the readers assumed for a bare curve, so the numbers are unchanged. The test utilities' duration checks readPOM.is_onlineinstead of the Bool status.Cost coefficients
The 64
convert_cost_coefficienterrors come from IOM calling a signature IS4 removed on 2026-09-01. InfrastructureOptimizationModels #166 fixes that;test/Project.tomlpins its branch until it merges.Upstream pieces this PR pins
None of these is POM's to fix; each is pinned from the test environment until it lands.
LossCurveon the component base, and rebuilds every imported loss on natural units, guards left from before the schemas had aLossCurvewithpower_units(SiennaSchemas Construct Device is a Runtime call #39, Consolidate approach to models with RHS time series. #43). PowerSystems #1795 intojd/openapi-1xlifts both; it clears the 55cannot export a LossCurve in CUfailures here once that branch carries it.psy6evaluates an HVDC loss with_eval_loss_function(::LossCurve{LinearCurve, NaturalUnit}, ::Float64), which has no method; PowerFlowsjd/openapi-1x-pins(#449) already evaluates aLossCurveon its own base, so the test environment pins that branch until it merges intopsy6.Source.base_voltageand the ThreeWindingTransformer pairwise block asnullwhen unstated, which the schema rejects; PowerSystems #1795's second commit omits them instead (_optional_to_wire), clearingtest_tap_control,test_device_branch_constructorsandtest_device_source_constructors.jd/openapi-1x-pins) return to their base branches as each merges.Results
Local full suite on the pinned stack (PowerSystems
jd/openapi-1xat ccf7889, IS4 7b14e88, OpenAPI modelsmain387fba3, IOM #166), Julia 1.12:get_must_run, 64 cost coefficient, 29 Bool status, 8 shunt, 4set_must_run!2e47663)jd/openapi-1x-pinsWith PowerSystems #1795 and PowerFlows
jd/openapi-1x-pins, both pinned fromtest/Project.tomlas temporary pins alongside IOM #166, the suite passes in full. Without it, 11 files fail, every one on the "Left for upstream" list: 55cannot export a LossCurve in CU, 20 PowerFlows_eval_loss_function, the same 9 schema failures, the solver-status assertions that follow a failed export, and one PowerSystemCaseBuilder document (sys10_pjm_ac_dc) that names atime_series.h5sidecar its serialized cache does not contain.🤖 Generated with Claude Code
https://claude.ai/code/session_01XgUkJVy9F23R3G5F8XFaLj