# Comparison between Nonconvex.jl, JuMP and CasADi for large sparse nonlinear optimization

**URL:** <https://discourse.julialang.org/t/comparison-between-nonconvex-jl-jump-and-casadi-for-large-sparse-nonlinear-optimization/78825>\
**Category:** Optimization (Mathematical)\
**Tags:** control\
**Created:** [March 31, 2022, 4:26pm UTC](https://discourse.julialang.org/t/comparison-between-nonconvex-jl-jump-and-casadi-for-large-sparse-nonlinear-optimization/78825 "2022-03-31T16:26:22Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ccoffrin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ccoffrin/32/400_2.png) [@ccoffrin](https://discourse.julialang.org/u/ccoffrin)\
**Post date:** [March 31, 2022, 4:58pm UTC](https://discourse.julialang.org/t/comparison-between-nonconvex-jl-jump-and-casadi-for-large-sparse-nonlinear-optimization/78825/2 "2022-03-31T16:58:50Z")

</div>

My experience in using these two libraries is consistent with yours. I think the short answer is, if you want to take advantage of sparsity in Julia NLP frameworks other than JuMP, you would need code your own oracles for the sparse Jacobean and Hessian and provide these functions to the modeling layer. There are some special cases where this is not required, for example have a look at this list, [https://galacticoptim.sciml.ai/stable/API/optimization\_function/#Defining-Optimization-Functions-Via-AD](https://galacticoptim.sciml.ai/stable/API/optimization_function/#Defining-Optimization-Functions-Via-AD)

You might be interested in following the discussions that are on going in the following threads where I have been exploring some similar questions,

> [@Survey of Non-Linear Optimization Modeling Layers in Julia](https://discourse.julialang.org/t/survey-of-non-linear-optimization-modeling-layers-in-julia/78168):
>
> I am doing a survey of the NLP modeling layers in Julia to see which might be applicable to the kinds of problems that I regularly solve. I have the following basic requirements of the modeling layer, Support for non-convex functions for the objective Support for a system non-convex equality and inequality constraint functions (the equality constraints usually cannot be expressed explicitly as a manifold) Support for polynomial and transcendental functions (e.g. x^2\*y^3,sin(x)) Some kind of a…

> [@AC Optimal Power Flow in Various Nonlinear Optimization Frameworks](https://discourse.julialang.org/t/ac-optimal-power-flow-in-various-nonlinear-optimization-frameworks/78486):
>
> As a follow up to my [NLP modeling survey post](https://discourse.julialang.org/t/survey-of-non-linear-optimization-modeling-layers-in-julia/78168), I am please to announce the release of the [Rosetta OPF](https://github.com/lanl-ansi/rosetta-opf) project. The goal of this project is to highlight the basic technical requirements for solving the kinds of continuous non-convex mathematical optimization problems that I regularly encounter. To that end, Rosetta OPF provides example implementations of the AC Optimal Power Flow (AC-OPF) problem in five of Julia’s nonlinear optimization modeling layers. Based on the findings of the NLP modeling …

---

_[View the full topic](https://discourse.julialang.org/t/comparison-between-nonconvex-jl-jump-and-casadi-for-large-sparse-nonlinear-optimization/78825)._
