# Help Couenne

**URL:** <https://discourse.julialang.org/t/help-couenne/16825>\
**Category:** Optimization (Mathematical)\
**Created:** [October 26, 2018, 2:21pm UTC](https://discourse.julialang.org/t/help-couenne/16825 "2018-10-26T14:21:30Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![muriloasouza](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/muriloasouza/32/4650_2.png) [@muriloasouza](https://discourse.julialang.org/u/muriloasouza)\
**Post date:** [December 11, 2018, 11:34am UTC](https://discourse.julialang.org/t/help-couenne/16825/21 "2018-12-11T11:34:30Z")

</div>

I understand.

Regarding the number of variables (continuos and/or integers) and constraints, is there any consensus if using a BnB algorithm to solve a MINLP is viable or not?

For example, i’m solving a problem that has around 7700 variables (wich of 12 are integers) and 7700 constraints. Depeding on some parameters i use, it takes between 2h and 6h to solve this problem. But, i’ll need to test my code in another similar problem wich has much more variables and constraints, and if Couenne can solve that, i’m afraid it will take days. So, i’m not sure if BnB is the best (or even acceptable) approach here…

---

<div class="post-metadata">

**Author:** ![muriloasouza](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/muriloasouza/32/4650_2.png) [@muriloasouza](https://discourse.julialang.org/u/muriloasouza)\
**Post date:** [January 15, 2019, 2:13pm UTC](https://discourse.julialang.org/t/help-couenne/16825/22 "2019-01-15T14:13:26Z")

</div>

Sorry, a bit lost in here, but how can i use options in Couenne?

I just made this new file in Atom, and saved it as “couenne.opt” in the same folder i have the files i’m working on:

```julia
optimality_bt no

aggressive_fbbt no

allowable_gap 1

allowable_fraction_gap 0.05

```

How can i made Couenne read it? I just need to put “couenne.opt” inside the brackets, like this?

`m = Model(solver=CouenneNLSolver(couenne.opt))`

---

<div class="post-metadata">

**Author:** ![tkoolen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkoolen/32/1603_2.png) [@tkoolen](https://discourse.julialang.org/u/tkoolen)\
**Post date:** [January 16, 2019, 5:58pm UTC](https://discourse.julialang.org/t/help-couenne/16825/23 "2019-01-16T17:58:21Z")

</div>

Hmm, that’s not very user-friendly right now. The `couenne.opt` file needs to be in the same directory as the `.nl` file that’s passed to the `couenne` executable. But the `.nl` file is generated in a different directory, namely in `AmplNLWriter.solverdata_dir` (CouenneNL is just a thin wrapper around AmplNLWriter). So I think if you put your `couenne.opt` file there it should work. Improving this situation, e.g. by making it so that you can directly specify in which directory `AmplNLWriter` generates the `.nl` file, could be a good contribution to the AmplNLWriter package.

---

<div class="post-metadata">

**Author:** ![muriloasouza](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/muriloasouza/32/4650_2.png) [@muriloasouza](https://discourse.julialang.org/u/muriloasouza)\
**Post date:** [January 22, 2019, 12:42pm UTC](https://discourse.julialang.org/t/help-couenne/16825/24 "2019-01-22T12:42:58Z")

</div>

Yes. I just put the “couenne.opt” file in the same folder as the files i’m running, it worked. Couenne stoped using those bound tightening options and exited earlier because of the gap i put in there (it even shows a message saying that).

[Previous page](https://discourse.julialang.org/t/help-couenne/16825.md?page=1)
