Native Julia bindings for CasADi, the open-source framework for nonlinear optimization and algorithmic differentiation.
This is the official binding, generated by a SWIG -julia backend and shipped
against the precompiled CasADi_jll
binaries — no Python required. (The unrelated CasADi.jl
is a PythonCall-based wrapper.)
import LibCasADi as ca
x = ca.MX.sym("x", 2)
f = x[1]^2 + x[2]^2
nlp = Dict("x" => x, "f" => f, "g" => x[1] + x[2] - 10)
solver = ca.nlpsol("solver", "ipopt", nlp)
sol = solver(x0 = [0.0, 0.0], lbg = 0, ubg = 0)
println(ca.value(sol, x))Conventions mirror CasADi's Python/MATLAB API: ca.MX.sym(...), ' transpose,
A \ b, 1-based indexing, broadcasting (.* is elementwise), positional option
Dicts, and method-style calls (f.jacobian(), opti.solve()).
Beta. The package loads CasADi_jll (core + plugins + the build-once wrapper
libcasadi_wrap); src/casadi.jl and src/CasADiNative.jl are vendored from the
casadi source bundle and refreshed each release.
LGPL-3.0-or-later, matching CasADi. See LICENSE.