Skip to content

Typed immutable Network struct mirroring network.rs (replace the JSON-backed view) #2

@samtalki

Description

@samtalki

The minimal accessor surface the ecosystem bridges read is done and shipped for v0.0.1 (PR #9): buses/generators/branches/loads/shunts/storage/hvdc, base_mva, n_buses/n_branches/n_gens, network_name, source_format, reference_bus_id, bus_type_code, over the parsed JSON view. Registration in General is handled by #8 (no longer gated on a JLL).

This issue is the v0.1.0 follow-through: replace the JSON3.Object-backed Network with an immutable struct mirroring powerio/src/network.rs (Bus/Load/Shunt/Branch/Generator/GenCost/Storage/Hvdc, raw MATPOWER units, 1-based ids), add the full accessor surface (branch_table, nodal_demand, …) and a CaseHandle fast path for dense extraction. The C ABI for it is confirmed present in powerio.h: pio_n_* / pio_bus_ids / pio_branches / pio_gens / pio_nodal_demand / pio_nodal_shunt, plus pio_reference_bus / pio_n_components / pio_is_radial. These need a retained handle (the v0.0.1 design frees it after one pio_to_json), so expose the true pio_reference_bus (a dense 0-based index) here — the v0.0.1 reference_bus_id is JSON-derived and returns the 1-based id. CI green on Julia 1.9 + 1.x, Documenter docs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions