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 question | Start here | Continue with |
|---|---|---|
| Which network matrix should I assemble? | Nodal admittance builders | Transformer primitive admittance for device stamps and conventions. |
| Can a variable or equation be eliminated? | Exact substitutions and formulation boundaries | The linked device equations in the OPF reference. |
| How do objective and limit encodings affect the solve? | Objective norms and smoothing | Objective pitfalls and formulation-helper rationale. Private helpers remain contributor interfaces. |
| How are inverter control curves encoded? | Smooth droop encoding | PV 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 question | Start here | Continue with |
|---|---|---|
| Can I change the objective or add a constraint? | Custom formulations | Staged model construction. |
| Can I replace a device formulation and retain result access? | Model extensions and sensitivities | Device replacement and semantic solution access. DiffOpt is not required. |
| Can several periods share constraints and one objective? | Coupled snapshots | Multi-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 updates | The supported parameter-provider and optimizer-reset workflow. |
| How does a solution respond to a small parameter change? | DiffOpt worked example | Local differentiability, active-set and KKT qualifications in the same guide. |
How do I understand numerical behavior?
| Your question | Start here | Continue with |
|---|---|---|
| Which coordinates, bases and starting values are used? | Scaling, initialization and diagnostics | Solver guide for backend choices and settings. |
| What can bounds, initialization or a solver status establish? | Bounds, branches and feasibility | Trusting the solver. |
| What should I record to reproduce an experiment? | Experiment provenance | Record 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.