Skip to content

fixes to documentation#1697

Merged
jd-lara merged 1 commit into
jb/documentation-updatesfrom
jdl/pr1635-review-fixes
Jun 12, 2026
Merged

fixes to documentation#1697
jd-lara merged 1 commit into
jb/documentation-updatesfrom
jdl/pr1635-review-fixes

Conversation

@jd-lara

@jd-lara jd-lara commented Jun 11, 2026

Copy link
Copy Markdown
Member

Changes from Fable review of #1635.

Correctness fixes (would mislead users or error if run)

  • how_to/convert_transformer_impedance.md: the example transformer's rating was set as 0.5 labeled "SYSTEM_BASE p.u." — rating is stored on the device base, so the example silently encoded 25 MVA instead of 50 MVA. Now rating = 1.0 on the device base.
  • how_to/use_context_managers.md: the begin_supplemental_attributes_update example constructed FixedForcedOutage(; mean_time_to_recovery, mean_time_to_failure) — neither field exists on that struct. Replaced with a valid GeometricDistributionForcedOutage example.
  • how_to/link_hydro_reservoirs_to_turbines.md: example 2 rebuilt sys/bus from scratch but then linked the reservoir from the discarded first system. The page now uses one System throughout.

Math / semantics precision

  • per_unit.md + convert_transformer_impedance.md: getters apply only the MVA-ratio part of the base conversion; added an explicit warning that the voltage-ratio correction is assumed to be 1 (rated voltage = bus base voltage) and must otherwise be applied manually.
  • three_winding_transformers.md: $Z_{12}, Z_{23}, Z_{13}$ are the pairwise (delta) leakage impedances, not the star impedances; corrected PSS/E field semantics (CZ/CW/CM flags, WINDV/NOMV/ANG/SBASE1-2 field names verified against the PTI parser).
  • Docstring fixes where the text contradicted the code directly beneath it:
    • get_component(sys, uuid) / get_available_component(sys, uuid) throw ArgumentError on a missing UUID (they do not return nothing)
    • add_subsystem! throws IS.InvalidValue when subsystems would exceed the bus count
    • Storage's only concrete subtype is EnergyReservoirStorage (HybridSystem is a StaticInjectionSubsystem)
    • get_services errors (not "returns empty") for devices that don't support services
    • All three outage struct docstring signatures now include the monitored_components field
    • calculate_IM_torque_params: A is the quadratic and B the linear torque-speed term (C = 1 − A − B is the constant)
    • rating_b/rating_c are second/third ratings (RATE_B/RATE_C), not winding sides
    • get_from_bus/get_to_bus return Bus (DC branches have DCBus endpoints)
    • Service subtype list now includes ConstantReserveGroup; ImportExportCost weekly_limitsweekly_limit typos; backtick/apostrophe typos in cost_function_timeseries.jl
    • get_associated_supplemental_attributes docstring signature and example matched to the actual function
  • Glossary: filled the empty DERA1 entry, fixed the doubled REPCA1 label, and corrected the claim that ExponentialLoad is a ZIP model.
  • buses_type_explanation.md: removed a garbled duplicated sentence and fixed Ref:REF.

Verbosity reduction (~190 net lines)

  • use_context_managers.md: removed duplicated/incorrect supplemental-attribute examples (now links to the dedicated how-to), the near-clone time-series example, and the redundant "Best Practices" section.
  • Deleted orphaned explanation/transformer_per_unit_models.md (content verbatim in per_unit.md and the page was dropped from nav); retargeted the two @ref transformers_pu links to transformers_pu_per_unit.
  • power_concepts.md: collapsed the triple statement of units/getters into the summary table.
  • supplemental_attributes.md: merged the "Benefits" and "Compared to other approaches" sections into the motivation paragraph.
  • add_supplemental_attributes.md: merged the near-identical bulk and shared-attribute examples.
  • time_series.md: the "Multiple Forecast Intervals" code blocks duplicated the tutorial call-for-call; kept the concept, linked the tutorial.
  • working_with_time_series.jl: trimmed the re-inspection tail that re-printed components and re-explained an earlier point.
  • manipulating_datasets.jl: dot-access warning now links to @ref dot_access instead of duplicating system.md (and drops the hardcoded stable URL).
  • dynamic_data.md: deduplicated the static/dynamic two-layer explanation.

Verification

  • julia --project=test test/runtests.jl: 11735/11735 pass
  • Formatter run clean
  • Docs build: all errors are pre-existing/environmental — failed InterLinks inventory download in the sandbox plus the known dependency on Flesh out 1-line docstrings for key types InfrastructureSystems.jl#584 (ComponentContainer, InfrastructureSystemsComponent, InfrastructureSystemsInternal fallbacks). No errors from files changed here; all modified @example blocks execute.

Not addressed (pre-existing, out of scope for a docs PR)

  • The power_system_structs.json descriptor comments for Transformer2W r/x/rating still say "pu (SYSTEM_BASE)" while runtime behavior (and the new docs) are device base — needs a descriptor + regeneration pass.
  • HybridSystem.jl setters set_electric_load!/set_storage!/set_renewable_unit!/set_interconnection_efficiency! reference an undefined variable and would UndefVarError if called — behavioral bug, should be a separate issue/PR.

🤖 Generated with Claude Code

@jd-lara jd-lara requested a review from kdayday June 11, 2026 23:03
## The "Starbus" Representation

The resulting $Z_{12}, Z_{23},$ and $Z_{13}$ represent the series impedances in a star network. The common point of this star network is the conceptual "starbus" or internal neutral node. Each winding's terminal in the power system network is then connected to its corresponding impedance in this equivalent star.
The measured pairwise leakage impedances $Z_{12}, Z_{23},$ and $Z_{13}$ between each pair of windings are converted into the equivalent star impedances $Z_1, Z_2,$ and $Z_3$. The common point of this star network is the conceptual "starbus" or internal neutral node. Each winding's terminal in the power system network is then connected to its corresponding impedance in this equivalent star.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@jd-lara I leave this to you to verify correctness on this point

@kdayday kdayday left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Left one question for you on rework of the starbus page, otherwise looks good to me

@jd-lara jd-lara merged commit 55195d4 into jb/documentation-updates Jun 12, 2026
10 checks passed
@jd-lara jd-lara deleted the jdl/pr1635-review-fixes branch June 12, 2026 01:37
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.

2 participants