Advanced formulations and numerics

Use this section when you need to change how a study is constructed, understand its equation encoding, or investigate numerical behavior. Start with First case and the units tutorial; these advanced routes are optional branches from that basic workflow.

How are the equations represented?

Your questionStart hereContinue with
Which network matrix should I assemble?Nodal admittance buildersTransformer primitive admittance for device stamps and conventions.
Can a variable or equation be eliminated?Exact substitutions and formulation boundariesThe linked device equations in the OPF reference.
How do objective and limit encodings affect the solve?Objective norms and smoothingObjective pitfalls and formulation-helper rationale. Private helpers remain contributor interfaces.
How are inverter control curves encoded?Smooth droop encodingPV control study for the engineering application.

The package's reference OPF uses nonconvex rectangular current–voltage equations. The bounds and feasibility discussion also discusses other formulation families; that discussion does not imply that BMOPFTools ships those relaxations or approximations.

How do I construct a different study?

Your questionStart hereContinue with
Can I change the objective or add a constraint?Custom formulationsStaged model construction.
Can I replace a device formulation and retain result access?Model extensions and sensitivitiesDevice replacement and semantic solution access. DiffOpt is not required.
Can several periods share constraints and one objective?Coupled snapshotsMulti-period construction. This is one joint optimization; an independent time-series sweep does not impose inter-temporal coupling. Storage dynamics remain user-supplied.
Can I update coefficients without rebuilding everything?Repeated solves and parameter updatesThe supported parameter-provider and optimizer-reset workflow.
How does a solution respond to a small parameter change?DiffOpt worked exampleLocal differentiability, active-set and KKT qualifications in the same guide.

How do I understand numerical behavior?

Your questionStart hereContinue with
Which coordinates, bases and starting values are used?Scaling, initialization and diagnosticsSolver guide for backend choices and settings.
What can bounds, initialization or a solver status establish?Bounds, branches and feasibilityTrusting the solver.
What should I record to reproduce an experiment?Experiment provenanceRecord scaling, parameter state and formulation ownership alongside the study inputs and outputs.

For input-data concerns, use How network diagnostics work in Inspect & prepare cases. For a returned solution, start with Trust but verify, then solution projection and power-flow comparison in Verify & diagnose results. The engine validation page describes implementation evidence and its coverage.