# Annoucement: Algencan.jl initial release

**URL:** <https://discourse.julialang.org/t/annoucement-algencan-jl-initial-release/11183>\
**Category:** Optimization (Mathematical)\
**Created:** [May 27, 2018, 2:46pm UTC](https://discourse.julialang.org/t/annoucement-algencan-jl-initial-release/11183 "2018-05-27T14:46:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pjssilva](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pjssilva/32/4238_2.png) [@pjssilva](https://discourse.julialang.org/u/pjssilva)\
**Post date:** [May 27, 2018, 2:46pm UTC](https://discourse.julialang.org/t/annoucement-algencan-jl-initial-release/11183/1 "2018-05-27T14:46:48Z")

</div>

After a long period planning I have finished a first rough implementation of a interface between the [Algencan](https://www.ime.usp.br/~egbirgin/tango/codes.php) solver for nonlinear optimization (general NLP with constraints) for JuMP / MathProgBase that I am naming [Algenca.jl](https://github.com/pjssilva/Algencan.jl). This is pre-alpha software, please read the README.md file in the Github page.

At this time, before using it **you need to first download and compile Algencan and create a shared library from it.** There are some instructions on how to do it in the README.md file in Algencan.jl. See the Github page. After that, you need to create an environment variable named `ALGENCAN_LIB_DIR` point to the directory that has the shared library.

For now Algencan.jl is a simple module, not a package yet. So you can not use `Pkg` to install it. I plan to give it some Pkg integration soon. To use it, download the code from Github, add the src directory to Julia’s `LOAD_PATH` and import Algencan. There is a example of use in the file `first_tests.jl` in the `example` directory.

Feel free to test it, make comments, and find issues.

Paulo

---

<div class="post-metadata">

**Author:** ![cortner](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cortner/32/204_2.png) [@cortner](https://discourse.julialang.org/u/cortner)\
**Post date:** [May 27, 2018, 3:53pm UTC](https://discourse.julialang.org/t/annoucement-algencan-jl-initial-release/11183/2 "2018-05-27T15:53:27Z")

</div>

Would be great to see how it does against Optim

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [May 27, 2018, 4:03pm UTC](https://discourse.julialang.org/t/annoucement-algencan-jl-initial-release/11183/3 "2018-05-27T16:03:18Z")

</div>

> [@pjssilva](#):
>
> For now Algencan.jl is a simple module, not a package yet

Perhaps you are aware of this, but `PkgDev.generate` will generate the package skeleton with little effort. Even if you are not registering it, `Pkg.update` is a great help for keeping up with WIP packages.

---

<div class="post-metadata">

**Author:** ![pjssilva](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pjssilva/32/4238_2.png) [@pjssilva](https://discourse.julialang.org/u/pjssilva)\
**Post date:** [May 27, 2018, 4:43pm UTC](https://discourse.julialang.org/t/annoucement-algencan-jl-initial-release/11183/4 "2018-05-27T16:43:54Z")

</div>

Algencan is suppoded to be competitive with IPOPT, at least that was the case when it was first released. It is a very mature code. I’ll try to write some simple tests, maybe using CUTEst.jl.

---

<div class="post-metadata">

**Author:** ![pjssilva](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pjssilva/32/4238_2.png) [@pjssilva](https://discourse.julialang.org/u/pjssilva)\
**Post date:** [May 27, 2018, 4:48pm UTC](https://discourse.julialang.org/t/annoucement-algencan-jl-initial-release/11183/5 "2018-05-27T16:48:28Z")

</div>

I admit that I have not even looked at how to make packages. I will take a look at PkgDev.generate, thanks for the tip.

---

<div class="post-metadata">

**Author:** ![cortner](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cortner/32/204_2.png) [@cortner](https://discourse.julialang.org/u/cortner)\
**Post date:** [May 27, 2018, 5:05pm UTC](https://discourse.julialang.org/t/annoucement-algencan-jl-initial-release/11183/6 "2018-05-27T17:05:28Z")

</div>

I am aware - this is why I am interested in the comparison.

---

<div class="post-metadata">

**Author:** ![pjssilva](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pjssilva/32/4238_2.png) [@pjssilva](https://discourse.julialang.org/u/pjssilva)\
**Post date:** [May 29, 2018, 12:00am UTC](https://discourse.julialang.org/t/annoucement-algencan-jl-initial-release/11183/7 "2018-05-29T00:00:15Z")

</div>

I used CUTEst.jl and made a very naive comparison between Algencan.jl and Ipopt.jl using their simple linear algebra solvers (without using HSL libraries). You can see the performance profile below. The code for the test is in the github repository so that you can reproduce it.

I selected all the problems from CUTEst that have at least 10 variables and 10 constraints and at most 1000 variables and 1000 constraints, but I had to ignore problems that have lower bounded constraints as this is not yet implemented in Algencan.jl.

Note that comparing optimization software is hard. In this case a special difficulty is that Ipopt uses a scaled stopping criteria (in its tol parameter) while Algencan uses an unscaled one. I tried to make the results comparable, but I may have failed miserably. If anyone sees any clear pitfall in my code, please let me know and I’ll fix it ASAP. I tried to set the precisions to 1.0e-5.

As I said, the moral here is that both codes behave quite similarly in overall the test but can have dramatically different behaviour in a specific test. So the best is to try both and use the best one for your application. And, if you can, try both with HSL, they should both behave better.

 ![profile](https://global.discourse-cdn.com/julialang/original/3X/7/5/750929be6aab6daa125062719b9fbb670f6249a3.png)
