using Clarabel, SparseArrays

P = spzeros(6,6)

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

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

b = [0., 0., 0., 0., 0., 0., 3., 1.]

cones  = [Clarabel.PowerConeT(0.6), Clarabel.PowerConeT(0.1), 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.5.1  -  Clever Acronym
(c) Paul Goulart
University of Oxford, 2022
-------------------------------------------------------------

problem:
variables     = 6
constraints   = 8
nnz(P)        = 0
nnz(A)        = 10
cones (total) = 3
: Zero        = 1,  numel = 2
: Power       = 2,  numel = (3,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  7.43e-01  1.02e+00  1.00e+00  1.00e+00   ------
1  -7.1316e-01  -6.9778e-01  1.54e-02  1.62e-01  2.18e-01  2.78e-01  2.70e-01  7.84e-01
2  -1.7671e+00  -1.7294e+00  2.18e-02  2.24e-02  2.72e-02  8.47e-02  3.72e-02  9.80e-01
3  -1.8255e+00  -1.8174e+00  4.45e-03  5.01e-03  5.98e-03  1.86e-02  8.29e-03  7.84e-01
4  -1.8405e+00  -1.8387e+00  9.50e-04  1.12e-03  1.33e-03  4.09e-03  1.85e-03  7.84e-01
5  -1.8442e+00  -1.8438e+00  2.06e-04  2.49e-04  2.96e-04  9.00e-04  4.12e-04  7.84e-01
6  -1.8451e+00  -1.8450e+00  4.48e-05  5.56e-05  6.61e-05  1.99e-04  9.19e-05  7.84e-01
7  -1.8453e+00  -1.8453e+00  1.03e-06  1.60e-06  1.90e-06  5.23e-06  2.64e-06  9.80e-01
8  -1.8454e+00  -1.8454e+00  2.25e-07  3.56e-07  4.23e-07  1.16e-06  5.88e-07  7.84e-01
9  -1.8454e+00  -1.8454e+00  5.40e-09  1.02e-08  1.22e-08  3.13e-08  1.69e-08  9.80e-01
10  -1.8454e+00  -1.8454e+00  2.03e-09  3.87e-09  4.60e-09  1.18e-08  6.39e-09  6.27e-01
---------------------------------------------------------------------------------------------
Terminated with status = solved
solve time = 1.35ms
>>> Clarabel - Results
Status: SOLVED
Iterations: 10
Objective: -1.845
Solve time: 1.35ms

result.x
6-element Vector{Float64}:
1.681751678609719
0.5606741441772675
1.0837805035158516
0.06563333626589565
0.9999999919206469
0.761574584823843