# PRIMA: a package for solving general nonlinear optimization problems without using derivatives

**URL:** https://discourse.julialang.org/t/prima-a-package-for-solving-general-nonlinear-optimization-problems-without-using-derivatives/105134
**Category:** Optimization (Mathematical)
**Tags:** package, optim, optimization, scientific-computing, nonlinear-optimizati
**Created:** [October 18, 2023, 5:33pm UTC](https://discourse.julialang.org/t/prima-a-package-for-solving-general-nonlinear-optimization-problems-without-using-derivatives/105134 "2023-10-18T17:33:01Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Zaikun](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zaikun/32/44262_2.png) [@Zaikun](https://discourse.julialang.org/u/Zaikun)
#### Post date: [October 18, 2023, 5:33pm UTC](https://discourse.julialang.org/t/prima-a-package-for-solving-general-nonlinear-optimization-problems-without-using-derivatives/105134/1 "2023-10-18T17:33:01Z")

</div>

Hi everyone,

I am very glad to announce [PRIMA](http://libprima.net), a package for solving general nonlinear optimization problems without using derivatives.

PRIMA provides the reference implementation for [M.J.D. Powell](https://en.wikipedia.org/wiki/Michael_J._D._Powell)’s renowned derivative-free optimization methods, i.e., COBYLA, UOBYQA, NEWUOA, BOBYQA, and LINCOA. The “P” in the name stands for [**P** owell](https://www.zhangzk.net/powell.html), and “RIMA” is an acronym for “Reference Implementation with Modernization and Amelioration”.

Powell’s solvers are widely used by engineers and scientists. For instance, see Section 1 of [a recent paper on Powell’s solvers](https://arxiv.org/pdf/2302.13246.pdf) as well as the Google searches of [COBYLA](https://www.google.com/search?q=cobyla) and [BOBYQA](https://www.google.com/search?q=bobyqa).

The current version of PRIMA is implemented in modern Fortran (F2008 or above). Interfaces to [Julia](https://github.com/libprima/prima/#julia), [MATLAB](https://github.com/libprima/prima/#matlab), [Python](https://github.com/libprima/prima/#python), and [C](https://github.com/libprima/prima/#c) are available. Native implementations in these languages will also be provided in the future.

If you are interested in PRIMA, you may check its GitHub repository at

[libprima / prima](https://github.com/libprima/prima)

and its Julia interface [PRIMA.jl](https://github.com/libprima/prima.jl):

[JuliaRegistries / General / P /PRIMA](https://github.com/JuliaRegistries/General/tree/master/P/PRIMA).

The Julia interface of PRIMA is mainly due to the efforts of [Éric Thiébaut](https://github.com/emmt) and [Alexis Montoison](https://github.com/amontoison), who should receive all the credits.

Thanks and regards,  
Zaikun ZHANG  
Ph.D. and Assistant Professor  
Dept. App. Math., Hong Kong Polytechnic University

* * *

PS: **Who was Powell?**

[Michael James David Powell FRS](https://en.wikipedia.org/wiki/Michael_J._D._Powell) was [“a British numerical analyst who was among the pioneers of computational mathematics”](https://royalsocietypublishing.org/doi/full/10.1098/rsbm.2017.0023). He was the inventor/early contributor of [quasi-Newton method](https://en.wikipedia.org/wiki/Quasi-Newton_method), [trust region method](https://en.wikipedia.org/wiki/Trust_region), [augmented Lagrangian method](https://en.wikipedia.org/wiki/Augmented_Lagrangian_method), and [SQP method](https://en.wikipedia.org/wiki/Sequential_quadratic_programming). Each of them is a pillar of modern numerical optimization. He also made significant contributions to [approximation theory and methods](https://www.cambridge.org/highereducation/books/approximation-theory-and-methods/66FD8CD6F18FE1ED499A8CA9A05F2A5A#overview).

Among numerous honors, Powell was one of the two recipients of the first [Dantzig Prize](https://en.wikipedia.org/wiki/Dantzig_Prize) from the Mathematical Programming Society (MOS) and Society for Industrial and Applied Mathematics (SIAM). This is considered the highest award in optimization.

---

<div class="post-metadata">

### Author: ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)
#### Post date: [October 18, 2023, 5:51pm UTC](https://discourse.julialang.org/t/prima-a-package-for-solving-general-nonlinear-optimization-problems-without-using-derivatives/105134/2 "2023-10-18T17:51:21Z")

</div>

Thanks for setting this up! I believe @Vaibhavdixit02 will have a wrapper for Optimization.jl by the end of the day.

---

<div class="post-metadata">

### Author: ![Zaikun](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zaikun/32/44262_2.png) [@Zaikun](https://discourse.julialang.org/u/Zaikun)
#### Post date: [October 19, 2023, 1:26am UTC](https://discourse.julialang.org/t/prima-a-package-for-solving-general-nonlinear-optimization-problems-without-using-derivatives/105134/3 "2023-10-19T01:26:50Z")

</div>

Great! Thank you and @Vaibhavdixit02 . I hope [PRIMA](http://libprima.net) will be useful to the Julia community.

[Éric Thiébaut](https://github.com/emmt) and [Alexis Montoison](https://github.com/amontoison) should receive all the credits for the Julia setup represented by PRIMA.jl.

---

<div class="post-metadata">

### Author: ![Oscar\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscar_smith/32/25343_2.png) [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)
#### Post date: [October 19, 2023, 1:57am UTC](https://discourse.julialang.org/t/prima-a-package-for-solving-general-nonlinear-optimization-problems-without-using-derivatives/105134/4 "2023-10-19T01:57:48Z")

</div>

My guess is it will be less widely used than it is in Fortran because derivative free optimizers are generally worse than optimizers with derivatives, and Julia has pretty good autodiff functionality, but having good derivative free methods are nice to check why everything is exploding. It is also great to see new work in this area. More robust methods are always wonderful.

---

<div class="post-metadata">

### Author: ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)
#### Post date: [October 19, 2023, 2:05am UTC](https://discourse.julialang.org/t/prima-a-package-for-solving-general-nonlinear-optimization-problems-without-using-derivatives/105134/5 "2023-10-19T02:05:19Z")

</div>

The wrapper is almost done: [[WIP] Add PRIMA wrapper by Vaibhavdixit02 · Pull Request #612 · SciML/Optimization.jl · GitHub](https://github.com/SciML/Optimization.jl/pull/612)

Derivative-free methods have their place in the cannon of methods. Indeed, pervasive AD makes them less widely used than they would be in something like Python. However, it’s a good sanity check and a good thing to use for people who have wrapped a C/Fortran code that isn’t differentiable. So it’ll be interesting to benchmark them in the SciMLBenchmarks and see how they perform against derivative-based methods and against the NLopt implementations.
