Default solver module
OpenSEFA.DefaultSolverModule — Module
Default solution strategy used when calling solve without specifying a solver.
The strategy runs three sequential stages:
- Presolve — simplify the problem via structural reductions (see
PresolveModule). - Starting values — solve the reduced unmeasured-only system with a nonlinear least-squares solver to obtain a good initial point for the optimizer.
- Optimization — solve the full weighted least-squares problem with a nonlinear programming solver (default: Ipopt via
JuMPSolver).
The DefaultSolver struct bundles the starting-values solver, the optimization solver, and a PresolveConfig. The DefaultPipeline and DefaultPipelineAfterPresolve types track intermediate state across the stages.
OpenSEFA.DefaultSolverModule.PresolveStageResult — Type
Collects the outputs of the presolve stage.
OpenSEFA.DefaultSolverModule.StartingReconciliationProblem — Type
Data structure representing the starting values solution of a reconciliation problem.
Measured variables are replaced by their mean values, therefore the starting values problem only contains unmeasured variables.
OpenSEFA.DefaultSolverModule.StartingValuesStageResult — Type
Collects the outputs of the starting values stage.
The starting values problem is the presolved problem (PresolveStageResult.presolve_data.pre) with measured variables substituted by their mean values. Only unmeasured variables remain, and they are solved using a nonlinear least squares solver.
CommonSolve.init — Method
If no solver is provided, dispatch on DefaultSolver.
CommonSolve.init — Method
If no solver is provided, dispatch on DefaultSolver.
OpenSEFA.DefaultSolverModule.find_starting_values! — Function
Find starting values for the problem, where measured variables are replaced by their mean values. Unmeasured variables are solved using a nonlinear least squares solver.
OpenSEFA.DefaultSolverModule.run_optimizer_stage — Method
Run the optimizer stage.
Calls the nonlinear programming solver, with an optional retry using starting values. Returns the updated variables_value, unobservable_variables, and status.
variables_value_base must contain the presolve replacements so that evaluate_score can be computed against the full initial problem.
OpenSEFA.DefaultSolverModule.run_presolve_stage! — Method
Run the presolve stage.
Returns a PresolveStageResult on success, or a ReconciliationSolution if the problem is already fully solved at this stage or the presolver fails.
OpenSEFA.DefaultSolverModule.run_starting_values_stage — Method
Run the starting values stage.
Computes starting values for unmeasured variables and decides whether they can be used directly as the final solution.