pub fn initialize_optimization_state(
problem: &mut Problem,
) -> OptimizerResult<InitializedState>Expand description
Initialize optimization state from problem and initial parameters.
This is the common initialization sequence used by all optimizers:
- Create variables from initial values
- Build variable-to-column index mapping
- Build symbolic sparsity structure for Jacobian (sparse mode only)
- Compute initial cost
The assembly mode is determined by problem.jacobian_mode.
§Unsupported: variable bounds
Problem::set_variable_bounds is validated and stored, but no optimizer
step here enforces it — solving anyway would silently return the
unconstrained answer (see codex/issues/ISSUE-0004-variable-bounds-ignored.md).
Until bounded optimization is implemented, any variable carrying a
non-trivial bound (lower > -inf or upper < inf) is rejected here with
a typed error rather than silently ignored.