Skip to content

Latest commit

 

History

132 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SIP

SIP is a sparse interior point solver for nonlinear optimization problems of the form

$$ \begin{aligned} \min_x \quad & f(x) \\ \textrm{s.t.}\quad & c(x) = 0, \\ & g(x) \leq 0, \\ & l \leq x \leq u. \end{aligned} $$

Internally, SIP introduces positive slack variables and solves the equivalent system

$$ c(x) = 0, \qquad g(x) + s = 0, \qquad s > 0. $$

The functions $f$, $c$, and $g$ are required to be continuously differentiable. The user provides callbacks for model evaluation, matrix-vector products, and a linear solver for the Newton-KKT systems.

Documentation

Documentation is available at sip-docs.readthedocs.io.

Examples

Examples and solver integrations are maintained in:

Scaling and termination

Input::Scaling describes the coordinate transformation applied by the caller:

f_model    = objective     * f_original
x_model[j] = variable[j]   * x_original[j]
c_model[i] = equality[i]   * c_original[i]
g_model[i] = inequality[i] * g_original[i]

All scales must be finite and positive. objective defaults to 1. The arrays remain caller-owned and must be supplied for nonzero dimensions; an unscaled model supplies unit arrays. SIP reports scalar residuals and applies convergence tolerances in original coordinates, including complementarity s*z/objective. The termination callback's objective and vector fields remain in model coordinates. Its primal scalar includes g+s, while the output's primal scalar measures actual constraint violation. The barrier progress test uses model coordinates.

To migrate from Input::ResidualScaling, replace residual_scaling with scaling, supply objective, and use the former variable_bound array for variable. Remove dual: its previous meaning was objective/variable, so it must not simply be renamed to variable.

settings.termination.dual_residual_s_max enables an optional relative stationarity test. Zero, the default, preserves the absolute test. A positive value divides stationarity by max(1, mean(abs(multipliers))/s_max), including equality, inequality, and native-bound multipliers. Termination uses original-coordinate multipliers; barrier progress uses model-coordinate multipliers. For example, s_max=100 leaves the test unchanged below a mean multiplier magnitude of 100 and relaxes it above that value. The output and custom termination callback still receive the raw stationarity residual. Custom termination callbacks retain control of their own convergence criteria.

Timeouts

An optional Input::timeout_callback is polled at iteration boundaries, after computing a direction, and after trial and derivative evaluations inside line search. Returning true stops the solve with TIMEOUT, preserving the last accepted variables and their reported residuals without another model evaluation. Polling cannot interrupt a callback already executing. The same checks apply when line search is skipped; an empty callback disables timeouts.

Initial model values

Set Input::initial_model_is_current=true when the caller's cached objective and constraint values already match workspace.vars.x and the current problem data. The default is false. SIP still makes the initial model callback, with new_x=false, new_y=new_z=true, and need_derivatives=true. This lets the callback reuse values while ensuring gradients, Jacobians, and the multiplier-dependent Hessian are current. Caller-provided slacks are preserved.

The flag does not create a cache; callbacks decide what to reuse. After a trial timeout, the model cache can describe the last trial rather than the returned point. Refresh it at the returned point before asserting that it is current on a subsequent solve.

About

Sparse Interior Point

Resources

Stars

12 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages