Examples Overview
This page summarizes the most relevant runnable examples in examples/.
Power flow and network operation
using_links.jlMinimal link workflow (open/close links) and resulting PF behavior.exp_configuration.jlDemonstrates central configuration loading and typed runtime configuration usage.exp_synthetic_tiled_grid_pf_perf.jlSynthetic tiled-grid PF performance example.
Transformer and tap control
tap_control_demo_grid.jlLightweight three-controller demo (OLTC + PST + Schrägregler) usingrun_acpflow(net = ...), central Sparlectra configuration (examples/configuration.yamlorSPARLECTRA_CONFIGURATION_YAML) plus demo-specificexamples/tap_control_demo_grid.yaml, andlatest_control_result(net)for controller rows and trace rows. Optional classic output:SPARLECTRA_TAP_DEMO_CLASSIC=1; optional raw control-result rows:SPARLECTRA_TAP_DEMO_RAW=1.
Voltage-dependent and Q-limit controls
example_voltage_dependent_control_rectangular.jlDemonstrates P(U)/Q(U) behavior with the rectangular solver workflow.example_q_limit_voltage_adjustment.jlShowsqlimit_mode = :adjust_vsetand related run variants.
Reporting and exports
using_netreports.jlBuilds and prints structuredACPFlowReportoutputs.export_solution.jlExports solved network data for downstream usage and writes outputs underexamples/_out/export_solution/....
State estimation
state_estimation_wls.jlBaseline weighted least squares state estimation run.state_estimation_manual_measurements.jlManual measurement setup and estimation workflow.state_estimation_observability.jlObservability-focused scenario and diagnostics.state_estimation_passive_bus_zib_comparison.jlPassive-bus / ZIB handling comparison.usage_state_estimation_diagnostics.jlPractical diagnostics usage workflow.h_matrix_observability_demo.jlMatrix-level observability/redundancy exploration.
Utility / analysis scripts
matpower_import.jlConfigurable MATPOWER import utility script using the centralsrc/configuration.yaml.exampledefaults plus optionalexamples/configuration.yamllocal overrides. Supports logfile-only MATPOWER reference diagnostics, effective configuration logging, and configurable branchSHIFTsign/unit handling for phase-shifter convention checks. The YAML options can also diagnose and choose PV/REF voltage references when MATPOWERBUS.VMvalues differ from generatorGEN.VGsetpoints; usecompare_voltage_reference: imported_setpointto validate against the actual imported PV/REF setpoints, orcompare_voltage_reference: bus_vmto reproduce stored bus-matrix voltages strictly.network_analyzer.jlDeveloper/exploration script for network diagnostics and inspection helpers.visul_chaos.jlDeveloper/exploration stress/visual helper script.
How to run
From repository root:
julia --project=. examples/tap_control_demo_grid.jlGeneral pattern:
julia --project=. examples/<example_name>.jl