using Clarabel, SparseArrays

P = spzeros(3,3)

q = [-1.,0.,0.]

A = sparse([
     -1.  0.  0.;
      0. -1.  0.;
      0.  0. -1.;
      0.  1.  0.;
      0.  0.  1.]);

b = [0.,0.,0.,1.,exp(5.)];

cones  = [Clarabel.ExponentialConeT(), Clarabel.ZeroConeT(2)]

solver = Clarabel.Solver()

settings = Clarabel.Settings()

Clarabel.setup!(solver, P, q, A, b, cones, settings)

result = Clarabel.solve!(solver)
-------------------------------------------------------------
           Clarabel.jl v0.8.1  -  Clever Acronym
                   (c) Paul Goulart
                University of Oxford, 2022
-------------------------------------------------------------

problem:
  variables     = 3
  constraints   = 5
  nnz(P)        = 0
  nnz(A)        = 5
  cones (total) = 2
    : Zero        = 1,  numel = 2
    : Exponential = 1,  numel = 3

settings:
  linear algebra: direct / qdldl, precision: Float64
  max iter = 200, time limit = Inf,  max step = 0.990
  tol_feas = 1.0e-08, tol_gap_abs = 1.0e-08, tol_gap_rel = 1.0e-08,
  static reg : on, ϵ1 = 1.0e-08, ϵ2 = 4.9e-32
  dynamic reg: on, ϵ = 1.0e-13, δ = 2.0e-07
  iter refine: on, reltol = 1.0e-13, abstol = 1.0e-12,
               max iter = 10, stop ratio = 5.0
  equilibrate: on, min_scale = 1.0e-04, max_scale = 1.0e+04
               max iter = 10

iter    pcost        dcost       gap       pres      dres      k/t        μ       step
---------------------------------------------------------------------------------------------
  0   0.0000e+00  -0.0000e+00  0.00e+00  9.89e-01  5.04e-01  1.00e+00  1.00e+00   ------
  1   3.3353e+00   6.8900e+00  1.07e+00  9.14e-01  8.95e-02  4.53e+00  2.14e-01  7.92e-01
  2   1.5946e+01   3.3184e+01  1.08e+00  6.60e-01  1.78e-02  1.81e+01  4.59e-02  7.92e-01
  3   2.4261e+01   5.1084e+01  1.11e+00  2.30e-01  5.04e-03  2.73e+01  1.13e-02  7.92e-01
  4   7.1045e+00   1.3831e+01  9.47e-01  5.63e-02  1.50e-03  6.88e+00  3.38e-03  7.92e-01
  5  -1.9077e+00  -4.4928e-01  1.46e+00  1.14e-02  3.05e-04  1.49e+00  7.24e-04  7.92e-01
  6  -4.2883e+00  -3.9751e+00  7.88e-02  2.42e-03  6.44e-05  3.20e-01  1.55e-04  7.92e-01
  7  -4.9836e+00  -4.9749e+00  1.76e-03  6.68e-05  1.78e-06  8.95e-03  4.30e-06  9.80e-01
  8  -4.9996e+00  -4.9993e+00  4.91e-05  1.85e-06  4.94e-08  2.51e-04  1.19e-07  9.80e-01
  9  -5.0000e+00  -5.0000e+00  1.38e-06  5.14e-08  1.37e-09  7.03e-06  3.31e-09  9.80e-01
 10  -5.0000e+00  -5.0000e+00  3.84e-08  1.43e-09  3.80e-11  1.96e-07  9.19e-11  9.80e-01
 11  -5.0000e+00  -5.0000e+00  8.23e-09  3.06e-10  8.14e-12  4.21e-08  1.97e-11  7.92e-01
---------------------------------------------------------------------------------------------
Terminated with status = solved
solve time = 75.0ms
>>> Clarabel - Results
Status: SOLVED
Iterations: 11
Objective: -5.000
Solve time: 75.0ms
result.x
3-element Vector{Float64}:
   4.9999999407684355
   0.9999999990781195
 148.41315896637963

This page was generated using Literate.jl.