# Can SCIP solve MINLP with trigonometric functions?

**URL:** <https://discourse.julialang.org/t/can-scip-solve-minlp-with-trigonometric-functions/116967>\
**Category:** Optimization (Mathematical)\
**Tags:** question\
**Created:** [July 12, 2024, 11:59am UTC](https://discourse.julialang.org/t/can-scip-solve-minlp-with-trigonometric-functions/116967 "2024-07-12T11:59:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lunima](https://avatars.discourse-cdn.com/v4/letter/l/d26b3c/32.png) [@Lunima](https://discourse.julialang.org/u/Lunima)\
**Post date:** [July 12, 2024, 11:59am UTC](https://discourse.julialang.org/t/can-scip-solve-minlp-with-trigonometric-functions/116967/1 "2024-07-12T11:59:09Z")

</div>

Hi everyone!

I’m trying out SCIP in JuMP (with SCIP.jl). In the FAQ in the documentation, when aswering the question “Which kind of MINLPs are supported by SCIP?” ([SCIP Doxygen Documentation: Frequently Asked Questions (FAQ)](https://scipopt.org/doc/html/FAQ.php#minlptypes)), it is written that SCIP does not support trigonometric functions. However when I wanted to try it out, the solver did manage to solve a problem with trigonometric function. The problem is:

```julia
import JuMP, SCIP

model = Model(SCIP.Optimizer)
set_attribute(model, "display/verblevel", 0)
set_attribute(model, "limits/gap", 0.05)

@variable(model, 0<= x <= pi)
@variable(model, y)

@objective(model, Min, y)

@NLconstraint(model, c, y>= sin(x)*sin(11*x))

optimize!(model)

```

Was SCIP updated to support trigonometric functions but not the documentation? Thanks!

(I’m using JuMP v1.22.2 and SCIP v0.11.6)

---

<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:** [July 13, 2024, 12:14am UTC](https://discourse.julialang.org/t/can-scip-solve-minlp-with-trigonometric-functions/116967/2 "2024-07-13T00:14:29Z")

</div>

SCIP supports `sin` and `cos`.

See [GitHub - scipopt/SCIP.jl: Julia interface to SCIP solver](https://github.com/scipopt/SCIP.jl?tab=readme-ov-file#supported-nonlinear-operators)

In general, SCIP will throw an error if you try to use an unsupported function.

---

<div class="post-metadata">

**Author:** ![Lunima](https://avatars.discourse-cdn.com/v4/letter/l/d26b3c/32.png) [@Lunima](https://discourse.julialang.org/u/Lunima)\
**Post date:** [July 15, 2024, 2:11pm UTC](https://discourse.julialang.org/t/can-scip-solve-minlp-with-trigonometric-functions/116967/3 "2024-07-15T14:11:49Z")

</div>

Thanks for the answer!

Do you know if trigonometric functions are natively supported by SCIP or if it is the Julia wrapper that reformulates the functions in a way the solver can handle ?

---

<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:** [July 16, 2024, 1:18am UTC](https://discourse.julialang.org/t/can-scip-solve-minlp-with-trigonometric-functions/116967/4 "2024-07-16T01:18:24Z")

</div>

SCIP supports `sin` and `cos`. The Julia wrappers do not reformulate approximations of nonlinear expressions; we pass them directly to the solver.

---

<div class="post-metadata">

**Author:** ![pierre-haessig](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pierre-haessig/32/217129_2.png) [@pierre-haessig](https://discourse.julialang.org/u/pierre-haessig)\
**Post date:** [July 16, 2024, 9:46am UTC](https://discourse.julialang.org/t/can-scip-solve-minlp-with-trigonometric-functions/116967/5 "2024-07-16T09:46:59Z")

</div>

Thanks for the feedback. I’ve created a SCIP issue: [Documentation update about trigonometric functions (cos, sin) support · Issue #98 · scipopt/scip · GitHub](https://github.com/scipopt/scip/issues/98)

---

<div class="post-metadata">

**Author:** ![pierre-haessig](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pierre-haessig/32/217129_2.png) [@pierre-haessig](https://discourse.julialang.org/u/pierre-haessig)\
**Post date:** [July 17, 2024, 3:07pm UTC](https://discourse.julialang.org/t/can-scip-solve-minlp-with-trigonometric-functions/116967/6 "2024-07-17T15:07:00Z")

</div>

Feedback from SCIP devs: support was introduced in SCIP 8.0.0 (early 2022), see:

- SCIP 8.0.0 release notes [https://scipopt.org/doc-8.0.0/html/RN80.php](https://scipopt.org/doc-8.0.0/html/RN80.php) (in “Expressions” section)
- in the SCIP 8.0 paper [https://optimization-online.org/2021/12/8728/](https://optimization-online.org/2021/12/8728/) (in Section 4 SCIP’s New MINLP Framework / 4.1 New Expressions Framework)
