# Set options of \`Clarabel.jl\` via the \`Convex.jl\` interface

**URL:** https://discourse.julialang.org/t/set-options-of-clarabel-jl-via-the-convex-jl-interface/119538
**Category:** Optimization (Mathematical)
**Created:** [September 18, 2024, 7:44am UTC](https://discourse.julialang.org/t/set-options-of-clarabel-jl-via-the-convex-jl-interface/119538 "2024-09-18T07:44:05Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![DanDoe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dandoe/32/52717_2.png) [@DanDoe](https://discourse.julialang.org/u/DanDoe)
#### Post date: [September 18, 2024, 7:44am UTC](https://discourse.julialang.org/t/set-options-of-clarabel-jl-via-the-convex-jl-interface/119538/1 "2024-09-18T07:44:05Z")

</div>

For the [`ECOS.jl`](https://github.com/jump-dev/ECOS.jl) solver I can do the following:

```julia
        solve!(problem,
               # Parameters taken from default values for EiCOS
               Convex.MOI.OptimizerWithAttributes(ECOS.Optimizer, "b" => 0.99,
                                           "delta" => 2e-7,
                                           "feastol" => 1e-9,
                                           "abstol" => 1e-9,
                                           "reltol" => 1e-9,
                                           "feastol_inacc" => 1e-4,
                                           "abstol_inacc" => 5e-5,
                                           "reltol_inacc" => 5e-5,
                                           "nitref" => 9,
                                           "maxit" => 100,
                                           "verbose" => 3); silent = false)

```

i.e., set values for the [options](https://github.com/jump-dev/ECOS.jl?tab=readme-ov-file#options) easily.

How can I do that for the [`Clarabel.jl`](https://clarabel.org/stable/) solver? They also list a number of [settings](https://clarabel.org/stable/api_settings/#Clarabel-Solver-Settings), but if I try for instance

```julia
solve!(problem, 
       Convex.MOI.OptimizerWithAttributes(Clarabel.Optimizer, 
                                          "tol_feas" = 1e-8);
       silent = false)

```

I receive

```julia
ERROR: syntax: invalid keyword argument name ""tol_feas""

```

Same if I try `:tol_feas`.

Any ideas? A solution would probably also be moving to JuMP if that allows me setting stricter values for feasibility.

---

<div class="post-metadata">

### Author: ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)
#### Post date: [September 18, 2024, 8:23am UTC](https://discourse.julialang.org/t/set-options-of-clarabel-jl-via-the-convex-jl-interface/119538/2 "2024-09-18T08:23:05Z")

</div>

You need `"tol_feas" => 1e-8`. Note the `>` 😄

---

<div class="post-metadata">

### Author: ![DanDoe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dandoe/32/52717_2.png) [@DanDoe](https://discourse.julialang.org/u/DanDoe)
#### Post date: [September 18, 2024, 8:35am UTC](https://discourse.julialang.org/t/set-options-of-clarabel-jl-via-the-convex-jl-interface/119538/3 "2024-09-18T08:35:58Z")

</div>

Should have given it a second look before posting here. Thanks!

---

<div class="post-metadata">

### Author: ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)
#### Post date: [September 18, 2024, 8:37am UTC](https://discourse.julialang.org/t/set-options-of-clarabel-jl-via-the-convex-jl-interface/119538/4 "2024-09-18T08:37:58Z")

</div>

> [@DanDoe](#):
>
> Should have given it a second look before posting here

No worries 😄 It only took me a second _to_ look.
