Clarabel.ConeDictConstant
ConeDict

A Dict that maps the user-facing SupportedCone types to the types used internally in the solver. See SupportedCone

Clarabel.DefaultSolutionType
DefaultSolution{T <: AbstractFloat}

Object returned by the Clarabel solver after calling optimize!(model).

Fieldname | Description –- | :–- | :–- x | Vector{T}| Primal variable z | Vector{T}| Dual variable s | Vector{T}| (Primal) set variable status | Symbol | Solution status objval | T | Objective value solvetime | T | Solver run time iterations | Int | Number of solver iterations rprim | primal residual at termination rdual | dual residual at termination

If the status field indicates that the problem is solved then (x,z,s) are the calculated solution, or a best guess if the solver has terminated early due to time or iterations limits.

If the status indicates either primal or dual infeasibility, then (x,z,s) provide instead an infeasibility certificate.

Clarabel.SettingsType
ArgumentDefault ValueDescription
Main Algorithm Settings
max_iter50maximum number of iterations
time_limitInfmaximum run time (seconds)
verbosetrueverbose printing
max_step_fraction0.99maximum interior point step length
Full Accuracy Settings
tol_gap_abs1e-8absolute duality gap tolerance
tol_gap_rel1e-8relative duality gap tolerance
tol_feas1e-8feasibility check tolerance (primal and dual)
tol_infeas_abs1e-8absolute infeasibility tolerance (primal and dual)
tol_infeas_rel1e-8relative infeasibility tolerance (primal and dual)
tol_ktratio1e-7κ/τ tolerance
Reduced Accuracy Settings
reduced_tol_gap_abs5e-5reduced absolute duality gap tolerance
reduced_tol_gap_rel5e-5reduced relative duality gap tolerance
reduced_tol_feas1e-4reduced feasibility check tolerance (primal and dual)
reduced_tol_infeas_abs5e-5reduced absolute infeasibility tolerance (primal and dual)
reduced_tol_infeas_rel5e-5reduced relative infeasibility tolerance (primal and dual)
reduced_tol_ktratio1e-4reduced κ/τ tolerance
Data Equilibration Settings
equilibrate_enabletrueenable data equilibration pre-scaling
equilibrate_max_iter10maximum equilibration scaling iterations
equilibrate_min_scaling1e-4minimum equilibration scaling allowed
equilibrate_max_scaling1e+4maximum equilibration scaling allowed
Step Size Settings
linesearch_backtrack_step0.8linesearch backtracking
min_switch_step_length1e-1minimum step size allowed for asymmetric cones with PrimalDual scaling
min_terminate_step_length1e-4minimum step size allowed for symmetric cones && asymmetric cones with Dual scaling
Linear Solver Settings
direct_kkt_solvertrueuse a direct linear solver method (required true)
direct_solve_method:qdldldirect linear solver (:qdldl, :mkl or :cholmod)
static_regularization_enabletrueenable KKT static regularization
static_regularization_eps1e-7KKT static regularization parameter
static_regularization_proportionaleps(T)^2additional regularization parameter w.r.t. the maximum abs diagonal term
dynamic_regularization_enabletrueenable KKT dynamic regularization
dynamic_regularization_eps1e-13KKT dynamic regularization threshold
dynamic_regularization_delta2e-7KKT dynamic regularization shift
iterative_refinement_enabletrueKKT solve with iterative refinement
iterative_refinement_reltol1e-12iterative refinement relative tolerance
iterative_refinement_abstol1e-12iterative refinement absolute tolerance
iterative_refinement_max_iter10iterative refinement maximum iterations
iterative_refinement_stop_ratio5.0iterative refinement stalling tolerance

__Preprocessing Settings presolve_enable | true | enable presolve constraint reduction

Clarabel.SolverType
Solver{T <: AbstractFloat}()

Initializes an empty Clarabel solver that can be filled with problem data using:

setup!(solver, P, q, A, b, cones, [settings]).
Clarabel.SolverStatusType
SolverStatus

An Enum of of possible conditions set by solve!.

If no call has been made to solve!, then the SolverStatus is:

  • UNSOLVED: The algorithm has not started.

Otherwise:

  • SOLVED : Solver terminated with a solution.
  • PRIMAL_INFEASIBLE : Problem is primal infeasible. Solution returned is a certificate of primal infeasibility.
  • DUAL_INFEASIBLE : Problem is dual infeasible. Solution returned is a certificate of dual infeasibility.
  • ALMOST_SOLVED : Solver terminated with a solution (reduced accuracy).
  • ALMOST_PRIMAL_INFEASIBLE : Problem is primal infeasible. Solution returned is a certificate of primal infeasibility (reduced accuracy).
  • ALMOST_DUAL_INFEASIBLE : Problem is dual infeasible. Solution returned is a certificate of dual infeasibility (reduced accuracy).
  • MAX_ITERATIONS : Iteration limit reached before solution or infeasibility certificate found.
  • MAX_TIME : Time limit reached before solution or infeasibility certificate found.
  • NUMERICAL_ERROR : Solver terminated with a numerical error.
  • INSUFFICIENT_PROGRESS : Solver terminated due to lack of progress.
Clarabel.SupportedConeType
SupportedCone

An abstract type use by the Clarabel API used when passing cone specifications to the solver setup!. The currently supported concrete types are:

  • ZeroConeT : The zero cone. Used to define equalities.
  • NonnegativeConeT: The nonnegative orthant.
  • SecondOrderConeT: The second order / Lorentz / ice-cream cone.
  • ExponentialConeT: The exponential cone (in R^3)
  • PowerConeT : The power cone with power α (in R^3)
  • GenPowerConeT : The generalized power cone
  • PSDTriangleConeT: The positive semidefinite cone (triangular format).
Clarabel.setup!Method
setup!(solver, P, q, A, b, cones, [settings])

Populates a Solver with a cost function defined by P and q, and one or more conic constraints defined by A, b and a description of a conic constraint composed of cones whose types and dimensions are specified by cones.

The solver will be configured to solve the following optimization problem:

min   1/2 x'Px + q'x
s.t.  Ax + s = b, s ∈ K

All data matrices must be sparse. The matrix P is assumed to be symmetric and positive semidefinite, and only the upper triangular part is used.

The cone K is a composite cone. To define the cone the user should provide a vector of cone specifications along with the appropriate dimensional information. For example, to generate a cone in the nonnegative orthant followed by a second order cone, use:

cones = [Clarabel.NonnegativeConeT(dim_1),
         Clarabel.SecondOrderConeT(dim_2)]

If the argument 'cones' is constructed incrementally, the should should initialize it as an empty array of the supertype for all allowable cones, e.g.

cones = Clarabel.SupportedCone[]
push!(cones,Clarabel.NonnegativeConeT(dim_1))
...

The optional argument settings can be used to pass custom solver settings:

settings = Clarabel.Settings(verbose = true)
setup!(model, P, q, A, b, cones, settings)

To solve the problem, you must make a subsequent call to solve!

Clarabel.solve!Method
solve!(solver)

Computes the solution to the problem in a Clarabel.Solver previously defined in setup!.