casadi

CasADi is a symbolic framework for numeric optimization implementing automatic differentiation in forward and reverse modes on sparse matrix-valued computational graphs. It supports self-contained C-code generation and interfaces state-of-the-art codes such as SUNDIALS, IPOPT etc. It can be used from C++, Python or Matlab/Octave.

LGPL-3.0 License

Downloads
777.6K
Stars
1.7K
Committers
64

Bot releases are hidden (Show)

casadi - 3.6.6

Published by jgillis 3 months ago

Install

Grab a binary from the table:

For Matlab/Octave, unzip in your home directory and adapt the path:

Check your installation:

Get started with the example pack. Onboarding pointers have been gathered by the community at our wiki.

Troubleshooting

  • KNITRO on linux crashes with a segmentation fault without LD_PRELOAD=<knitro_lin_path>/libiomp5.so.
  • Callbacks with one argument are broken in Matlab CasADi

Release notes

Symbolic expressions

  • Added SX/MX/DM operations #1595:
    • hypot(x,y) = sqrt(x*x+y*y)
    • log1p(x) = log(1+x)
    • expm1(x) = exp(x-1)
  • Added operation remainder with the semantics of the C operation
  • breaking AD rule of fmin/fmax` is now symmetric:
    jacobian(fmin(x,y),vertcat(x,y)) used to be [1 0] for x==y. Now yields [0.5 0.5].
  • Added AD rules for mmin/mmax
  • Added logsumexp which behaves like log(sum(exp(x))) but is numerically more accurate (and no overflow issues).
  • breaking vertcat/vcat,horzcat/hcat, etc now return a DM type instead of a Sparsity type #2549
  • breaking CasADi-Matlab mod has been renamed to rem, because its numerical behaviour is like the builtin-Matlab rem. The builtin-Matlab mod has no CasADi counterpart. CasADi-Python mod has been removed, because its numerical behaviour is not like numpy.mod. #2767. numpy.mod has no counterpart in CasADi; only fmod is equivalent.
  • DAE index reduction support (Pantelides structural algorithm) See https://github.com/casadi/casadi/blob/3.6.0/docs/examples/python/dae_reduced_index.py
  • Fixed flaw in codegen with MX if_else

Common subexpression elimination

  • Added Common Subexpression Elimination #1540 for MX and SX.
    CasADi can now efficiently eliminate redundant computation by inspecting an expression graph and removing redundant nodes.

Before, CasADi internals would avoid introducing redundant nodes during operations on a given expression, but the user was responsible to avoid duplication when constructing that expression.

There is a function cse() that you may apply to expressions:

x = MX.sym('x')

# User responsibility
sx = sin(x)
y = sqrt(sx)+sx # MX(@1=sin(x), (sqrt(@1)+@1))

# cse
y = sqrt(sin(x))+sin(x) # MX((sqrt(sin(x))+sin(x)))
y = cse(y) # MX(@1=sin(x), (sqrt(@1)+@1))

There is a boolean option cse that may be used when constructing a Function:

x = MX.sym('x')

f = Function('f',[x],[sqrt(sin(x))+sin(x)],{"cse":True})
f.disp(True)
f:(i0)->(o0) MXFunction
Algorithm:
@0 = input[0][0]
@0 = sin(@0)
@1 = sqrt(@0)
@1 = (@1+@0)
output[0][0] = @1

The technique scales favorably for large graphs.

Triangular solve triangular solve nodes in MX

MX how has atomic support for solving upper and lower triangular linear systems without allocating any linear solver instance. The operation handles the case with unity diagonal separately for efficiency and supports C code generation. To use the feature, call casadi.solve(A, b) (Python or MATLAB/Octave)

# Python
import casadi
A = casadi.MX.sym('A', casadi.Sparsity.upper(2))
b = casadi.MX.sym('b', 2)
x = casadi.solve(A, b)
// C++
casadi::MX A = casadi::MX::sym("A", casadi::Sparsity::upper(2));
casadi::MX b = casadi::MX::sym("b", 2);
casadi::MX x = solve(A, b);  // for argument-dependent lookup, alternatively casadi::MX::solve(A, b) for static function

Cf. #2688.

Function

  • breaking SX/MX Function construction with free variables (i.e. symbols used in the output expressions that are not declared as inputs) now fails immediately unless the allow_free option is used.
  • breaking SX/MX Function construction now fails if there are duplicates in input names or output names, unless the allow_duplicate_io_names option is used #2604.
  • breaking Serialization: files saved with CasADi 3.5.5 will load in CasADi 3.6.0 (unittested), except for Functions that include a 'mumps' linear solver since serialization of this solver was deficient, and except for Functions that include an Integrator.
  • breaking custom_jacobian semantics changed. The Function must now return individual blocks (Jacobian of an output w.r.t. to an input)
  • breaking Changed API part for Jacobian sparsity (relevant for advanced use through external or Callback)
bool has_jac_sparsity(casadi_int oind, casadi_int iind) const override;
Sparsity get_jac_sparsity(casadi_int oind, casadi_int iind, bool symmetric) const override;
  • Function.find_function Can be used to retrieve Functions in a hierarchy.
  • Avoid truncation in printing #2452
  • breaking: Function outputs that are not used (passed a null pointer internally) will be logged (dump_in option ) as nan instead of earlier 0. E.g. Ipopt nlp_grad_f has two outputs, f and grad_f_x. The f output is not used internally, so will be logged as nan.

Code-generation

  • Function objects with an external call can now be codegenerated.
  • mmin/mmax now support codegeneration

Solvers/plugins

  • nlpsol/Opti.solver can now take an option 'detect_simple_bounds' (default False) that will promote general constraints to simple bounds (lbx/ubx).
  • Added SPRAL linear solver for Ipopt
  • Added QP solvers HPIPM, Proxqp, Highs
  • CPLEX interface will dynamically load libcplex<CPLEX_VERSION>, where CPLEX_VERSION is read from environmental variables. Same strategy for Gurobi.
  • SqpMethod Eigen-reflect/eigen-clip incorrect #2896

Generalized integrator support

The Integrator class, which solves initial-value problems in ODEs and DAEs has been thoroughly refactored. Changes include:

  • The integrator class now has a much more mature support for returning the IVP solution at multiple time points. It can now be obtained by providing a time grid to the integrator constructor. Unlike before, this support should now work in combination with forward/adjoint sensitivity analysis (to any order) and sparsity pattern calculations. Cf. #2823.
  • The integrator class now includes support for a piecewise constant control (u). The interface will keep track of changes to u and avoid integrating past such changes; for the Sundials (CVODES/IDAS) interfaces by setting a "stop time", for fixed step integrators by aligning the integration points with the grid points. Cf. #3025. Development versions of CasADi included support for this in a dedicated class, called Simulator, but this class has now been removed (breaking) and the functionality has been ported to the Integrator class.
    If you had code looking like cs.integrator('sim_function', 'cvodes', dae, tgrid, opts), you may replace it by cs.integrator('sim_function', 'cvodes', dae, 0, tgrid[1:], opts).
  • The Integrator class now much better exploits the problem structure in the sensitivity calculations, especially adjoint (and forward-over-adjoint, adjoint-over-adjoint) sensitivity calculations. Cf. #2823, #3047. The sensitivity analysis relies to a much less extent on symbolic reformulations and instead uses calls to the Function class for derivative calculations - this makes the class now more efficient for use with non-symbolic DAEs, including FMUs or other external models.
  • breaking The options t0, tf, output_t0 and grid have been deprecated and will result in a warning if used. Instead, the user can provide equivalent information via the integrator constructor, cf. previous point.
  • The backward states are no longer part of the DAE formulation. They are now derived from a user specified number of sensitivity equations (nadj). This is a slight restriction in the possible problem formulations, but on the other hand allows for a much better exploitation of adjoint sensitivity structure. The the backward states remain in the integrator class function inputs and outputs, but have now been renamed to align with their meaning; adj_xf means the adjoint seeds corresponding to xf (before they were called rx0), adj_p are the adjoint sensitivities corresponding to p (before called rqf and so on.
  • An option scale_abstol has been added to the Sundials integrators. If this is set to true, nominal values for the differential state and algebraic variables will be passed on to the solver. Cf. #3046

See "multipoint_simulation" in the example pack for a good starting point.

Function factory

  • breaking* Hessian blocks are now symmetric by default instead of returning only the upper triangular part. Prefix with triu: to get the old behavior.
  • breaking Multiple Jacobian and/or Hessian blocks can now be calculated more efficiently. Rather than calculating the blocks separately, calculation is done for multiple blocks at once, whenever possible.
    Cf. #2696.

DaeBuilder / FMI interoperability

  • The dependent parameters d and local dependent variables w have been replaced by the single dependent variables v.
  • The DaeBuilder::create function has been reimplemented and now uses the updated Function::factory support (above).
  • New proof-of-concept support for export of models in FMI 3.0 format, cf. #3009
  • New binary interface to standard FMI, including analytic validated first derivatives and validated hybrid second derivatives, cf. #2779
  • The Integrator class has been refactored to efficiently support non-symbolic DAEs, including from FMI - see below.

Binaries

  • Adding Python interfaces for versions 3.10 and 3.11
  • Adding builds for Mac silicon
  • Octave interface will now dynamically couple with the correct versioned octaveinterp version, such that the new binaries work with future releases of Octave that increment the octaveinterp ABI version number.

CLI

  • There is now a CasADi command line interface, casadi-cli. At the moment, functionality is very limited, just eval_dump, to evaluate Function that have been dumped to the disk (options dump,dump_in)

Documentation

Building

  • Source builds are no longer dependent on SWIG since Python and Matlab interface files generated by SWIG are now shipped in source archives.
  • Source builds can now build and integrate a range third-party open-source solver automatically. E.g. -DWITH_IPOPT=ON -DWITH_BUILD_REQUIRED=ON
  • Source builds can now use mockups for a range of third-party commercial solvers. E.g. -DWITH_CPLEX=ON -DWITH_MOCKUP_CPLEX=ON
  • Source packages for python pip are now available

Plugin versions used in binaries

3.6.0

  • dynamic-loading, Compile with support for dynamic loading of FMU libraries
  • sundials-interface, Interface to the ODE/DAE integrator suite SUNDIALS.
  • csparse-interface, Interface to the sparse direct linear solver CSparse.
  • superscs-interface, Interface to QP solver SUPERSCS.
  • osqp-interface, Interface to QP solver OSQP.
  • tinyxml-interface, Interface to the XML parser TinyXML.
  • qpoases-interface, Interface to the active-set QP solver qpOASES.
  • blocksqp-interface, Interface to the NLP solver blockSQP.
  • cplex-mockup-build, Use mockup CPLEX (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • snopt-mockup-build, Use mockup SNOPT (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • knitro-mockup-build, Use mockup KNITRO (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • gurobi-mockup-build, Use mockup GUROBI (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • worhp-mockup-build, Use mockup WORHP (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • hsl-mockup-build, Use mockup WORHP (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • highs-sourcebuild, Build HiGHS (BUILD_HIGHS_VERSION=v1.4.1) from downloaded source (BUILD_HIGHS_GIT_REPO=https://github.com/ERGO-Code/HiGHS).
  • proxqp-sourcebuild, Build PROXQP (BUILD_PROXQP_VERSION=v0.3.2) from downloaded source (BUILD_PROXQP_GIT_REPO=https://github.com/Simple-Robotics/proxsuite.git).
  • osqp-sourcebuild, Build OSQP (BUILD_OSQP_VERSION=v0.6.2) from downloaded source (BUILD_OSQP_GIT_REPO=https://github.com/osqp/osqp.git).
  • superscs-sourcebuild, Build SuperSCS (BUILD_SUPERSCS_VERSION=4d2d1bd03ed4cf93e684a880b233760ce34ca69c) from downloaded source (BUILD_SUPERSCS_GIT_REPO=https://github.com/jgillis/scs.git).
  • bonmin-sourcebuild, Build BONMIN (BUILD_BONMIN_VERSION=releases/1.8.8) from downloaded source (BUILD_BONMIN_GIT_REPO=https://github.com/coin-or/Bonmin.git).
  • ipopt-sourcebuild, Build IPOPT (BUILD_IPOPT_VERSION=3.14.11.mod) from downloaded source (BUILD_IPOPT_GIT_REPO=https://github.com/jgillis/Ipopt-1.git).
  • cbc-sourcebuild, Build CBC (BUILD_CBC_VERSION=releases/2.10.6) from downloaded source.
  • clp-sourcebuild, Build CLP (BUILD_CLP_VERSION=releases/1.17.7) from downloaded source (BUILD_CLP_GIT_REPO=https://github.com/coin-or/Clp.git).
  • mumps-sourcebuild, Build MUMPS (BUILD_MUMPS_TP_VERSION=releases/3.0.2) from downloaded source (BUILD_MUMPS_TP_GIT_REPO=https://github.com/coin-or-tools/ThirdParty-Mumps.git).
  • spral-sourcebuild, Build SPRAL (BUILD_SPRAL_VERSION=d385d2c9e858366d257cafaaf05760ffa6543e26) from downloaded source (BUILD_SPRAL_GIT_REPO=https://github.com/ralna/spral.git).
  • metis-sourcebuild, Build METIS (BUILD_METIS_TP_VERSION=releases/2.0.0) from downloaded source.
  • hpipm-sourcebuild, Build HPIPM (BUILD_HPIPM_VERSION=0e0c9f4e0d4081dceafa9b37c396db50bce0e81a) from downloaded source (BUILD_HPIPM_GIT_REPO=https://github.com/jgillis/hpipm.git).
  • blasfeo-sourcebuild, Build BLASFEO (BUILD_BLASFEO_VERSION=edf92b396adddd9e548b9786f87ad290a0971329) from downloaded source (BUILD_BLASFEO_GIT_REPO=https://github.com/giaf/blasfeo.git).
  • lapack-sourcebuild, Download and install OpenBLAS for LAPACK+BLAS
  • eigen3-sourcebuild, Build Eigen (BUILD_EIGEN3_VERSION=3.4.0) from downloaded source (BUILD_EIGEN3_GIT_REPO=https://gitlab.com/libeigen/eigen.git).
  • simde-sourcebuild, Build Simde (BUILD_SIMDE_VERSION=v0.7.2) from downloaded source (BUILD_SIMDE_GIT_REPO=https://github.com/simd-everywhere/simde.git).
  • cplex-interface, Interface to the QP solver CPLEX.
  • gurobi-interface, Interface to the (mixed-integer) QP solver GUROBI
  • knitro-interface, Interface to the NLP solver KNITRO.
  • snopt-interface, Interface to the NLP solver SNOPT.
  • worhp-interface, Interface to the NLP solver Worhp (requires gfortran, gomp).
  • lapack-interface, Interface to LAPACK.
  • mumps-interface, Interface to MUMPS.
  • spral-interface, Interface to SPRAL.
  • coinutils-sourcebuild, Build COINUTILS (BUILD_COINUTILS_VERSION=releases/2.11.6) from downloaded source.
  • osi-sourcebuild, Build OSI (BUILD_OSI_VERSION=releases/0.108.7) from downloaded source.
  • clp-interface, Interface to the LP solver CLP.
  • cgl-sourcebuild, Build CGL (BUILD_CGL_VERSION=releases/0.60.4) from downloaded source.
  • cbc-interface, Interface to the LP solver CBC.
  • ipopt-interface, Interface to the NLP solver Ipopt.
  • bonmin-interface, Interface to the MINLP framework Bonmin.
  • highs-interface, Interface to the MILP / QP solver HiGHS.
  • proxqp-interface, Interface to QP solver PROXQP.
  • ampl-interface, Interface to the AMPL solver library.

3.6.4

  • alpaqa-sourcebuild, Build Alpaqa (BUILD_ALPAQA_VERSION=develop) from downloaded source (BUILD_ALPAQA_GIT_REPO=https://github.com/jgillis/alpaqa).
  • highs-sourcebuild, Build HiGHS (BUILD_HIGHS_VERSION=v1.6.0) from downloaded source (BUILD_HIGHS_GIT_REPO=https://github.com/ERGO-Code/HiGHS).
  • sleqp-sourcebuild, Build SLEQP (BUILD_SLEQP_VERSION=patch-1) from downloaded source (BUILD_SLEQP_GIT_REPO=https://github.com/jgillis/sleqp.git).
  • bonmin-sourcebuild, Build BONMIN (BUILD_BONMIN_VERSION=releases/1.8.9) from downloaded source (BUILD_BONMIN_GIT_REPO=https://github.com/coin-or/Bonmin.git).
  • cbc-sourcebuild, Build CBC (BUILD_CBC_VERSION=releases/2.10.11) from downloaded source.
  • clp-sourcebuild, Build CLP (BUILD_CLP_VERSION=releases/1.17.9) from downloaded source (BUILD_CLP_GIT_REPO=https://github.com/coin-or/Clp.git).
  • trlib-sourcebuild, Build TRLIB (BUILD_TRLIB_VERSION=c7632b8b14152e78bc21721a3bd1a2432586b824) from downloaded source (BUILD_TRLIB_GIT_REPO=https://github.com/jgillis/trlib.git).
  • coinutils-sourcebuild, Build COINUTILS (BUILD_COINUTILS_VERSION=releases/2.11.10) from downloaded source.
  • osi-sourcebuild, Build OSI (BUILD_OSI_VERSION=releases/0.108.9) from downloaded source.
  • cgl-sourcebuild, Build CGL (BUILD_CGL_VERSION=releases/0.60.8) from downloaded source.
  • sleqp-interface, Interface to the NLP solver SLEQP.
  • alpaqa-interface, Interface to the NLP solver Alpaqa.

3.6.5

Changes in 3.6.1

  • Various bugfixes and patches https://github.com/casadi/casadi/milestone/24?closed=1
  • breaking serialization of integrator is not compatible with 3.6.0 due to bugfixes
  • git: master branch has been renamed to main, and has different semantics: it will be the branch where new features are added regularly before they become an official release. Latest official release is available as latest branch.

Changes in 3.6.2

Changes in 3.6.3

Changes in 3.6.4

Changes in 3.6.5

Changes in 3.6.6

casadi - 3.6.5

Published by jgillis 8 months ago

Install

Grab a binary from the table:

For Matlab/Octave, unzip in your home directory and adapt the path:

Check your installation:

Get started with the example pack. Onboarding pointers have been gathered by the community at our wiki.

Troubleshooting

  • KNITRO on linux crashes with a segmentation fault without LD_PRELOAD=<knitro_lin_path>/libiomp5.so.
  • Callbacks with one argument are broken in Matlab CasADi

Release notes

Symbolic expressions

  • Added SX/MX/DM operations #1595:
    • hypot(x,y) = sqrt(x*x+y*y)
    • log1p(x) = log(1+x)
    • expm1(x) = exp(x-1)
  • Added operation remainder with the semantics of the C operation
  • breaking AD rule of fmin/fmax` is now symmetric:
    jacobian(fmin(x,y),vertcat(x,y)) used to be [1 0] for x==y. Now yields [0.5 0.5].
  • Added AD rules for mmin/mmax
  • Added logsumexp which behaves like log(sum(exp(x))) but is numerically more accurate (and no overflow issues).
  • breaking vertcat/vcat,horzcat/hcat, etc now return a DM type instead of a Sparsity type #2549
  • breaking CasADi-Matlab mod has been renamed to rem, because its numerical behaviour is like the builtin-Matlab rem. The builtin-Matlab mod has no CasADi counterpart. CasADi-Python mod has been removed, because its numerical behaviour is not like numpy.mod. #2767. numpy.mod has no counterpart in CasADi; only fmod is equivalent.
  • DAE index reduction support (Pantelides structural algorithm) See https://github.com/casadi/casadi/blob/3.6.0/docs/examples/python/dae_reduced_index.py
  • Fixed flaw in codegen with MX if_else

Common subexpression elimination

  • Added Common Subexpression Elimination #1540 for MX and SX.
    CasADi can now efficiently eliminate redundant computation by inspecting an expression graph and removing redundant nodes.

Before, CasADi internals would avoid introducing redundant nodes during operations on a given expression, but the user was responsible to avoid duplication when constructing that expression.

There is a function cse() that you may apply to expressions:

x = MX.sym('x')

# User responsibility
sx = sin(x)
y = sqrt(sx)+sx # MX(@1=sin(x), (sqrt(@1)+@1))

# cse
y = sqrt(sin(x))+sin(x) # MX((sqrt(sin(x))+sin(x)))
y = cse(y) # MX(@1=sin(x), (sqrt(@1)+@1))

There is a boolean option cse that may be used when constructing a Function:

x = MX.sym('x')

f = Function('f',[x],[sqrt(sin(x))+sin(x)],{"cse":True})
f.disp(True)
f:(i0)->(o0) MXFunction
Algorithm:
@0 = input[0][0]
@0 = sin(@0)
@1 = sqrt(@0)
@1 = (@1+@0)
output[0][0] = @1

The technique scales favorably for large graphs.

Triangular solve triangular solve nodes in MX

MX how has atomic support for solving upper and lower triangular linear systems without allocating any linear solver instance. The operation handles the case with unity diagonal separately for efficiency and supports C code generation. To use the feature, call casadi.solve(A, b) (Python or MATLAB/Octave)

# Python
import casadi
A = casadi.MX.sym('A', casadi.Sparsity.upper(2))
b = casadi.MX.sym('b', 2)
x = casadi.solve(A, b)
// C++
casadi::MX A = casadi::MX::sym("A", casadi::Sparsity::upper(2));
casadi::MX b = casadi::MX::sym("b", 2);
casadi::MX x = solve(A, b);  // for argument-dependent lookup, alternatively casadi::MX::solve(A, b) for static function

Cf. #2688.

Function

  • breaking SX/MX Function construction with free variables (i.e. symbols used in the output expressions that are not declared as inputs) now fails immediately unless the allow_free option is used.
  • breaking SX/MX Function construction now fails if there are duplicates in input names or output names, unless the allow_duplicate_io_names option is used #2604.
  • breaking Serialization: files saved with CasADi 3.5.5 will load in CasADi 3.6.0 (unittested), except for Functions that include a 'mumps' linear solver since serialization of this solver was deficient, and except for Functions that include an Integrator.
  • breaking custom_jacobian semantics changed. The Function must now return individual blocks (Jacobian of an output w.r.t. to an input)
  • breaking Changed API part for Jacobian sparsity (relevant for advanced use through external or Callback)
bool has_jac_sparsity(casadi_int oind, casadi_int iind) const override;
Sparsity get_jac_sparsity(casadi_int oind, casadi_int iind, bool symmetric) const override;
  • Function.find_function Can be used to retrieve Functions in a hierarchy.
  • Avoid truncation in printing #2452
  • breaking: Function outputs that are not used (passed a null pointer internally) will be logged (dump_in option ) as nan instead of earlier 0. E.g. Ipopt nlp_grad_f has two outputs, f and grad_f_x. The f output is not used internally, so will be logged as nan.

Code-generation

  • Function objects with an external call can now be codegenerated.
  • mmin/mmax now support codegeneration

Solvers/plugins

  • nlpsol/Opti.solver can now take an option 'detect_simple_bounds' (default False) that will promote general constraints to simple bounds (lbx/ubx).
  • Added SPRAL linear solver for Ipopt
  • Added QP solvers HPIPM, Proxqp, Highs
  • CPLEX interface will dynamically load libcplex<CPLEX_VERSION>, where CPLEX_VERSION is read from environmental variables. Same strategy for Gurobi.
  • SqpMethod Eigen-reflect/eigen-clip incorrect #2896

Generalized integrator support

The Integrator class, which solves initial-value problems in ODEs and DAEs has been thoroughly refactored. Changes include:

  • The integrator class now has a much more mature support for returning the IVP solution at multiple time points. It can now be obtained by providing a time grid to the integrator constructor. Unlike before, this support should now work in combination with forward/adjoint sensitivity analysis (to any order) and sparsity pattern calculations. Cf. #2823.
  • The integrator class now includes support for a piecewise constant control (u). The interface will keep track of changes to u and avoid integrating past such changes; for the Sundials (CVODES/IDAS) interfaces by setting a "stop time", for fixed step integrators by aligning the integration points with the grid points. Cf. #3025. Development versions of CasADi included support for this in a dedicated class, called Simulator, but this class has now been removed (breaking) and the functionality has been ported to the Integrator class.
    If you had code looking like cs.integrator('sim_function', 'cvodes', dae, tgrid, opts), you may replace it by cs.integrator('sim_function', 'cvodes', dae, 0, tgrid[1:], opts).
  • The Integrator class now much better exploits the problem structure in the sensitivity calculations, especially adjoint (and forward-over-adjoint, adjoint-over-adjoint) sensitivity calculations. Cf. #2823, #3047. The sensitivity analysis relies to a much less extent on symbolic reformulations and instead uses calls to the Function class for derivative calculations - this makes the class now more efficient for use with non-symbolic DAEs, including FMUs or other external models.
  • breaking The options t0, tf, output_t0 and grid have been deprecated and will result in a warning if used. Instead, the user can provide equivalent information via the integrator constructor, cf. previous point.
  • The backward states are no longer part of the DAE formulation. They are now derived from a user specified number of sensitivity equations (nadj). This is a slight restriction in the possible problem formulations, but on the other hand allows for a much better exploitation of adjoint sensitivity structure. The the backward states remain in the integrator class function inputs and outputs, but have now been renamed to align with their meaning; adj_xf means the adjoint seeds corresponding to xf (before they were called rx0), adj_p are the adjoint sensitivities corresponding to p (before called rqf and so on.
  • An option scale_abstol has been added to the Sundials integrators. If this is set to true, nominal values for the differential state and algebraic variables will be passed on to the solver. Cf. #3046

See "multipoint_simulation" in the example pack for a good starting point.

Function factory

  • breaking* Hessian blocks are now symmetric by default instead of returning only the upper triangular part. Prefix with triu: to get the old behavior.
  • breaking Multiple Jacobian and/or Hessian blocks can now be calculated more efficiently. Rather than calculating the blocks separately, calculation is done for multiple blocks at once, whenever possible.
    Cf. #2696.

DaeBuilder / FMI interoperability

  • The dependent parameters d and local dependent variables w have been replaced by the single dependent variables v.
  • The DaeBuilder::create function has been reimplemented and now uses the updated Function::factory support (above).
  • New proof-of-concept support for export of models in FMI 3.0 format, cf. #3009
  • New binary interface to standard FMI, including analytic validated first derivatives and validated hybrid second derivatives, cf. #2779
  • The Integrator class has been refactored to efficiently support non-symbolic DAEs, including from FMI - see below.

Binaries

  • Adding Python interfaces for versions 3.10 and 3.11
  • Adding builds for Mac silicon
  • Octave interface will now dynamically couple with the correct versioned octaveinterp version, such that the new binaries work with future releases of Octave that increment the octaveinterp ABI version number.

CLI

  • There is now a CasADi command line interface, casadi-cli. At the moment, functionality is very limited, just eval_dump, to evaluate Function that have been dumped to the disk (options dump,dump_in)

Documentation

Building

  • Source builds are no longer dependent on SWIG since Python and Matlab interface files generated by SWIG are now shipped in source archives.
  • Source builds can now build and integrate a range third-party open-source solver automatically. E.g. -DWITH_IPOPT=ON -DWITH_BUILD_REQUIRED=ON
  • Source builds can now use mockups for a range of third-party commercial solvers. E.g. -DWITH_CPLEX=ON -DWITH_MOCKUP_CPLEX=ON
  • Source packages for python pip are now available

Plugin versions used in binaries

3.6.0

  • dynamic-loading, Compile with support for dynamic loading of FMU libraries
  • sundials-interface, Interface to the ODE/DAE integrator suite SUNDIALS.
  • csparse-interface, Interface to the sparse direct linear solver CSparse.
  • superscs-interface, Interface to QP solver SUPERSCS.
  • osqp-interface, Interface to QP solver OSQP.
  • tinyxml-interface, Interface to the XML parser TinyXML.
  • qpoases-interface, Interface to the active-set QP solver qpOASES.
  • blocksqp-interface, Interface to the NLP solver blockSQP.
  • cplex-mockup-build, Use mockup CPLEX (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • snopt-mockup-build, Use mockup SNOPT (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • knitro-mockup-build, Use mockup KNITRO (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • gurobi-mockup-build, Use mockup GUROBI (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • worhp-mockup-build, Use mockup WORHP (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • hsl-mockup-build, Use mockup WORHP (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • highs-sourcebuild, Build HiGHS (BUILD_HIGHS_VERSION=v1.4.1) from downloaded source (BUILD_HIGHS_GIT_REPO=https://github.com/ERGO-Code/HiGHS).
  • proxqp-sourcebuild, Build PROXQP (BUILD_PROXQP_VERSION=v0.3.2) from downloaded source (BUILD_PROXQP_GIT_REPO=https://github.com/Simple-Robotics/proxsuite.git).
  • osqp-sourcebuild, Build OSQP (BUILD_OSQP_VERSION=v0.6.2) from downloaded source (BUILD_OSQP_GIT_REPO=https://github.com/osqp/osqp.git).
  • superscs-sourcebuild, Build SuperSCS (BUILD_SUPERSCS_VERSION=4d2d1bd03ed4cf93e684a880b233760ce34ca69c) from downloaded source (BUILD_SUPERSCS_GIT_REPO=https://github.com/jgillis/scs.git).
  • bonmin-sourcebuild, Build BONMIN (BUILD_BONMIN_VERSION=releases/1.8.8) from downloaded source (BUILD_BONMIN_GIT_REPO=https://github.com/coin-or/Bonmin.git).
  • ipopt-sourcebuild, Build IPOPT (BUILD_IPOPT_VERSION=3.14.11.mod) from downloaded source (BUILD_IPOPT_GIT_REPO=https://github.com/jgillis/Ipopt-1.git).
  • cbc-sourcebuild, Build CBC (BUILD_CBC_VERSION=releases/2.10.6) from downloaded source.
  • clp-sourcebuild, Build CLP (BUILD_CLP_VERSION=releases/1.17.7) from downloaded source (BUILD_CLP_GIT_REPO=https://github.com/coin-or/Clp.git).
  • mumps-sourcebuild, Build MUMPS (BUILD_MUMPS_TP_VERSION=releases/3.0.2) from downloaded source (BUILD_MUMPS_TP_GIT_REPO=https://github.com/coin-or-tools/ThirdParty-Mumps.git).
  • spral-sourcebuild, Build SPRAL (BUILD_SPRAL_VERSION=d385d2c9e858366d257cafaaf05760ffa6543e26) from downloaded source (BUILD_SPRAL_GIT_REPO=https://github.com/ralna/spral.git).
  • metis-sourcebuild, Build METIS (BUILD_METIS_TP_VERSION=releases/2.0.0) from downloaded source.
  • hpipm-sourcebuild, Build HPIPM (BUILD_HPIPM_VERSION=0e0c9f4e0d4081dceafa9b37c396db50bce0e81a) from downloaded source (BUILD_HPIPM_GIT_REPO=https://github.com/jgillis/hpipm.git).
  • blasfeo-sourcebuild, Build BLASFEO (BUILD_BLASFEO_VERSION=edf92b396adddd9e548b9786f87ad290a0971329) from downloaded source (BUILD_BLASFEO_GIT_REPO=https://github.com/giaf/blasfeo.git).
  • lapack-sourcebuild, Download and install OpenBLAS for LAPACK+BLAS
  • eigen3-sourcebuild, Build Eigen (BUILD_EIGEN3_VERSION=3.4.0) from downloaded source (BUILD_EIGEN3_GIT_REPO=https://gitlab.com/libeigen/eigen.git).
  • simde-sourcebuild, Build Simde (BUILD_SIMDE_VERSION=v0.7.2) from downloaded source (BUILD_SIMDE_GIT_REPO=https://github.com/simd-everywhere/simde.git).
  • cplex-interface, Interface to the QP solver CPLEX.
  • gurobi-interface, Interface to the (mixed-integer) QP solver GUROBI
  • knitro-interface, Interface to the NLP solver KNITRO.
  • snopt-interface, Interface to the NLP solver SNOPT.
  • worhp-interface, Interface to the NLP solver Worhp (requires gfortran, gomp).
  • lapack-interface, Interface to LAPACK.
  • mumps-interface, Interface to MUMPS.
  • spral-interface, Interface to SPRAL.
  • coinutils-sourcebuild, Build COINUTILS (BUILD_COINUTILS_VERSION=releases/2.11.6) from downloaded source.
  • osi-sourcebuild, Build OSI (BUILD_OSI_VERSION=releases/0.108.7) from downloaded source.
  • clp-interface, Interface to the LP solver CLP.
  • cgl-sourcebuild, Build CGL (BUILD_CGL_VERSION=releases/0.60.4) from downloaded source.
  • cbc-interface, Interface to the LP solver CBC.
  • ipopt-interface, Interface to the NLP solver Ipopt.
  • bonmin-interface, Interface to the MINLP framework Bonmin.
  • highs-interface, Interface to the MILP / QP solver HiGHS.
  • proxqp-interface, Interface to QP solver PROXQP.
  • ampl-interface, Interface to the AMPL solver library.

3.6.4

  • alpaqa-sourcebuild, Build Alpaqa (BUILD_ALPAQA_VERSION=develop) from downloaded source (BUILD_ALPAQA_GIT_REPO=https://github.com/jgillis/alpaqa).
  • highs-sourcebuild, Build HiGHS (BUILD_HIGHS_VERSION=v1.6.0) from downloaded source (BUILD_HIGHS_GIT_REPO=https://github.com/ERGO-Code/HiGHS).
  • sleqp-sourcebuild, Build SLEQP (BUILD_SLEQP_VERSION=patch-1) from downloaded source (BUILD_SLEQP_GIT_REPO=https://github.com/jgillis/sleqp.git).
  • bonmin-sourcebuild, Build BONMIN (BUILD_BONMIN_VERSION=releases/1.8.9) from downloaded source (BUILD_BONMIN_GIT_REPO=https://github.com/coin-or/Bonmin.git).
  • cbc-sourcebuild, Build CBC (BUILD_CBC_VERSION=releases/2.10.11) from downloaded source.
  • clp-sourcebuild, Build CLP (BUILD_CLP_VERSION=releases/1.17.9) from downloaded source (BUILD_CLP_GIT_REPO=https://github.com/coin-or/Clp.git).
  • trlib-sourcebuild, Build TRLIB (BUILD_TRLIB_VERSION=c7632b8b14152e78bc21721a3bd1a2432586b824) from downloaded source (BUILD_TRLIB_GIT_REPO=https://github.com/jgillis/trlib.git).
  • coinutils-sourcebuild, Build COINUTILS (BUILD_COINUTILS_VERSION=releases/2.11.10) from downloaded source.
  • osi-sourcebuild, Build OSI (BUILD_OSI_VERSION=releases/0.108.9) from downloaded source.
  • cgl-sourcebuild, Build CGL (BUILD_CGL_VERSION=releases/0.60.8) from downloaded source.
  • sleqp-interface, Interface to the NLP solver SLEQP.
  • alpaqa-interface, Interface to the NLP solver Alpaqa.

Changes in 3.6.1

  • Various bugfixes and patches https://github.com/casadi/casadi/milestone/24?closed=1
  • breaking serialization of integrator is not compatible with 3.6.0 due to bugfixes
  • git: master branch has been renamed to main, and has different semantics: it will be the branch where new features are added regularly before they become an official release. Latest official release is available as latest branch.

Changes in 3.6.2

Changes in 3.6.3

Changes in 3.6.4

Changes in 3.6.5

casadi - 3.6.4

Published by jgillis 12 months ago

Install

Grab a binary from the table:

For Matlab/Octave, unzip in your home directory and adapt the path:

Check your installation:

Get started with the example pack. Onboarding pointers have been gathered by the community at our wiki.

Troubleshooting

  • KNITRO on linux crashes with a segmentation fault without LD_PRELOAD=<knitro_lin_path>/libiomp5.so.
  • Callbacks with one argument are broken in Matlab CasADi

Release notes

Symbolic expressions

  • Added SX/MX/DM operations #1595:
    • hypot(x,y) = sqrt(x*x+y*y)
    • log1p(x) = log(1+x)
    • expm1(x) = exp(x-1)
  • Added operation remainder with the semantics of the C operation
  • breaking AD rule of fmin/fmax` is now symmetric:
    jacobian(fmin(x,y),vertcat(x,y)) used to be [1 0] for x==y. Now yields [0.5 0.5].
  • Added AD rules for mmin/mmax
  • Added logsumexp which behaves like log(sum(exp(x))) but is numerically more accurate (and no overflow issues).
  • breaking vertcat/vcat,horzcat/hcat, etc now return a DM type instead of a Sparsity type #2549
  • breaking CasADi-Matlab mod has been renamed to rem, because its numerical behaviour is like the builtin-Matlab rem. The builtin-Matlab mod has no CasADi counterpart. CasADi-Python mod has been removed, because its numerical behaviour is not like numpy.mod. #2767. numpy.mod has no counterpart in CasADi; only fmod is equivalent.
  • DAE index reduction support (Pantelides structural algorithm) See https://github.com/casadi/casadi/blob/3.6.0/docs/examples/python/dae_reduced_index.py
  • Fixed flaw in codegen with MX if_else

Common subexpression elimination

  • Added Common Subexpression Elimination #1540 for MX and SX.
    CasADi can now efficiently eliminate redundant computation by inspecting an expression graph and removing redundant nodes.

Before, CasADi internals would avoid introducing redundant nodes during operations on a given expression, but the user was responsible to avoid duplication when constructing that expression.

There is a function cse() that you may apply to expressions:

x = MX.sym('x')

# User responsibility
sx = sin(x)
y = sqrt(sx)+sx # MX(@1=sin(x), (sqrt(@1)+@1))

# cse
y = sqrt(sin(x))+sin(x) # MX((sqrt(sin(x))+sin(x)))
y = cse(y) # MX(@1=sin(x), (sqrt(@1)+@1))

There is a boolean option cse that may be used when constructing a Function:

x = MX.sym('x')

f = Function('f',[x],[sqrt(sin(x))+sin(x)],{"cse":True})
f.disp(True)
f:(i0)->(o0) MXFunction
Algorithm:
@0 = input[0][0]
@0 = sin(@0)
@1 = sqrt(@0)
@1 = (@1+@0)
output[0][0] = @1

The technique scales favorably for large graphs.

Triangular solve triangular solve nodes in MX

MX how has atomic support for solving upper and lower triangular linear systems without allocating any linear solver instance. The operation handles the case with unity diagonal separately for efficiency and supports C code generation. To use the feature, call casadi.solve(A, b) (Python or MATLAB/Octave)

# Python
import casadi
A = casadi.MX.sym('A', casadi.Sparsity.upper(2))
b = casadi.MX.sym('b', 2)
x = casadi.solve(A, b)
// C++
casadi::MX A = casadi::MX::sym("A", casadi::Sparsity::upper(2));
casadi::MX b = casadi::MX::sym("b", 2);
casadi::MX x = solve(A, b);  // for argument-dependent lookup, alternatively casadi::MX::solve(A, b) for static function

Cf. #2688.

Function

  • breaking SX/MX Function construction with free variables (i.e. symbols used in the output expressions that are not declared as inputs) now fails immediately unless the allow_free option is used.
  • breaking SX/MX Function construction now fails if there are duplicates in input names or output names, unless the allow_duplicate_io_names option is used #2604.
  • breaking Serialization: files saved with CasADi 3.5.5 will load in CasADi 3.6.0 (unittested), except for Functions that include a 'mumps' linear solver since serialization of this solver was deficient, and except for Functions that include an Integrator.
  • breaking custom_jacobian semantics changed. The Function must now return individual blocks (Jacobian of an output w.r.t. to an input)
  • breaking Changed API part for Jacobian sparsity (relevant for advanced use through external or Callback)
bool has_jac_sparsity(casadi_int oind, casadi_int iind) const override;
Sparsity get_jac_sparsity(casadi_int oind, casadi_int iind, bool symmetric) const override;
  • Function.find_function Can be used to retrieve Functions in a hierarchy.
  • Avoid truncation in printing #2452
  • breaking: Function outputs that are not used (passed a null pointer internally) will be logged (dump_in option ) as nan instead of earlier 0. E.g. Ipopt nlp_grad_f has two outputs, f and grad_f_x. The f output is not used internally, so will be logged as nan.

Code-generation

  • Function objects with an external call can now be codegenerated.
  • mmin/mmax now support codegeneration

Solvers/plugins

  • nlpsol/Opti.solver can now take an option 'detect_simple_bounds' (default False) that will promote general constraints to simple bounds (lbx/ubx).
  • Added SPRAL linear solver for Ipopt
  • Added QP solvers HPIPM, Proxqp, Highs
  • CPLEX interface will dynamically load libcplex<CPLEX_VERSION>, where CPLEX_VERSION is read from environmental variables. Same strategy for Gurobi.
  • SqpMethod Eigen-reflect/eigen-clip incorrect #2896

Generalized integrator support

The Integrator class, which solves initial-value problems in ODEs and DAEs has been thoroughly refactored. Changes include:

  • The integrator class now has a much more mature support for returning the IVP solution at multiple time points. It can now be obtained by providing a time grid to the integrator constructor. Unlike before, this support should now work in combination with forward/adjoint sensitivity analysis (to any order) and sparsity pattern calculations. Cf. #2823.
  • The integrator class now includes support for a piecewise constant control (u). The interface will keep track of changes to u and avoid integrating past such changes; for the Sundials (CVODES/IDAS) interfaces by setting a "stop time", for fixed step integrators by aligning the integration points with the grid points. Cf. #3025. Development versions of CasADi included support for this in a dedicated class, called Simulator, but this class has now been removed (breaking) and the functionality has been ported to the Integrator class.
    If you had code looking like cs.integrator('sim_function', 'cvodes', dae, tgrid, opts), you may replace it by cs.integrator('sim_function', 'cvodes', dae, 0, tgrid[1:], opts).
  • The Integrator class now much better exploits the problem structure in the sensitivity calculations, especially adjoint (and forward-over-adjoint, adjoint-over-adjoint) sensitivity calculations. Cf. #2823, #3047. The sensitivity analysis relies to a much less extent on symbolic reformulations and instead uses calls to the Function class for derivative calculations - this makes the class now more efficient for use with non-symbolic DAEs, including FMUs or other external models.
  • breaking The options t0, tf, output_t0 and grid have been deprecated and will result in a warning if used. Instead, the user can provide equivalent information via the integrator constructor, cf. previous point.
  • The backward states are no longer part of the DAE formulation. They are now derived from a user specified number of sensitivity equations (nadj). This is a slight restriction in the possible problem formulations, but on the other hand allows for a much better exploitation of adjoint sensitivity structure. The the backward states remain in the integrator class function inputs and outputs, but have now been renamed to align with their meaning; adj_xf means the adjoint seeds corresponding to xf (before they were called rx0), adj_p are the adjoint sensitivities corresponding to p (before called rqf and so on.
  • An option scale_abstol has been added to the Sundials integrators. If this is set to true, nominal values for the differential state and algebraic variables will be passed on to the solver. Cf. #3046

See "multipoint_simulation" in the example pack for a good starting point.

Function factory

  • breaking* Hessian blocks are now symmetric by default instead of returning only the upper triangular part. Prefix with triu: to get the old behavior.
  • breaking Multiple Jacobian and/or Hessian blocks can now be calculated more efficiently. Rather than calculating the blocks separately, calculation is done for multiple blocks at once, whenever possible.
    Cf. #2696.

DaeBuilder / FMI interoperability

  • The dependent parameters d and local dependent variables w have been replaced by the single dependent variables v.
  • The DaeBuilder::create function has been reimplemented and now uses the updated Function::factory support (above).
  • New proof-of-concept support for export of models in FMI 3.0 format, cf. #3009
  • New binary interface to standard FMI, including analytic validated first derivatives and validated hybrid second derivatives, cf. #2779
  • The Integrator class has been refactored to efficiently support non-symbolic DAEs, including from FMI - see below.

Binaries

  • Adding Python interfaces for versions 3.10 and 3.11
  • Adding builds for Mac silicon
  • Octave interface will now dynamically couple with the correct versioned octaveinterp version, such that the new binaries work with future releases of Octave that increment the octaveinterp ABI version number.

CLI

  • There is now a CasADi command line interface, casadi-cli. At the moment, functionality is very limited, just eval_dump, to evaluate Function that have been dumped to the disk (options dump,dump_in)

Documentation

Building

  • Source builds are no longer dependent on SWIG since Python and Matlab interface files generated by SWIG are now shipped in source archives.
  • Source builds can now build and integrate a range third-party open-source solver automatically. E.g. -DWITH_IPOPT=ON -DWITH_BUILD_REQUIRED=ON
  • Source builds can now use mockups for a range of third-party commercial solvers. E.g. -DWITH_CPLEX=ON -DWITH_MOCKUP_CPLEX=ON
  • Source packages for python pip are now available

Plugin versions used in binaries

3.6.0

  • dynamic-loading, Compile with support for dynamic loading of FMU libraries
  • sundials-interface, Interface to the ODE/DAE integrator suite SUNDIALS.
  • csparse-interface, Interface to the sparse direct linear solver CSparse.
  • superscs-interface, Interface to QP solver SUPERSCS.
  • osqp-interface, Interface to QP solver OSQP.
  • tinyxml-interface, Interface to the XML parser TinyXML.
  • qpoases-interface, Interface to the active-set QP solver qpOASES.
  • blocksqp-interface, Interface to the NLP solver blockSQP.
  • cplex-mockup-build, Use mockup CPLEX (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • snopt-mockup-build, Use mockup SNOPT (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • knitro-mockup-build, Use mockup KNITRO (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • gurobi-mockup-build, Use mockup GUROBI (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • worhp-mockup-build, Use mockup WORHP (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • hsl-mockup-build, Use mockup WORHP (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • highs-sourcebuild, Build HiGHS (BUILD_HIGHS_VERSION=v1.4.1) from downloaded source (BUILD_HIGHS_GIT_REPO=https://github.com/ERGO-Code/HiGHS).
  • proxqp-sourcebuild, Build PROXQP (BUILD_PROXQP_VERSION=v0.3.2) from downloaded source (BUILD_PROXQP_GIT_REPO=https://github.com/Simple-Robotics/proxsuite.git).
  • osqp-sourcebuild, Build OSQP (BUILD_OSQP_VERSION=v0.6.2) from downloaded source (BUILD_OSQP_GIT_REPO=https://github.com/osqp/osqp.git).
  • superscs-sourcebuild, Build SuperSCS (BUILD_SUPERSCS_VERSION=4d2d1bd03ed4cf93e684a880b233760ce34ca69c) from downloaded source (BUILD_SUPERSCS_GIT_REPO=https://github.com/jgillis/scs.git).
  • bonmin-sourcebuild, Build BONMIN (BUILD_BONMIN_VERSION=releases/1.8.8) from downloaded source (BUILD_BONMIN_GIT_REPO=https://github.com/coin-or/Bonmin.git).
  • ipopt-sourcebuild, Build IPOPT (BUILD_IPOPT_VERSION=3.14.11.mod) from downloaded source (BUILD_IPOPT_GIT_REPO=https://github.com/jgillis/Ipopt-1.git).
  • cbc-sourcebuild, Build CBC (BUILD_CBC_VERSION=releases/2.10.6) from downloaded source.
  • clp-sourcebuild, Build CLP (BUILD_CLP_VERSION=releases/1.17.7) from downloaded source (BUILD_CLP_GIT_REPO=https://github.com/coin-or/Clp.git).
  • mumps-sourcebuild, Build MUMPS (BUILD_MUMPS_TP_VERSION=releases/3.0.2) from downloaded source (BUILD_MUMPS_TP_GIT_REPO=https://github.com/coin-or-tools/ThirdParty-Mumps.git).
  • spral-sourcebuild, Build SPRAL (BUILD_SPRAL_VERSION=d385d2c9e858366d257cafaaf05760ffa6543e26) from downloaded source (BUILD_SPRAL_GIT_REPO=https://github.com/ralna/spral.git).
  • metis-sourcebuild, Build METIS (BUILD_METIS_TP_VERSION=releases/2.0.0) from downloaded source.
  • hpipm-sourcebuild, Build HPIPM (BUILD_HPIPM_VERSION=0e0c9f4e0d4081dceafa9b37c396db50bce0e81a) from downloaded source (BUILD_HPIPM_GIT_REPO=https://github.com/jgillis/hpipm.git).
  • blasfeo-sourcebuild, Build BLASFEO (BUILD_BLASFEO_VERSION=edf92b396adddd9e548b9786f87ad290a0971329) from downloaded source (BUILD_BLASFEO_GIT_REPO=https://github.com/giaf/blasfeo.git).
  • lapack-sourcebuild, Download and install OpenBLAS for LAPACK+BLAS
  • eigen3-sourcebuild, Build Eigen (BUILD_EIGEN3_VERSION=3.4.0) from downloaded source (BUILD_EIGEN3_GIT_REPO=https://gitlab.com/libeigen/eigen.git).
  • simde-sourcebuild, Build Simde (BUILD_SIMDE_VERSION=v0.7.2) from downloaded source (BUILD_SIMDE_GIT_REPO=https://github.com/simd-everywhere/simde.git).
  • cplex-interface, Interface to the QP solver CPLEX.
  • gurobi-interface, Interface to the (mixed-integer) QP solver GUROBI
  • knitro-interface, Interface to the NLP solver KNITRO.
  • snopt-interface, Interface to the NLP solver SNOPT.
  • worhp-interface, Interface to the NLP solver Worhp (requires gfortran, gomp).
  • lapack-interface, Interface to LAPACK.
  • mumps-interface, Interface to MUMPS.
  • spral-interface, Interface to SPRAL.
  • coinutils-sourcebuild, Build COINUTILS (BUILD_COINUTILS_VERSION=releases/2.11.6) from downloaded source.
  • osi-sourcebuild, Build OSI (BUILD_OSI_VERSION=releases/0.108.7) from downloaded source.
  • clp-interface, Interface to the LP solver CLP.
  • cgl-sourcebuild, Build CGL (BUILD_CGL_VERSION=releases/0.60.4) from downloaded source.
  • cbc-interface, Interface to the LP solver CBC.
  • ipopt-interface, Interface to the NLP solver Ipopt.
  • bonmin-interface, Interface to the MINLP framework Bonmin.
  • highs-interface, Interface to the MILP / QP solver HiGHS.
  • proxqp-interface, Interface to QP solver PROXQP.
  • ampl-interface, Interface to the AMPL solver library.

3.6.4

  • dynamic-loading, Support for import of FMI 2.0 binaries
  • sundials-interface, Interface to the ODE/DAE integrator suite SUNDIALS.
  • csparse-interface, Interface to the sparse direct linear solver CSparse.
  • superscs-interface, Interface to QP solver SUPERSCS.
  • osqp-interface, Interface to QP solver OSQP.
  • tinyxml-interface, Interface to the XML parser TinyXML.
  • qpoases-interface, Interface to the active-set QP solver qpOASES.
  • blocksqp-interface, Interface to the NLP solver blockSQP.
  • cplex-mockup-build, Use mockup CPLEX (BUILD_MOCKUPS_VERSION=v65) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • snopt-mockup-build, Use mockup SNOPT (BUILD_MOCKUPS_VERSION=v65) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • knitro-mockup-build, Use mockup KNITRO (BUILD_MOCKUPS_VERSION=v65) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • gurobi-mockup-build, Use mockup GUROBI (BUILD_MOCKUPS_VERSION=v65) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • worhp-mockup-build, Use mockup WORHP (BUILD_MOCKUPS_VERSION=v65) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • hsl-mockup-build, Use mockup WORHP (BUILD_MOCKUPS_VERSION=v65) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • alpaqa-sourcebuild, Build Alpaqa (BUILD_ALPAQA_VERSION=develop) from downloaded source (BUILD_ALPAQA_GIT_REPO=https://github.com/jgillis/alpaqa).
  • highs-sourcebuild, Build HiGHS (BUILD_HIGHS_VERSION=v1.6.0) from downloaded source (BUILD_HIGHS_GIT_REPO=https://github.com/ERGO-Code/HiGHS).
  • proxqp-sourcebuild, Build PROXQP (BUILD_PROXQP_VERSION=v0.3.2) from downloaded source (BUILD_PROXQP_GIT_REPO=https://github.com/Simple-Robotics/proxsuite.git).
  • osqp-sourcebuild, Build OSQP (BUILD_OSQP_VERSION=v0.6.2) from downloaded source (BUILD_OSQP_GIT_REPO=https://github.com/osqp/osqp.git).
  • superscs-sourcebuild, Build SuperSCS (BUILD_SUPERSCS_VERSION=4d2d1bd03ed4cf93e684a880b233760ce34ca69c) from downloaded source (BUILD_SUPERSCS_GIT_REPO=https://github.com/jgillis/scs.git).
  • sleqp-sourcebuild, Build SLEQP (BUILD_SLEQP_VERSION=patch-1) from downloaded source (BUILD_SLEQP_GIT_REPO=https://github.com/jgillis/sleqp.git).
  • bonmin-sourcebuild, Build BONMIN (BUILD_BONMIN_VERSION=releases/1.8.9) from downloaded source (BUILD_BONMIN_GIT_REPO=https://github.com/coin-or/Bonmin.git).
  • ipopt-sourcebuild, Build IPOPT (BUILD_IPOPT_VERSION=3.14.11.mod) from downloaded source (BUILD_IPOPT_GIT_REPO=https://github.com/jgillis/Ipopt-1.git).
  • cbc-sourcebuild, Build CBC (BUILD_CBC_VERSION=releases/2.10.11) from downloaded source.
  • clp-sourcebuild, Build CLP (BUILD_CLP_VERSION=releases/1.17.9) from downloaded source (BUILD_CLP_GIT_REPO=https://github.com/coin-or/Clp.git).
  • mumps-sourcebuild, Build MUMPS (BUILD_MUMPS_TP_VERSION=releases/3.0.2) from downloaded source (BUILD_MUMPS_TP_GIT_REPO=https://github.com/coin-or-tools/ThirdParty-Mumps.git).
  • spral-sourcebuild, Build SPRAL (BUILD_SPRAL_VERSION=d385d2c9e858366d257cafaaf05760ffa6543e26) from downloaded source (BUILD_SPRAL_GIT_REPO=https://github.com/ralna/spral.git).
  • metis-sourcebuild, Build METIS (BUILD_METIS_TP_VERSION=releases/2.0.0) from downloaded source.
  • hpipm-sourcebuild, Build HPIPM (BUILD_HPIPM_VERSION=0e0c9f4e0d4081dceafa9b37c396db50bce0e81a) from downloaded source (BUILD_HPIPM_GIT_REPO=https://github.com/jgillis/hpipm.git).
  • trlib-sourcebuild, Build TRLIB (BUILD_TRLIB_VERSION=c7632b8b14152e78bc21721a3bd1a2432586b824) from downloaded source (BUILD_TRLIB_GIT_REPO=https://github.com/jgillis/trlib.git).
  • blasfeo-sourcebuild, Build BLASFEO (BUILD_BLASFEO_VERSION=edf92b396adddd9e548b9786f87ad290a0971329) from downloaded source (BUILD_BLASFEO_GIT_REPO=https://github.com/giaf/blasfeo.git).
  • lapack-sourcebuild, Download and install OpenBLAS for LAPACK+BLAS
  • eigen3-sourcebuild, Build Eigen (BUILD_EIGEN3_VERSION=3.4.0) from downloaded source (BUILD_EIGEN3_GIT_REPO=https://gitlab.com/libeigen/eigen.git).
  • simde-sourcebuild, Build Simde (BUILD_SIMDE_VERSION=v0.7.2) from downloaded source (BUILD_SIMDE_GIT_REPO=https://github.com/simd-everywhere/simde.git).
  • cplex-interface, Interface to the QP solver CPLEX.
  • gurobi-interface, Interface to the (mixed-integer) QP solver GUROBI
  • knitro-interface, Interface to the NLP solver KNITRO.
  • snopt-interface, Interface to the NLP solver KNITRO.
  • worhp-interface, Interface to the NLP solver Worhp (requires gfortran, gomp).
  • lapack-interface, Interface to LAPACK.
  • mumps-interface, Interface to MUMPS.
  • spral-interface, Interface to SPRAL.
  • coinutils-sourcebuild, Build COINUTILS (BUILD_COINUTILS_VERSION=releases/2.11.10) from downloaded source.
  • osi-sourcebuild, Build OSI (BUILD_OSI_VERSION=releases/0.108.9) from downloaded source.
  • clp-interface, Interface to the LP solver CLP.
  • cgl-sourcebuild, Build CGL (BUILD_CGL_VERSION=releases/0.60.8) from downloaded source.
  • cbc-interface, Interface to the LP solver CBC.
  • ipopt-interface, Interface to the NLP solver Ipopt.
  • bonmin-interface, Interface to the MINLP framework Bonmin.
  • highs-interface, Interface to the MILP / QP solver HiGHS.
  • sleqp-interface, Interface to the NLP solver SLEQP.
  • alpaqa-interface, Interface to the NLP solver Alpaqa.
  • proxqp-interface, Interface to QP solver PROXQP.
  • ampl-interface, Interface to the AMPL solver library.

Changes in 3.6.1

  • Various bugfixes and patches https://github.com/casadi/casadi/milestone/24?closed=1
  • breaking serialization of integrator is not compatible with 3.6.0 due to bugfixes
  • git: master branch has been renamed to main, and has different semantics: it will be the branch where new features are added regularly before they become an official release. Latest official release is available as latest branch.

Changes in 3.6.2

Changes in 3.6.3

Changes in 3.6.4

casadi -

Published by jgillis over 1 year ago

Install

Grab a binary from the table:

For Matlab/Octave, unzip in your home directory and adapt the path:

Check your installation:

Get started with the example pack. Onboarding pointers have been gathered by the community at our wiki.

Troubleshooting

  • KNITRO on linux crashes with a segmentation fault without LD_PRELOAD=<knitro_lin_path>/libiomp5.so.
  • Callbacks with one argument are broken in Matlab CasADi

Release notes

Symbolic expressions

  • Added SX/MX/DM operations #1595:
    • hypot(x,y) = sqrt(x*x+y*y)
    • log1p(x) = log(1+x)
    • expm1(x) = exp(x-1)
  • Added operation remainder with the semantics of the C operation
  • breaking AD rule of fmin/fmax` is now symmetric:
    jacobian(fmin(x,y),vertcat(x,y)) used to be [1 0] for x==y. Now yields [0.5 0.5].
  • Added AD rules for mmin/mmax
  • Added logsumexp which behaves like log(sum(exp(x))) but is numerically more accurate (and no overflow issues).
  • breaking vertcat/vcat,horzcat/hcat, etc now return a DM type instead of a Sparsity type #2549
  • breaking CasADi-Matlab mod has been renamed to rem, because its numerical behaviour is like the builtin-Matlab rem. The builtin-Matlab mod has no CasADi counterpart. CasADi-Python mod has been removed, because its numerical behaviour is not like numpy.mod. #2767. numpy.mod has no counterpart in CasADi; only fmod is equivalent.
  • DAE index reduction support (Pantelides structural algorithm) See https://github.com/casadi/casadi/blob/3.6.0/docs/examples/python/dae_reduced_index.py
  • Fixed flaw in codegen with MX if_else

Common subexpression elimination

  • Added Common Subexpression Elimination #1540 for MX and SX.
    CasADi can now efficiently eliminate redundant computation by inspecting an expression graph and removing redundant nodes.

Before, CasADi internals would avoid introducing redundant nodes during operations on a given expression, but the user was responsible to avoid duplication when constructing that expression.

There is a function cse() that you may apply to expressions:

x = MX.sym('x')

# User responsibility
sx = sin(x)
y = sqrt(sx)+sx # MX(@1=sin(x), (sqrt(@1)+@1))

# cse
y = sqrt(sin(x))+sin(x) # MX((sqrt(sin(x))+sin(x)))
y = cse(y) # MX(@1=sin(x), (sqrt(@1)+@1))

There is a boolean option cse that may be used when constructing a Function:

x = MX.sym('x')

f = Function('f',[x],[sqrt(sin(x))+sin(x)],{"cse":True})
f.disp(True)
f:(i0)->(o0) MXFunction
Algorithm:
@0 = input[0][0]
@0 = sin(@0)
@1 = sqrt(@0)
@1 = (@1+@0)
output[0][0] = @1

The technique scales favorably for large graphs.

Triangular solve triangular solve nodes in MX

MX how has atomic support for solving upper and lower triangular linear systems without allocating any linear solver instance. The operation handles the case with unity diagonal separately for efficiency and supports C code generation. To use the feature, call casadi.solve(A, b) (Python or MATLAB/Octave)

# Python
import casadi
A = casadi.MX.sym('A', casadi.Sparsity.upper(2))
b = casadi.MX.sym('b', 2)
x = casadi.solve(A, b)
// C++
casadi::MX A = casadi::MX::sym("A", casadi::Sparsity::upper(2));
casadi::MX b = casadi::MX::sym("b", 2);
casadi::MX x = solve(A, b);  // for argument-dependent lookup, alternatively casadi::MX::solve(A, b) for static function

Cf. #2688.

Function

  • breaking SX/MX Function construction with free variables (i.e. symbols used in the output expressions that are not declared as inputs) now fails immediately unless the allow_free option is used.
  • breaking SX/MX Function construction now fails if there are duplicates in input names or output names, unless the allow_duplicate_io_names option is used #2604.
  • breaking Serialization: files saved with CasADi 3.5.5 will load in CasADi 3.6.0 (unittested), except for Functions that include a 'mumps' linear solver since serialization of this solver was deficient, and except for Functions that include an Integrator.
  • breaking custom_jacobian semantics changed. The Function must now return individual blocks (Jacobian of an output w.r.t. to an input)
  • breaking Changed API part for Jacobian sparsity (relevant for advanced use through external or Callback)
bool has_jac_sparsity(casadi_int oind, casadi_int iind) const override;
Sparsity get_jac_sparsity(casadi_int oind, casadi_int iind, bool symmetric) const override;
  • Function.find_function Can be used to retrieve Functions in a hierarchy.
  • Avoid truncation in printing #2452
  • breaking: Function outputs that are not used (passed a null pointer internally) will be logged (dump_in option ) as nan instead of earlier 0. E.g. Ipopt nlp_grad_f has two outputs, f and grad_f_x. The f output is not used internally, so will be logged as nan.

Code-generation

  • Function objects with an external call can now be codegenerated.
  • mmin/mmax now support codegeneration

Solvers/plugins

  • nlpsol/Opti.solver can now take an option 'detect_simple_bounds' (default False) that will promote general constraints to simple bounds (lbx/ubx).
  • Added SPRAL linear solver for Ipopt
  • Added QP solvers HPIPM, Proxqp, Highs
  • CPLEX interface will dynamically load libcplex<CPLEX_VERSION>, where CPLEX_VERSION is read from environmental variables. Same strategy for Gurobi.
  • SqpMethod Eigen-reflect/eigen-clip incorrect #2896

Generalized integrator support

The Integrator class, which solves initial-value problems in ODEs and DAEs has been thoroughly refactored. Changes include:

  • The integrator class now has a much more mature support for returning the IVP solution at multiple time points. It can now be obtained by providing a time grid to the integrator constructor. Unlike before, this support should now work in combination with forward/adjoint sensitivity analysis (to any order) and sparsity pattern calculations. Cf. #2823.
  • The integrator class now includes support for a piecewise constant control (u). The interface will keep track of changes to u and avoid integrating past such changes; for the Sundials (CVODES/IDAS) interfaces by setting a "stop time", for fixed step integrators by aligning the integration points with the grid points. Cf. #3025. Development versions of CasADi included support for this in a dedicated class, called Simulator, but this class has now been removed (breaking) and the functionality has been ported to the Integrator class.
    If you had code looking like cs.integrator('sim_function', 'cvodes', dae, tgrid, opts), you may replace it by cs.integrator('sim_function', 'cvodes', dae, 0, tgrid[1:], opts).
  • The Integrator class now much better exploits the problem structure in the sensitivity calculations, especially adjoint (and forward-over-adjoint, adjoint-over-adjoint) sensitivity calculations. Cf. #2823, #3047. The sensitivity analysis relies to a much less extent on symbolic reformulations and instead uses calls to the Function class for derivative calculations - this makes the class now more efficient for use with non-symbolic DAEs, including FMUs or other external models.
  • breaking The options t0, tf, output_t0 and grid have been deprecated and will result in a warning if used. Instead, the user can provide equivalent information via the integrator constructor, cf. previous point.
  • The backward states are no longer part of the DAE formulation. They are now derived from a user specified number of sensitivity equations (nadj). This is a slight restriction in the possible problem formulations, but on the other hand allows for a much better exploitation of adjoint sensitivity structure. The the backward states remain in the integrator class function inputs and outputs, but have now been renamed to align with their meaning; adj_xf means the adjoint seeds corresponding to xf (before they were called rx0), adj_p are the adjoint sensitivities corresponding to p (before called rqf and so on.
  • An option scale_abstol has been added to the Sundials integrators. If this is set to true, nominal values for the differential state and algebraic variables will be passed on to the solver. Cf. #3046

See "multipoint_simulation" in the example pack for a good starting point.

Function factory

  • breaking* Hessian blocks are now symmetric by default instead of returning only the upper triangular part. Prefix with triu: to get the old behavior.
  • breaking Multiple Jacobian and/or Hessian blocks can now be calculated more efficiently. Rather than calculating the blocks separately, calculation is done for multiple blocks at once, whenever possible.
    Cf. #2696.

DaeBuilder / FMI interoperability

  • The dependent parameters d and local dependent variables w have been replaced by the single dependent variables v.
  • The DaeBuilder::create function has been reimplemented and now uses the updated Function::factory support (above).
  • New proof-of-concept support for export of models in FMI 3.0 format, cf. #3009
  • New binary interface to standard FMI, including analytic validated first derivatives and validated hybrid second derivatives, cf. #2779
  • The Integrator class has been refactored to efficiently support non-symbolic DAEs, including from FMI - see below.

Binaries

  • Adding Python interfaces for versions 3.10 and 3.11
  • Adding builds for Mac silicon
  • Octave interface will now dynamically couple with the correct versioned octaveinterp version, such that the new binaries work with future releases of Octave that increment the octaveinterp ABI version number.

CLI

  • There is now a CasADi command line interface, casadi-cli. At the moment, functionality is very limited, just eval_dump, to evaluate Function that have been dumped to the disk (options dump,dump_in)

Documentation

Building

  • Source builds are no longer dependent on SWIG since Python and Matlab interface files generated by SWIG are now shipped in source archives.
  • Source builds can now build and integrate a range third-party open-source solver automatically. E.g. -DWITH_IPOPT=ON -DWITH_BUILD_REQUIRED=ON
  • Source builds can now use mockups for a range of third-party commercial solvers. E.g. -DWITH_CPLEX=ON -DWITH_MOCKUP_CPLEX=ON
  • Source packages for python pip are now available

Plugin versions used in binaries

3.6.0

  • dynamic-loading, Compile with support for dynamic loading of FMU libraries
  • sundials-interface, Interface to the ODE/DAE integrator suite SUNDIALS.
  • csparse-interface, Interface to the sparse direct linear solver CSparse.
  • superscs-interface, Interface to QP solver SUPERSCS.
  • osqp-interface, Interface to QP solver OSQP.
  • tinyxml-interface, Interface to the XML parser TinyXML.
  • qpoases-interface, Interface to the active-set QP solver qpOASES.
  • blocksqp-interface, Interface to the NLP solver blockSQP.
  • cplex-mockup-build, Use mockup CPLEX (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • snopt-mockup-build, Use mockup SNOPT (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • knitro-mockup-build, Use mockup KNITRO (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • gurobi-mockup-build, Use mockup GUROBI (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • worhp-mockup-build, Use mockup WORHP (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • hsl-mockup-build, Use mockup WORHP (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • highs-sourcebuild, Build HiGHS (BUILD_HIGHS_VERSION=v1.4.1) from downloaded source (BUILD_HIGHS_GIT_REPO=https://github.com/ERGO-Code/HiGHS).
  • proxqp-sourcebuild, Build PROXQP (BUILD_PROXQP_VERSION=v0.3.2) from downloaded source (BUILD_PROXQP_GIT_REPO=https://github.com/Simple-Robotics/proxsuite.git).
  • osqp-sourcebuild, Build OSQP (BUILD_OSQP_VERSION=v0.6.2) from downloaded source (BUILD_OSQP_GIT_REPO=https://github.com/osqp/osqp.git).
  • superscs-sourcebuild, Build SuperSCS (BUILD_SUPERSCS_VERSION=4d2d1bd03ed4cf93e684a880b233760ce34ca69c) from downloaded source (BUILD_SUPERSCS_GIT_REPO=https://github.com/jgillis/scs.git).
  • bonmin-sourcebuild, Build BONMIN (BUILD_BONMIN_VERSION=releases/1.8.8) from downloaded source (BUILD_BONMIN_GIT_REPO=https://github.com/coin-or/Bonmin.git).
  • ipopt-sourcebuild, Build IPOPT (BUILD_IPOPT_VERSION=3.14.11.mod) from downloaded source (BUILD_IPOPT_GIT_REPO=https://github.com/jgillis/Ipopt-1.git).
  • cbc-sourcebuild, Build CBC (BUILD_CBC_VERSION=releases/2.10.6) from downloaded source.
  • clp-sourcebuild, Build CLP (BUILD_CLP_VERSION=releases/1.17.7) from downloaded source (BUILD_CLP_GIT_REPO=https://github.com/coin-or/Clp.git).
  • mumps-sourcebuild, Build MUMPS (BUILD_MUMPS_TP_VERSION=releases/3.0.2) from downloaded source (BUILD_MUMPS_TP_GIT_REPO=https://github.com/coin-or-tools/ThirdParty-Mumps.git).
  • spral-sourcebuild, Build SPRAL (BUILD_SPRAL_VERSION=d385d2c9e858366d257cafaaf05760ffa6543e26) from downloaded source (BUILD_SPRAL_GIT_REPO=https://github.com/ralna/spral.git).
  • metis-sourcebuild, Build METIS (BUILD_METIS_TP_VERSION=releases/2.0.0) from downloaded source.
  • hpipm-sourcebuild, Build HPIPM (BUILD_HPIPM_VERSION=0e0c9f4e0d4081dceafa9b37c396db50bce0e81a) from downloaded source (BUILD_HPIPM_GIT_REPO=https://github.com/jgillis/hpipm.git).
  • blasfeo-sourcebuild, Build BLASFEO (BUILD_BLASFEO_VERSION=edf92b396adddd9e548b9786f87ad290a0971329) from downloaded source (BUILD_BLASFEO_GIT_REPO=https://github.com/giaf/blasfeo.git).
  • lapack-sourcebuild, Download and install OpenBLAS for LAPACK+BLAS
  • eigen3-sourcebuild, Build Eigen (BUILD_EIGEN3_VERSION=3.4.0) from downloaded source (BUILD_EIGEN3_GIT_REPO=https://gitlab.com/libeigen/eigen.git).
  • simde-sourcebuild, Build Simde (BUILD_SIMDE_VERSION=v0.7.2) from downloaded source (BUILD_SIMDE_GIT_REPO=https://github.com/simd-everywhere/simde.git).
  • cplex-interface, Interface to the QP solver CPLEX.
  • gurobi-interface, Interface to the (mixed-integer) QP solver GUROBI
  • knitro-interface, Interface to the NLP solver KNITRO.
  • snopt-interface, Interface to the NLP solver SNOPT.
  • worhp-interface, Interface to the NLP solver Worhp (requires gfortran, gomp).
  • lapack-interface, Interface to LAPACK.
  • mumps-interface, Interface to MUMPS.
  • spral-interface, Interface to SPRAL.
  • coinutils-sourcebuild, Build COINUTILS (BUILD_COINUTILS_VERSION=releases/2.11.6) from downloaded source.
  • osi-sourcebuild, Build OSI (BUILD_OSI_VERSION=releases/0.108.7) from downloaded source.
  • clp-interface, Interface to the LP solver CLP.
  • cgl-sourcebuild, Build CGL (BUILD_CGL_VERSION=releases/0.60.4) from downloaded source.
  • cbc-interface, Interface to the LP solver CBC.
  • ipopt-interface, Interface to the NLP solver Ipopt.
  • bonmin-interface, Interface to the MINLP framework Bonmin.
  • highs-interface, Interface to the MILP / QP solver HiGHS.
  • proxqp-interface, Interface to QP solver PROXQP.
  • ampl-interface, Interface to the AMPL solver library.

Changes in 3.6.1

  • Various bugfixes and patches https://github.com/casadi/casadi/milestone/24?closed=1
  • breaking serialization of integrator is not compatible with 3.6.0 due to bugfixes
  • git: master branch has been renamed to main, and has different semantics: it will be the branch where new features are added regularly before they become an official release. Latest official release is available as latest branch.

Changes in 3.6.2

Changes in 3.6.3

casadi -

Published by jgillis over 1 year ago

Install

Grab a binary from the table:

For Matlab/Octave, unzip in your home directory and adapt the path:

Check your installation:

Get started with the example pack. Onboarding pointers have been gathered by the community at our wiki.

Troubleshooting

  • KNITRO on linux crashes with a segmentation fault without LD_PRELOAD=<knitro_lin_path>/libiomp5.so.
  • Callbacks with one argument are broken in Matlab CasADi

Release notes

Symbolic expressions

  • Added SX/MX/DM operations #1595:
    • hypot(x,y) = sqrt(x*x+y*y)
    • log1p(x) = log(1+x)
    • expm1(x) = exp(x-1)
  • Added operation remainder with the semantics of the C operation
  • breaking AD rule of fmin/fmax` is now symmetric:
    jacobian(fmin(x,y),vertcat(x,y)) used to be [1 0] for x==y. Now yields [0.5 0.5].
  • Added AD rules for mmin/mmax
  • Added logsumexp which behaves like log(sum(exp(x))) but is numerically more accurate (and no overflow issues).
  • breaking vertcat/vcat,horzcat/hcat, etc now return a DM type instead of a Sparsity type #2549
  • breaking CasADi-Matlab mod has been renamed to rem, because its numerical behaviour is like the builtin-Matlab rem. The builtin-Matlab mod has no CasADi counterpart. CasADi-Python mod has been removed, because its numerical behaviour is not like numpy.mod. #2767. numpy.mod has no counterpart in CasADi; only fmod is equivalent.
  • DAE index reduction support (Pantelides structural algorithm) See https://github.com/casadi/casadi/blob/3.6.0/docs/examples/python/dae_reduced_index.py
  • Fixed flaw in codegen with MX if_else

Common subexpression elimination

  • Added Common Subexpression Elimination #1540 for MX and SX.
    CasADi can now efficiently eliminate redundant computation by inspecting an expression graph and removing redundant nodes.

Before, CasADi internals would avoid introducing redundant nodes during operations on a given expression, but the user was responsible to avoid duplication when constructing that expression.

There is a function cse() that you may apply to expressions:

x = MX.sym('x')

# User responsibility
sx = sin(x)
y = sqrt(sx)+sx # MX(@1=sin(x), (sqrt(@1)+@1))

# cse
y = sqrt(sin(x))+sin(x) # MX((sqrt(sin(x))+sin(x)))
y = cse(y) # MX(@1=sin(x), (sqrt(@1)+@1))

There is a boolean option cse that may be used when constructing a Function:

x = MX.sym('x')

f = Function('f',[x],[sqrt(sin(x))+sin(x)],{"cse":True})
f.disp(True)
f:(i0)->(o0) MXFunction
Algorithm:
@0 = input[0][0]
@0 = sin(@0)
@1 = sqrt(@0)
@1 = (@1+@0)
output[0][0] = @1

The technique scales favorably for large graphs.

Triangular solve triangular solve nodes in MX

MX how has atomic support for solving upper and lower triangular linear systems without allocating any linear solver instance. The operation handles the case with unity diagonal separately for efficiency and supports C code generation. To use the feature, call casadi.solve(A, b) (Python or MATLAB/Octave)

# Python
import casadi
A = casadi.MX.sym('A', casadi.Sparsity.upper(2))
b = casadi.MX.sym('b', 2)
x = casadi.solve(A, b)
// C++
casadi::MX A = casadi::MX::sym("A", casadi::Sparsity::upper(2));
casadi::MX b = casadi::MX::sym("b", 2);
casadi::MX x = solve(A, b);  // for argument-dependent lookup, alternatively casadi::MX::solve(A, b) for static function

Cf. #2688.

Function

  • breaking SX/MX Function construction with free variables (i.e. symbols used in the output expressions that are not declared as inputs) now fails immediately unless the allow_free option is used.
  • breaking SX/MX Function construction now fails if there are duplicates in input names or output names, unless the allow_duplicate_io_names option is used #2604.
  • breaking Serialization: files saved with CasADi 3.5.5 will load in CasADi 3.6.0 (unittested), except for Functions that include a 'mumps' linear solver since serialization of this solver was deficient, and except for Functions that include an Integrator.
  • breaking custom_jacobian semantics changed. The Function must now return individual blocks (Jacobian of an output w.r.t. to an input)
  • breaking Changed API part for Jacobian sparsity (relevant for advanced use through external or Callback)
bool has_jac_sparsity(casadi_int oind, casadi_int iind) const override;
Sparsity get_jac_sparsity(casadi_int oind, casadi_int iind, bool symmetric) const override;
  • Function.find_function Can be used to retrieve Functions in a hierarchy.
  • Avoid truncation in printing #2452
  • breaking: Function outputs that are not used (passed a null pointer internally) will be logged (dump_in option ) as nan instead of earlier 0. E.g. Ipopt nlp_grad_f has two outputs, f and grad_f_x. The f output is not used internally, so will be logged as nan.

Code-generation

  • Function objects with an external call can now be codegenerated.
  • mmin/mmax now support codegeneration

Solvers/plugins

  • nlpsol/Opti.solver can now take an option 'detect_simple_bounds' (default False) that will promote general constraints to simple bounds (lbx/ubx).
  • Added SPRAL linear solver for Ipopt
  • Added QP solvers HPIPM, Proxqp, Highs
  • CPLEX interface will dynamically load libcplex<CPLEX_VERSION>, where CPLEX_VERSION is read from environmental variables. Same strategy for Gurobi.
  • SqpMethod Eigen-reflect/eigen-clip incorrect #2896

Generalized integrator support

The Integrator class, which solves initial-value problems in ODEs and DAEs has been thoroughly refactored. Changes include:

  • The integrator class now has a much more mature support for returning the IVP solution at multiple time points. It can now be obtained by providing a time grid to the integrator constructor. Unlike before, this support should now work in combination with forward/adjoint sensitivity analysis (to any order) and sparsity pattern calculations. Cf. #2823.
  • The integrator class now includes support for a piecewise constant control (u). The interface will keep track of changes to u and avoid integrating past such changes; for the Sundials (CVODES/IDAS) interfaces by setting a "stop time", for fixed step integrators by aligning the integration points with the grid points. Cf. #3025. Development versions of CasADi included support for this in a dedicated class, called Simulator, but this class has now been removed and the functionality has been ported to the Integrator class.
  • The Integrator class now much better exploits the problem structure in the sensitivity calculations, especially adjoint (and forward-over-adjoint, adjoint-over-adjoint) sensitivity calculations. Cf. #2823, #3047. The sensitivity analysis relies to a much less extent on symbolic reformulations and instead uses calls to the Function class for derivative calculations - this makes the class now more efficient for use with non-symbolic DAEs, including FMUs or other external models.
  • breaking The options t0, tf, output_t0 and grid have been deprecated and will result in a warning if used. Instead, the user can provide equivalent information via the integrator constructor, cf. previous point.
  • The backward states are no longer part of the DAE formulation. They are now derived from a user specified number of sensitivity equations (nadj). This is a slight restriction in the possible problem formulations, but on the other hand allows for a much better exploitation of adjoint sensitivity structure. The the backward states remain in the integrator class function inputs and outputs, but have now been renamed to align with their meaning; adj_xf means the adjoint seeds corresponding to xf (before they were called rx0), adj_p are the adjoint sensitivities corresponding to p (before called rqf and so on.
  • An option scale_abstol has been added to the Sundials integrators. If this is set to true, nominal values for the differential state and algebraic variables will be passed on to the solver. Cf. #3046

See "multipoint_simulation" in the example pack for a good starting point.

Function factory

  • breaking* Hessian blocks are now symmetric by default instead of returning only the upper triangular part. Prefix with triu: to get the old behavior.
  • breaking Multiple Jacobian and/or Hessian blocks can now be calculated more efficiently. Rather than calculating the blocks separately, calculation is done for multiple blocks at once, whenever possible.
    Cf. #2696.

DaeBuilder / FMI interoperability

  • The dependent parameters d and local dependent variables w have been replaced by the single dependent variables v.
  • The DaeBuilder::create function has been reimplemented and now uses the updated Function::factory support (above).
  • New proof-of-concept support for export of models in FMI 3.0 format, cf. #3009
  • New binary interface to standard FMI, including analytic validated first derivatives and validated hybrid second derivatives, cf. #2779
  • The Integrator class has been refactored to efficiently support non-symbolic DAEs, including from FMI - see below.

Binaries

  • Adding Python interfaces for versions 3.10 and 3.11
  • Adding builds for Mac silicon
  • Octave interface will now dynamically couple with the correct versioned octaveinterp version, such that the new binaries work with future releases of Octave that increment the octaveinterp ABI version number.

CLI

  • There is now a CasADi command line interface, casadi-cli. At the moment, functionality is very limited, just eval_dump, to evaluate Function that have been dumped to the disk (options dump,dump_in)

Documentation

Building

  • Source builds are no longer dependent on SWIG since Python and Matlab interface files generated by SWIG are now shipped in source archives.
  • Source builds can now build and integrate a range third-party open-source solver automatically. E.g. -DWITH_IPOPT=ON -DWITH_BUILD_REQUIRED=ON
  • Source builds can now use mockups for a range of third-party commercial solvers. E.g. -DWITH_CPLEX=ON -DWITH_MOCKUP_CPLEX=ON
  • Source packages for python pip are now available

Plugin versions used in binaries

3.6.0

  • dynamic-loading, Compile with support for dynamic loading of FMU libraries
  • sundials-interface, Interface to the ODE/DAE integrator suite SUNDIALS.
  • csparse-interface, Interface to the sparse direct linear solver CSparse.
  • superscs-interface, Interface to QP solver SUPERSCS.
  • osqp-interface, Interface to QP solver OSQP.
  • tinyxml-interface, Interface to the XML parser TinyXML.
  • qpoases-interface, Interface to the active-set QP solver qpOASES.
  • blocksqp-interface, Interface to the NLP solver blockSQP.
  • cplex-mockup-build, Use mockup CPLEX (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • snopt-mockup-build, Use mockup SNOPT (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • knitro-mockup-build, Use mockup KNITRO (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • gurobi-mockup-build, Use mockup GUROBI (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • worhp-mockup-build, Use mockup WORHP (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • hsl-mockup-build, Use mockup WORHP (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • highs-sourcebuild, Build HiGHS (BUILD_HIGHS_VERSION=v1.4.1) from downloaded source (BUILD_HIGHS_GIT_REPO=https://github.com/ERGO-Code/HiGHS).
  • proxqp-sourcebuild, Build PROXQP (BUILD_PROXQP_VERSION=v0.3.2) from downloaded source (BUILD_PROXQP_GIT_REPO=https://github.com/Simple-Robotics/proxsuite.git).
  • osqp-sourcebuild, Build OSQP (BUILD_OSQP_VERSION=v0.6.2) from downloaded source (BUILD_OSQP_GIT_REPO=https://github.com/osqp/osqp.git).
  • superscs-sourcebuild, Build SuperSCS (BUILD_SUPERSCS_VERSION=4d2d1bd03ed4cf93e684a880b233760ce34ca69c) from downloaded source (BUILD_SUPERSCS_GIT_REPO=https://github.com/jgillis/scs.git).
  • bonmin-sourcebuild, Build BONMIN (BUILD_BONMIN_VERSION=releases/1.8.8) from downloaded source (BUILD_BONMIN_GIT_REPO=https://github.com/coin-or/Bonmin.git).
  • ipopt-sourcebuild, Build IPOPT (BUILD_IPOPT_VERSION=3.14.11.mod) from downloaded source (BUILD_IPOPT_GIT_REPO=https://github.com/jgillis/Ipopt-1.git).
  • cbc-sourcebuild, Build CBC (BUILD_CBC_VERSION=releases/2.10.6) from downloaded source.
  • clp-sourcebuild, Build CLP (BUILD_CLP_VERSION=releases/1.17.7) from downloaded source (BUILD_CLP_GIT_REPO=https://github.com/coin-or/Clp.git).
  • mumps-sourcebuild, Build MUMPS (BUILD_MUMPS_TP_VERSION=releases/3.0.2) from downloaded source (BUILD_MUMPS_TP_GIT_REPO=https://github.com/coin-or-tools/ThirdParty-Mumps.git).
  • spral-sourcebuild, Build SPRAL (BUILD_SPRAL_VERSION=d385d2c9e858366d257cafaaf05760ffa6543e26) from downloaded source (BUILD_SPRAL_GIT_REPO=https://github.com/ralna/spral.git).
  • metis-sourcebuild, Build METIS (BUILD_METIS_TP_VERSION=releases/2.0.0) from downloaded source.
  • hpipm-sourcebuild, Build HPIPM (BUILD_HPIPM_VERSION=0e0c9f4e0d4081dceafa9b37c396db50bce0e81a) from downloaded source (BUILD_HPIPM_GIT_REPO=https://github.com/jgillis/hpipm.git).
  • blasfeo-sourcebuild, Build BLASFEO (BUILD_BLASFEO_VERSION=edf92b396adddd9e548b9786f87ad290a0971329) from downloaded source (BUILD_BLASFEO_GIT_REPO=https://github.com/giaf/blasfeo.git).
  • lapack-sourcebuild, Download and install OpenBLAS for LAPACK+BLAS
  • eigen3-sourcebuild, Build Eigen (BUILD_EIGEN3_VERSION=3.4.0) from downloaded source (BUILD_EIGEN3_GIT_REPO=https://gitlab.com/libeigen/eigen.git).
  • simde-sourcebuild, Build Simde (BUILD_SIMDE_VERSION=v0.7.2) from downloaded source (BUILD_SIMDE_GIT_REPO=https://github.com/simd-everywhere/simde.git).
  • cplex-interface, Interface to the QP solver CPLEX.
  • gurobi-interface, Interface to the (mixed-integer) QP solver GUROBI
  • knitro-interface, Interface to the NLP solver KNITRO.
  • snopt-interface, Interface to the NLP solver SNOPT.
  • worhp-interface, Interface to the NLP solver Worhp (requires gfortran, gomp).
  • lapack-interface, Interface to LAPACK.
  • mumps-interface, Interface to MUMPS.
  • spral-interface, Interface to SPRAL.
  • coinutils-sourcebuild, Build COINUTILS (BUILD_COINUTILS_VERSION=releases/2.11.6) from downloaded source.
  • osi-sourcebuild, Build OSI (BUILD_OSI_VERSION=releases/0.108.7) from downloaded source.
  • clp-interface, Interface to the LP solver CLP.
  • cgl-sourcebuild, Build CGL (BUILD_CGL_VERSION=releases/0.60.4) from downloaded source.
  • cbc-interface, Interface to the LP solver CBC.
  • ipopt-interface, Interface to the NLP solver Ipopt.
  • bonmin-interface, Interface to the MINLP framework Bonmin.
  • highs-interface, Interface to the MILP / QP solver HiGHS.
  • proxqp-interface, Interface to QP solver PROXQP.
  • ampl-interface, Interface to the AMPL solver library.

Changes in 3.6.1

  • Various bugfixes and patches https://github.com/casadi/casadi/milestone/24?closed=1
  • breaking serialization of integrator is not compatible with 3.6.0 due to bugfixes
  • git: master branch has been renamed to main, and has different semantics: it will be the branch where new features are added regularly before they become an official release. Latest official release is available as latest branch.

Changes in 3.6.2

casadi - 3.6.1

Published by jgillis over 1 year ago

Install

Grab a binary from the table:

For Matlab/Octave, unzip in your home directory and adapt the path:

Check your installation:

Get started with the example pack. Onboarding pointers have been gathered by the community at our wiki.

Troubleshooting

  • KNITRO on linux crashes with a segmentation fault without LD_PRELOAD=<knitro_lin_path>/libiomp5.so.
  • Callbacks with one argument are broken in Matlab CasADi

Release notes

Symbolic expressions

  • Added SX/MX/DM operations #1595:
    • hypot(x,y) = sqrt(x*x+y*y)
    • log1p(x) = log(1+x)
    • expm1(x) = exp(x-1)
  • Added operation remainder with the semantics of the C operation
  • breaking AD rule of fmin/fmax` is now symmetric:
    jacobian(fmin(x,y),vertcat(x,y)) used to be [1 0] for x==y. Now yields [0.5 0.5].
  • Added AD rules for mmin/mmax
  • Added logsumexp which behaves like log(sum(exp(x))) but is numerically more accurate (and no overflow issues).
  • breaking vertcat/vcat,horzcat/hcat, etc now return a DM type instead of a Sparsity type #2549
  • breaking CasADi-Matlab mod has been renamed to rem, because its numerical behaviour is like the builtin-Matlab rem. The builtin-Matlab mod has no CasADi counterpart. CasADi-Python mod has been removed, because its numerical behaviour is not like numpy.mod. #2767. numpy.mod has no counterpart in CasADi; only fmod is equivalent.
  • DAE index reduction support (Pantelides structural algorithm) See https://github.com/casadi/casadi/blob/3.6.0/docs/examples/python/dae_reduced_index.py
  • Fixed flaw in codegen with MX if_else

Common subexpression elimination

  • Added Common Subexpression Elimination #1540 for MX and SX.
    CasADi can now efficiently eliminate redundant computation by inspecting an expression graph and removing redundant nodes.

Before, CasADi internals would avoid introducing redundant nodes during operations on a given expression, but the user was responsible to avoid duplication when constructing that expression.

There is a function cse() that you may apply to expressions:

x = MX.sym('x')

# User responsibility
sx = sin(x)
y = sqrt(sx)+sx # MX(@1=sin(x), (sqrt(@1)+@1))

# cse
y = sqrt(sin(x))+sin(x) # MX((sqrt(sin(x))+sin(x)))
y = cse(y) # MX(@1=sin(x), (sqrt(@1)+@1))

There is a boolean option cse that may be used when constructing a Function:

x = MX.sym('x')

f = Function('f',[x],[sqrt(sin(x))+sin(x)],{"cse":True})
f.disp(True)
f:(i0)->(o0) MXFunction
Algorithm:
@0 = input[0][0]
@0 = sin(@0)
@1 = sqrt(@0)
@1 = (@1+@0)
output[0][0] = @1

The technique scales favorably for large graphs.

Triangular solve triangular solve nodes in MX

MX how has atomic support for solving upper and lower triangular linear systems without allocating any linear solver instance. The operation handles the case with unity diagonal separately for efficiency and supports C code generation. To use the feature, call casadi.solve(A, b) (Python or MATLAB/Octave)

# Python
import casadi
A = casadi.MX.sym('A', casadi.Sparsity.upper(2))
b = casadi.MX.sym('b', 2)
x = casadi.solve(A, b)
// C++
casadi::MX A = casadi::MX::sym("A", casadi::Sparsity::upper(2));
casadi::MX b = casadi::MX::sym("b", 2);
casadi::MX x = solve(A, b);  // for argument-dependent lookup, alternatively casadi::MX::solve(A, b) for static function

Cf. #2688.

Function

  • breaking SX/MX Function construction with free variables (i.e. symbols used in the output expressions that are not declared as inputs) now fails immediately unless the allow_free option is used.
  • breaking SX/MX Function construction now fails if there are duplicates in input names or output names, unless the allow_duplicate_io_names option is used #2604.
  • breaking Serialization: files saved with CasADi 3.5.5 will load in CasADi 3.6.0 (unittested), except for Functions that include a 'mumps' linear solver since serialization of this solver was deficient, and except for Functions that include an Integrator.
  • breaking custom_jacobian semantics changed. The Function must now return individual blocks (Jacobian of an output w.r.t. to an input)
  • breaking Changed API part for Jacobian sparsity (relevant for advanced use through external or Callback)
bool has_jac_sparsity(casadi_int oind, casadi_int iind) const override;
Sparsity get_jac_sparsity(casadi_int oind, casadi_int iind, bool symmetric) const override;
  • Function.find_function Can be used to retrieve Functions in a hierarchy.
  • Avoid truncation in printing #2452
  • breaking: Function outputs that are not used (passed a null pointer internally) will be logged (dump_in option ) as nan instead of earlier 0. E.g. Ipopt nlp_grad_f has two outputs, f and grad_f_x. The f output is not used internally, so will be logged as nan.

Code-generation

  • Function objects with an external call can now be codegenerated.
  • mmin/mmax now support codegeneration

Solvers/plugins

  • nlpsol/Opti.solver can now take an option 'detect_simple_bounds' (default False) that will promote general constraints to simple bounds (lbx/ubx).
  • Added SPRAL linear solver for Ipopt
  • Added QP solvers HPIPM, Proxqp, Highs
  • CPLEX interface will dynamically load libcplex<CPLEX_VERSION>, where CPLEX_VERSION is read from environmental variables. Same strategy for Gurobi.
  • SqpMethod Eigen-reflect/eigen-clip incorrect #2896

Generalized integrator support

The Integrator class, which solves initial-value problems in ODEs and DAEs has been thoroughly refactored. Changes include:

  • The integrator class now has a much more mature support for returning the IVP solution at multiple time points. It can now be obtained by providing a time grid to the integrator constructor. Unlike before, this support should now work in combination with forward/adjoint sensitivity analysis (to any order) and sparsity pattern calculations. Cf. #2823.
  • The integrator class now includes support for a piecewise constant control (u). The interface will keep track of changes to u and avoid integrating past such changes; for the Sundials (CVODES/IDAS) interfaces by setting a "stop time", for fixed step integrators by aligning the integration points with the grid points. Cf. #3025. Development versions of CasADi included support for this in a dedicated class, called Simulator, but this class has now been removed and the functionality has been ported to the Integrator class.
  • The Integrator class now much better exploits the problem structure in the sensitivity calculations, especially adjoint (and forward-over-adjoint, adjoint-over-adjoint) sensitivity calculations. Cf. #2823, #3047. The sensitivity analysis relies to a much less extent on symbolic reformulations and instead uses calls to the Function class for derivative calculations - this makes the class now more efficient for use with non-symbolic DAEs, including FMUs or other external models.
  • breaking The options t0, tf, output_t0 and grid have been deprecated and will result in a warning if used. Instead, the user can provide equivalent information via the integrator constructor, cf. previous point.
  • The backward states are no longer part of the DAE formulation. They are now derived from a user specified number of sensitivity equations (nadj). This is a slight restriction in the possible problem formulations, but on the other hand allows for a much better exploitation of adjoint sensitivity structure. The the backward states remain in the integrator class function inputs and outputs, but have now been renamed to align with their meaning; adj_xf means the adjoint seeds corresponding to xf (before they were called rx0), adj_p are the adjoint sensitivities corresponding to p (before called rqf and so on.
  • An option scale_abstol has been added to the Sundials integrators. If this is set to true, nominal values for the differential state and algebraic variables will be passed on to the solver. Cf. #3046

See "multipoint_simulation" in the example pack for a good starting point.

Function factory

  • breaking* Hessian blocks are now symmetric by default instead of returning only the upper triangular part. Prefix with triu: to get the old behavior.
  • breaking Multiple Jacobian and/or Hessian blocks can now be calculated more efficiently. Rather than calculating the blocks separately, calculation is done for multiple blocks at once, whenever possible.
    Cf. #2696.

DaeBuilder / FMI interoperability

  • The dependent parameters d and local dependent variables w have been replaced by the single dependent variables v.
  • The DaeBuilder::create function has been reimplemented and now uses the updated Function::factory support (above).
  • New proof-of-concept support for export of models in FMI 3.0 format, cf. #3009
  • New binary interface to standard FMI, including analytic validated first derivatives and validated hybrid second derivatives, cf. #2779
  • The Integrator class has been refactored to efficiently support non-symbolic DAEs, including from FMI - see below.

Binaries

  • Adding Python interfaces for versions 3.10 and 3.11
  • Adding builds for Mac silicon
  • Octave interface will now dynamically couple with the correct versioned octaveinterp version, such that the new binaries work with future releases of Octave that increment the octaveinterp ABI version number.

CLI

  • There is now a CasADi command line interface, casadi-cli. At the moment, functionality is very limited, just eval_dump, to evaluate Function that have been dumped to the disk (options dump,dump_in)

Documentation

Building

  • Source builds are no longer dependent on SWIG since Python and Matlab interface files generated by SWIG are now shipped in source archives.
  • Source builds can now build and integrate a range third-party open-source solver automatically. E.g. -DWITH_IPOPT=ON -DWITH_BUILD_REQUIRED=ON
  • Source builds can now use mockups for a range of third-party commercial solvers. E.g. -DWITH_CPLEX=ON -DWITH_MOCKUP_CPLEX=ON
  • Source packages for python pip are now available

Plugin versions used in binaries

3.6.0

  • dynamic-loading, Compile with support for dynamic loading of FMU libraries
  • sundials-interface, Interface to the ODE/DAE integrator suite SUNDIALS.
  • csparse-interface, Interface to the sparse direct linear solver CSparse.
  • superscs-interface, Interface to QP solver SUPERSCS.
  • osqp-interface, Interface to QP solver OSQP.
  • tinyxml-interface, Interface to the XML parser TinyXML.
  • qpoases-interface, Interface to the active-set QP solver qpOASES.
  • blocksqp-interface, Interface to the NLP solver blockSQP.
  • cplex-mockup-build, Use mockup CPLEX (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • snopt-mockup-build, Use mockup SNOPT (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • knitro-mockup-build, Use mockup KNITRO (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • gurobi-mockup-build, Use mockup GUROBI (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • worhp-mockup-build, Use mockup WORHP (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • hsl-mockup-build, Use mockup WORHP (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • highs-sourcebuild, Build HiGHS (BUILD_HIGHS_VERSION=v1.4.1) from downloaded source (BUILD_HIGHS_GIT_REPO=https://github.com/ERGO-Code/HiGHS).
  • proxqp-sourcebuild, Build PROXQP (BUILD_PROXQP_VERSION=v0.3.2) from downloaded source (BUILD_PROXQP_GIT_REPO=https://github.com/Simple-Robotics/proxsuite.git).
  • osqp-sourcebuild, Build OSQP (BUILD_OSQP_VERSION=v0.6.2) from downloaded source (BUILD_OSQP_GIT_REPO=https://github.com/osqp/osqp.git).
  • superscs-sourcebuild, Build SuperSCS (BUILD_SUPERSCS_VERSION=4d2d1bd03ed4cf93e684a880b233760ce34ca69c) from downloaded source (BUILD_SUPERSCS_GIT_REPO=https://github.com/jgillis/scs.git).
  • bonmin-sourcebuild, Build BONMIN (BUILD_BONMIN_VERSION=releases/1.8.8) from downloaded source (BUILD_BONMIN_GIT_REPO=https://github.com/coin-or/Bonmin.git).
  • ipopt-sourcebuild, Build IPOPT (BUILD_IPOPT_VERSION=3.14.11.mod) from downloaded source (BUILD_IPOPT_GIT_REPO=https://github.com/jgillis/Ipopt-1.git).
  • cbc-sourcebuild, Build CBC (BUILD_CBC_VERSION=releases/2.10.6) from downloaded source.
  • clp-sourcebuild, Build CLP (BUILD_CLP_VERSION=releases/1.17.7) from downloaded source (BUILD_CLP_GIT_REPO=https://github.com/coin-or/Clp.git).
  • mumps-sourcebuild, Build MUMPS (BUILD_MUMPS_TP_VERSION=releases/3.0.2) from downloaded source (BUILD_MUMPS_TP_GIT_REPO=https://github.com/coin-or-tools/ThirdParty-Mumps.git).
  • spral-sourcebuild, Build SPRAL (BUILD_SPRAL_VERSION=d385d2c9e858366d257cafaaf05760ffa6543e26) from downloaded source (BUILD_SPRAL_GIT_REPO=https://github.com/ralna/spral.git).
  • metis-sourcebuild, Build METIS (BUILD_METIS_TP_VERSION=releases/2.0.0) from downloaded source.
  • hpipm-sourcebuild, Build HPIPM (BUILD_HPIPM_VERSION=0e0c9f4e0d4081dceafa9b37c396db50bce0e81a) from downloaded source (BUILD_HPIPM_GIT_REPO=https://github.com/jgillis/hpipm.git).
  • blasfeo-sourcebuild, Build BLASFEO (BUILD_BLASFEO_VERSION=edf92b396adddd9e548b9786f87ad290a0971329) from downloaded source (BUILD_BLASFEO_GIT_REPO=https://github.com/giaf/blasfeo.git).
  • lapack-sourcebuild, Download and install OpenBLAS for LAPACK+BLAS
  • eigen3-sourcebuild, Build Eigen (BUILD_EIGEN3_VERSION=3.4.0) from downloaded source (BUILD_EIGEN3_GIT_REPO=https://gitlab.com/libeigen/eigen.git).
  • simde-sourcebuild, Build Simde (BUILD_SIMDE_VERSION=v0.7.2) from downloaded source (BUILD_SIMDE_GIT_REPO=https://github.com/simd-everywhere/simde.git).
  • cplex-interface, Interface to the QP solver CPLEX.
  • gurobi-interface, Interface to the (mixed-integer) QP solver GUROBI
  • knitro-interface, Interface to the NLP solver KNITRO.
  • snopt-interface, Interface to the NLP solver SNOPT.
  • worhp-interface, Interface to the NLP solver Worhp (requires gfortran, gomp).
  • lapack-interface, Interface to LAPACK.
  • mumps-interface, Interface to MUMPS.
  • spral-interface, Interface to SPRAL.
  • coinutils-sourcebuild, Build COINUTILS (BUILD_COINUTILS_VERSION=releases/2.11.6) from downloaded source.
  • osi-sourcebuild, Build OSI (BUILD_OSI_VERSION=releases/0.108.7) from downloaded source.
  • clp-interface, Interface to the LP solver CLP.
  • cgl-sourcebuild, Build CGL (BUILD_CGL_VERSION=releases/0.60.4) from downloaded source.
  • cbc-interface, Interface to the LP solver CBC.
  • ipopt-interface, Interface to the NLP solver Ipopt.
  • bonmin-interface, Interface to the MINLP framework Bonmin.
  • highs-interface, Interface to the MILP / QP solver HiGHS.
  • proxqp-interface, Interface to QP solver PROXQP.
  • ampl-interface, Interface to the AMPL solver library.

Changes in 3.6.1

  • Various bugfixes and patches https://github.com/casadi/casadi/milestone/24?closed=1
  • breaking serialization of integrator is not compatible with 3.6.0 due to bugfixes
  • git: master branch has been renamed to main, and has different semantics: it will be the branch where new features are added regularly before they become an official release. Latest official release is available as latest branch.
casadi - 3.6.0

Published by jgillis over 1 year ago

Install

Grab a binary from the table:

For Matlab/Octave, unzip in your home directory and adapt the path:

Check your installation:

Get started with the example pack. Onboarding pointers have been gathered by the community at our wiki.

Troubleshooting

  • KNITRO on linux crashes with a segmentation fault without LD_PRELOAD=<knitro_lin_path>/libiomp5.so.
  • Callbacks with one argument are broken in Matlab CasADi

Release notes

Symbolic expressions

  • Added SX/MX/DM operations #1595:
    • hypot(x,y) = sqrt(x*x+y*y)
    • log1p(x) = log(1+x)
    • expm1(x) = exp(x-1)
  • Added operation remainder with the semantics of the C operation
  • breaking AD rule of fmin/fmax` is now symmetric:
    jacobian(fmin(x,y),vertcat(x,y)) used to be [1 0] for x==y. Now yields [0.5 0.5].
  • Added AD rules for mmin/mmax
  • Added logsumexp which behaves like log(sum(exp(x))) but is numerically more accurate (and no overflow issues).
  • breaking vertcat/vcat,horzcat/hcat, etc now return a DM type instead of a Sparsity type #2549
  • breaking CasADi-Matlab mod has been renamed to rem, because its numerical behaviour is like the builtin-Matlab rem. The builtin-Matlab mod has no CasADi counterpart. CasADi-Python mod has been removed, because its numerical behaviour is not like numpy.mod. #2767. numpy.mod has no counterpart in CasADi; only fmod is equivalent.
  • DAE index reduction support (Pantelides structural algorithm) See https://github.com/casadi/casadi/blob/3.6.0/docs/examples/python/dae_reduced_index.py
  • Fixed flaw in codegen with MX if_else

Common subexpression elimination

  • Added Common Subexpression Elimination #1540 for MX and SX.
    CasADi can now efficiently eliminate redundant computation by inspecting an expression graph and removing redundant nodes.

Before, CasADi internals would avoid introducing redundant nodes during operations on a given expression, but the user was responsible to avoid duplication when constructing that expression.

There is a function cse() that you may apply to expressions:

x = MX.sym('x')

# User responsibility
sx = sin(x)
y = sqrt(sx)+sx # MX(@1=sin(x), (sqrt(@1)+@1))

# cse
y = sqrt(sin(x))+sin(x) # MX((sqrt(sin(x))+sin(x)))
y = cse(y) # MX(@1=sin(x), (sqrt(@1)+@1))

There is a boolean option cse that may be used when constructing a Function:

x = MX.sym('x')

f = Function('f',[x],[sqrt(sin(x))+sin(x)],{"cse":True})
f.disp(True)
f:(i0)->(o0) MXFunction
Algorithm:
@0 = input[0][0]
@0 = sin(@0)
@1 = sqrt(@0)
@1 = (@1+@0)
output[0][0] = @1

The technique scales favorably for large graphs.

Triangular solve triangular solve nodes in MX

MX how has atomic support for solving upper and lower triangular linear systems without allocating any linear solver instance. The operation handles the case with unity diagonal separately for efficiency and supports C code generation. To use the feature, call casadi.solve(A, b) (Python or MATLAB/Octave)

# Python
import casadi
A = casadi.MX.sym('A', casadi.Sparsity.upper(2))
b = casadi.MX.sym('b', 2)
x = casadi.solve(A, b)
// C++
casadi::MX A = casadi::MX::sym("A", casadi::Sparsity::upper(2));
casadi::MX b = casadi::MX::sym("b", 2);
casadi::MX x = solve(A, b);  // for argument-dependent lookup, alternatively casadi::MX::solve(A, b) for static function

Cf. #2688.

Function

  • breaking SX/MX Function construction with free variables (i.e. symbols used in the output expressions that are not declared as inputs) now fails immediately unless the allow_free option is used.
  • breaking SX/MX Function construction now fails if there are duplicates in input names or output names, unless the allow_duplicate_io_names option is used #2604.
  • breaking Serialization: files saved with CasADi 3.5.5 will load in CasADi 3.6.0 (unittested), except for Functions that include a 'mumps' linear solver since serialization of this solver was deficient, and except for Functions that include an Integrator.
  • breaking custom_jacobian semantics changed. The Function must now return individual blocks (Jacobian of an output w.r.t. to an input)
  • breaking Changed API part for Jacobian sparsity (relevant for advanced use through external or Callback)
bool has_jac_sparsity(casadi_int oind, casadi_int iind) const override;
Sparsity get_jac_sparsity(casadi_int oind, casadi_int iind, bool symmetric) const override;
  • Function.find_function Can be used to retrieve Functions in a hierarchy.
  • Avoid truncation in printing #2452

Code-generation

  • Function objects with an external call can now be codegenerated.
  • mmin/mmax now support codegeneration

Solvers/plugins

  • nlpsol/Opti.solver can now take an option 'detect_simple_bounds' (default False) that will promote general constraints to simple bounds (lbx/ubx).
  • Added SPRAL linear solver for Ipopt
  • Added QP solvers HPIPM, Proxqp, Highs
  • CPLEX interface will dynamically load libcplex<CPLEX_VERSION>, where CPLEX_VERSION is read from environmental variables. Same strategy for Gurobi.
  • SqpMethod Eigen-reflect/eigen-clip incorrect #2896

Generalized integrator support

The Integrator class, which solves initial-value problems in ODEs and DAEs has been thoroughly refactored. Changes include:

  • The integrator class now has a much more mature support for returning the IVP solution at multiple time points. It can now be obtained by providing a time grid to the integrator constructor. Unlike before, this support should now work in combination with forward/adjoint sensitivity analysis (to any order) and sparsity pattern calculations. Cf. #2823.
  • The integrator class now includes support for a piecewise constant control (u). The interface will keep track of changes to u and avoid integrating past such changes; for the Sundials (CVODES/IDAS) interfaces by setting a "stop time", for fixed step integrators by aligning the integration points with the grid points. Cf. #3025. Development versions of CasADi included support for this in a dedicated class, called Simulator, but this class has now been removed and the functionality has been ported to the Integrator class.
  • The Integrator class now much better exploits the problem structure in the sensitivity calculations, especially adjoint (and forward-over-adjoint, adjoint-over-adjoint) sensitivity calculations. Cf. #2823, #3047. The sensitivity analysis relies to a much less extent on symbolic reformulations and instead uses calls to the Function class for derivative calculations - this makes the class now more efficient for use with non-symbolic DAEs, including FMUs or other external models.
  • breaking The options t0, tf, output_t0 and grid have been deprecated and will result in a warning if used. Instead, the user can provide equivalent information via the integrator constructor, cf. previous point.
  • The backward states are no longer part of the DAE formulation. They are now derived from a user specified number of sensitivity equations (nadj). This is a slight restriction in the possible problem formulations, but on the other hand allows for a much better exploitation of adjoint sensitivity structure. The the backward states remain in the integrator class function inputs and outputs, but have now been renamed to align with their meaning; adj_xf means the adjoint seeds corresponding to xf (before they were called rx0), adj_p are the adjoint sensitivities corresponding to p (before called rqf and so on.
  • An option scale_abstol has been added to the Sundials integrators. If this is set to true, nominal values for the differential state and algebraic variables will be passed on to the solver. Cf. #3046

See "multipoint_simulation" in the example pack for a good starting point.

Function factory

  • breaking* Hessian blocks are now symmetric by default instead of returning only the upper triangular part. Prefix with triu: to get the old behavior.
  • breaking Multiple Jacobian and/or Hessian blocks can now be calculated more efficiently. Rather than calculating the blocks separately, calculation is done for multiple blocks at once, whenever possible.
    Cf. #2696.

DaeBuilder / FMI interoperability

  • The dependent parameters d and local dependent variables w have been replaced by the single dependent variables v.
  • The DaeBuilder::create function has been reimplemented and now uses the updated Function::factory support (above).
  • New proof-of-concept support for export of models in FMI 3.0 format, cf. #3009
  • New binary interface to standard FMI, including analytic validated first derivatives and validated hybrid second derivatives, cf. #2779
  • The Integrator class has been refactored to efficiently support non-symbolic DAEs, including from FMI - see below.

Binaries

  • Adding Python interfaces for versions 3.10 and 3.11
  • Adding builds for Mac silicon
  • Octave interface will now dynamically couple with the correct versioned octaveinterp version, such that the new binaries work with future releases of Octave that increment the octaveinterp ABI version number.

CLI

  • There is now a CasADi command line interface, casadi-cli. At the moment, functionality is very limited, just eval_dump, to evaluate Function that have been dumped to the disk (options dump,dump_in)

Documentation

Building

  • Source builds are no longer dependent on SWIG since Python and Matlab interface files generated by SWIG are now shipped in source archives.
  • Source builds can now build and integrate a range third-party open-source solver automatically. E.g. -DWITH_IPOPT=ON -DWITH_BUILD_REQUIRED=ON
  • Source builds can now use mockups for a range of third-party commercial solvers. E.g. -DWITH_CPLEX=ON -DWITH_MOCKUP_CPLEX=ON
  • Source packages for python pip are now available

Plugin versions used in binaries

3.6.0

  • dynamic-loading, Compile with support for dynamic loading of FMU libraries
  • sundials-interface, Interface to the ODE/DAE integrator suite SUNDIALS.
  • csparse-interface, Interface to the sparse direct linear solver CSparse.
  • superscs-interface, Interface to QP solver SUPERSCS.
  • osqp-interface, Interface to QP solver OSQP.
  • tinyxml-interface, Interface to the XML parser TinyXML.
  • qpoases-interface, Interface to the active-set QP solver qpOASES.
  • blocksqp-interface, Interface to the NLP solver blockSQP.
  • cplex-mockup-build, Use mockup CPLEX (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • snopt-mockup-build, Use mockup SNOPT (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • knitro-mockup-build, Use mockup KNITRO (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • gurobi-mockup-build, Use mockup GUROBI (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • worhp-mockup-build, Use mockup WORHP (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • hsl-mockup-build, Use mockup WORHP (BUILD_MOCKUPS_VERSION=v60) from downloaded source (BUILD_MOCKUPS_GIT_REPO=https://github.com/casadi/mockups.git).
  • highs-sourcebuild, Build HiGHS (BUILD_HIGHS_VERSION=v1.4.1) from downloaded source (BUILD_HIGHS_GIT_REPO=https://github.com/ERGO-Code/HiGHS).
  • proxqp-sourcebuild, Build PROXQP (BUILD_PROXQP_VERSION=v0.3.2) from downloaded source (BUILD_PROXQP_GIT_REPO=https://github.com/Simple-Robotics/proxsuite.git).
  • osqp-sourcebuild, Build OSQP (BUILD_OSQP_VERSION=v0.6.2) from downloaded source (BUILD_OSQP_GIT_REPO=https://github.com/osqp/osqp.git).
  • superscs-sourcebuild, Build SuperSCS (BUILD_SUPERSCS_VERSION=4d2d1bd03ed4cf93e684a880b233760ce34ca69c) from downloaded source (BUILD_SUPERSCS_GIT_REPO=https://github.com/jgillis/scs.git).
  • bonmin-sourcebuild, Build BONMIN (BUILD_BONMIN_VERSION=releases/1.8.8) from downloaded source (BUILD_BONMIN_GIT_REPO=https://github.com/coin-or/Bonmin.git).
  • ipopt-sourcebuild, Build IPOPT (BUILD_IPOPT_VERSION=3.14.11.mod) from downloaded source (BUILD_IPOPT_GIT_REPO=https://github.com/jgillis/Ipopt-1.git).
  • cbc-sourcebuild, Build CBC (BUILD_CBC_VERSION=releases/2.10.6) from downloaded source.
  • clp-sourcebuild, Build CLP (BUILD_CLP_VERSION=releases/1.17.7) from downloaded source (BUILD_CLP_GIT_REPO=https://github.com/coin-or/Clp.git).
  • mumps-sourcebuild, Build MUMPS (BUILD_MUMPS_TP_VERSION=releases/3.0.2) from downloaded source (BUILD_MUMPS_TP_GIT_REPO=https://github.com/coin-or-tools/ThirdParty-Mumps.git).
  • spral-sourcebuild, Build SPRAL (BUILD_SPRAL_VERSION=d385d2c9e858366d257cafaaf05760ffa6543e26) from downloaded source (BUILD_SPRAL_GIT_REPO=https://github.com/ralna/spral.git).
  • metis-sourcebuild, Build METIS (BUILD_METIS_TP_VERSION=releases/2.0.0) from downloaded source.
  • hpipm-sourcebuild, Build HPIPM (BUILD_HPIPM_VERSION=0e0c9f4e0d4081dceafa9b37c396db50bce0e81a) from downloaded source (BUILD_HPIPM_GIT_REPO=https://github.com/jgillis/hpipm.git).
  • blasfeo-sourcebuild, Build BLASFEO (BUILD_BLASFEO_VERSION=edf92b396adddd9e548b9786f87ad290a0971329) from downloaded source (BUILD_BLASFEO_GIT_REPO=https://github.com/giaf/blasfeo.git).
  • lapack-sourcebuild, Download and install OpenBLAS for LAPACK+BLAS
  • eigen3-sourcebuild, Build Eigen (BUILD_EIGEN3_VERSION=3.4.0) from downloaded source (BUILD_EIGEN3_GIT_REPO=https://gitlab.com/libeigen/eigen.git).
  • simde-sourcebuild, Build Simde (BUILD_SIMDE_VERSION=v0.7.2) from downloaded source (BUILD_SIMDE_GIT_REPO=https://github.com/simd-everywhere/simde.git).
  • cplex-interface, Interface to the QP solver CPLEX.
  • gurobi-interface, Interface to the (mixed-integer) QP solver GUROBI
  • knitro-interface, Interface to the NLP solver KNITRO.
  • snopt-interface, Interface to the NLP solver SNOPT.
  • worhp-interface, Interface to the NLP solver Worhp (requires gfortran, gomp).
  • lapack-interface, Interface to LAPACK.
  • mumps-interface, Interface to MUMPS.
  • spral-interface, Interface to SPRAL.
  • coinutils-sourcebuild, Build COINUTILS (BUILD_COINUTILS_VERSION=releases/2.11.6) from downloaded source.
  • osi-sourcebuild, Build OSI (BUILD_OSI_VERSION=releases/0.108.7) from downloaded source.
  • clp-interface, Interface to the LP solver CLP.
  • cgl-sourcebuild, Build CGL (BUILD_CGL_VERSION=releases/0.60.4) from downloaded source.
  • cbc-interface, Interface to the LP solver CBC.
  • ipopt-interface, Interface to the NLP solver Ipopt.
  • bonmin-interface, Interface to the MINLP framework Bonmin.
  • highs-interface, Interface to the MILP / QP solver HiGHS.
  • proxqp-interface, Interface to QP solver PROXQP.
  • ampl-interface, Interface to the AMPL solver library.
casadi - 3.5.5

Published by jgillis about 4 years ago

Install

Grab a binary from the table (for MATLAB, use the newest compatible version below):

(*) Check your Python console if you need 32bit or 64bit - bitness should be printed at startup.

Unzip in your home directory and adapt the path:

Get started with the example pack.

Troubleshooting

Release notes

CasADi Functions

  • CasADi Functions can be serialized now (#308).
f.save('f.casadi')            % Dump any CasADi Function to a file
f = Function.load('f.casadi') % Loads back in

This enables easy sharing of models/solver isntances beteen Matlab/Python/C++ cross-platform, and enables a form of parallelization.

  • You can now evaluate CasADi Functions from C without requiring code-generation. This makes it possible to embed CasADi computations in Fortran, Julia, FMI, ...
  • All CasADi Functions support timing information now (print_time, default true for QP and NLP solvers). Use record_time to make timings available through f.stats() without printing them.
  • map with reduce arguments now has an efficient implementation (no copying/repmat)
  • Low-overhead Callback eval support was changed to eval_buffer
  • FunctionInternal::finalize no longer takes options dict.
  • Options always_inline and never_inline were added
  • Options is_diff_in and is_diff_out were added
  • (3.5.2) Ctrl-C interrupts are now disabled in multi-threaded Maps since they could result in crashes
  • (3.5.2) Sparsity of Callbacks can be set with has_jacobian_sparsity/get_jacobian_sparsity
  • (3.5.2) Jitted functions can now be serialized
  • (3.5.2) BSpline constructor takes an inline option yielding a fully differentiable (but not very scalable) BSpline operation for MX
  • (3.5.5) Fixed performance deficiency in inline BSline derivatives

CasADi expressions

  • breaking: IM type is removed from public API (was used to represent integer sparse matrices). Use DM instead.
  • breaking: linspace(0,1,3) and linspace(0.0,1,3) now both return [0 0.5 1] instead of [0 0 1] for the former
  • MX supports slicing with MX now (symbolic indexing).
  • Issue #2364:
    • breaking: veccat of an empty list now returns 0-by-1 instead of 0-by-0.
    • jtimes output dimensions have changed when any of the arguments is empty.
    • NLP function object's 'lam_p' is now 0-by-1 in case of missing parameters.
  • (3.5.2) Fixed long-standing bug in cosh derivative
  • (3.5.2) An MX operation convexify was added
  • (3.5.2) An inefficiency in MX multiplication sparsity was detected and fixed by Mirko Hahn

Interpolation functionality

  • Support for parametric (=changeable only, but not differentiable) grid and/or coefficients for linear/spline interpolation
    • for interpolant, new constructors where added that takes dimensions instead of concrete vectors
  • Support for symbolic (differentiable) grid and coefficients for linear interpolation (set inline option to true).

Python specific

  • Overhead-less CasADi Function evaluation API added through Python memoryviews
  • Similar functionality in Callbacks
  • (3.5.2) fix numpy compatibility (numpy 1.19)
  • (3.5.3) fix the numpy fix

Matlab/Octave specific

  • breaking: a(:)=b now behaves like Matlab builtin matrices when a is a CasADi matrix. Before, only the first column of a would be touched by this statement. (#2363)
  • breaking: Fixed bug where MX constructor treated a numeric row vector as column vector. Now size(MX(ones(1,4))) returns (1,4) as expected. (#2366)
  • Can now use spy directly on DM,MX,SX
  • (3.5.2) Printing from a multi-threaded map context is disabled beause it could result in crashes. In linux, you may still see the output from a terminal used to start Matlab

Opti

  • Opti supports conic problems now: Opti('conic')
  • One can now easily obtain a parametric solution as a CasADi Function from an Opti instance:
opti = Opti()
x = opti.variable()
y = opti.variable()
p = opti.parameter()
      
opti.minimize(y**2+sin(x-y-p)**2)
opti.subject_to(x+y>=1)
      
opti.solver(nlpsolver,nlpsolver_options)

F = opti.to_function("F",[x,p,opti.lam_g],[x,y])
      
r = F(0,0.1,0)

(3.5.1) Improved support for vertcatted inputs to to_function

  • Using Opti together with max_iter is more natural now: use solve_limited() to avoid exceptions to be raised when iterations or time runs out. No need to try/catch.

Code-generation

  • breaking: external now looks for a .dylib file, not .so for mac
  • breaking: Codegen API has changes related to thread-local memory:
  • void* mem changed to int mem
  • alloc_mem, init_mem, free_mem have been purged. checkout and release replace them.
  int mem = checkout();
  eval(arg, res, iw, w, mem);
  release(mem);
  • Codegen 'CODEGEN_PREFIX' has been renamed to 'CASADI_CODEGEN_PREFIX'
  • QP solvers (QRQP, OSQP) and SqpMethod codegenerate now. This means that embedded MPC with CasADi is now more practical.
  • Runge-Kutta and Collocation Integrator objects can be inlined into code-generatable MX Function with the 'simplify' option.
  • (3.5.1) an important flaw was corrected that caused incorrect code for expression graphs with logical 'and' and 'or'.
  • (3.5.1) fixed regression for expression graphs containing inf/nan
  • (3.5.2) fixed bug of a division looking like a comment
  • (3.5.2) fixed mem.h regression
  • (3.5.2) Made main and mex-related functions c89-compliant

Solvers

  • breaking: NLP solvers - bound_consistency, an option to post-process the primal and dual solution by projecting it on the bounds, introduced in 3.4, was changed to default off

  • Sundials was patched to support multi-threading

  • WORHP was bumped to v1.13

  • SNOPT was bumped to v7.7

  • SuperSCS (conic solver) was added

  • OSQP (QP solver) was added

  • CBC (LP solver) was added

  • (3.5.3) AMPL was fixed to allow other solvers than IPOPT

  • breaking: SQP Method

    • regularize_margin option was added
    • regularize (bool) option was removed. To get the effect of regularize=true, specify convexify_strategy='regularize'. Other strategies include clipping eigenvalues.
    • line search was reverted from a custom designed thing, to standard textbook L1
  • CPLEX and Gurobi got support for sos constraints

  • Conic/qpsol interface extended for semidefinite programming and SOCP

    • Solvers supporting SOCP: Gurobi, SuperSCS, CPLEX
  • breaking: Newton Rootfinder now supports a line_search option (default true)

  • Rootfinder now throws an exception by default ('error_on_fail' option true) when failing to converge

  • (3.5.5) Implemented constraints in IDAS and step size limits in CVODES/IDAS integrators

Convenience tools

  • Debugging facilities:
    • Function options print_in/print_in print inputs/outputs when numerically evaluating a function
    • Function option dump_in/dump_out dumps to the file system
    • Function option dump dumps the function itself (loadable with Function.load)
  • DM.from_file and DM.to_file with a MatrixMarket and txt support
  • Helping interaction with codegen with main=true: Function.generate_in/Function.nz_from_in/Function.nz_to_in to help creating input text files.
  • Function.convert_in/Function.convert_out to switch between list and dictionary arguments/results

Binaries

  • (3.5.1) Mac binaries for Matlab was switched to a different build environment. The binaries now require High Sierra or above, and work on Catalina.
  • (3.5.4) Mac binaries for Python and octave have been switched just like Matlab
  • (3.5.4) Linux binaries for Matlab and Octave have been switched to the manylinux environment, with gfortran dependency now grafted in (included, with a unique alias to avoid name collision)

Third-party solver interfaces in binaries

Versions used in binaries ( see FAQ ):

casadi - 3.5.4

Published by jgillis about 4 years ago

Install

Grab a binary from the table (for MATLAB, use the newest compatible version below):

(*) Check your Python console if you need 32bit or 64bit - bitness should be printed at startup.

Unzip in your home directory and adapt the path:

Get started with the example pack.

Troubleshooting

Release notes

CasADi Functions

  • CasADi Functions can be serialized now (#308).
f.save('f.casadi')            % Dump any CasADi Function to a file
f = Function.load('f.casadi') % Loads back in

This enables easy sharing of models/solver isntances beteen Matlab/Python/C++ cross-platform, and enables a form of parallelization.

  • You can now evaluate CasADi Functions from C without requiring code-generation. This makes it possible to embed CasADi computations in Fortran, Julia, FMI, ...
  • All CasADi Functions support timing information now (print_time, default true for QP and NLP solvers). Use record_time to make timings available through f.stats() without printing them.
  • map with reduce arguments now has an efficient implementation (no copying/repmat)
  • Low-overhead Callback eval support was changed to eval_buffer
  • FunctionInternal::finalize no longer takes options dict.
  • Options always_inline and never_inline were added
  • Options is_diff_in and is_diff_out were added
  • (3.5.2) Ctrl-C interrupts are now disabled in multi-threaded Maps since they could result in crashes
  • (3.5.2) Sparsity of Callbacks can be set with has_jacobian_sparsity/get_jacobian_sparsity
  • (3.5.2) Jitted functions can now be serialized
  • (3.5.2) BSpline constructor takes an inline option yielding a fully differentiable (but not very scalable) BSpline operation for MX

CasADi expressions

  • breaking: IM type is removed from public API (was used to represent integer sparse matrices). Use DM instead.
  • breaking: linspace(0,1,3) and linspace(0.0,1,3) now both return [0 0.5 1] instead of [0 0 1] for the former
  • MX supports slicing with MX now (symbolic indexing).
  • Issue #2364:
    • breaking: veccat of an empty list now returns 0-by-1 instead of 0-by-0.
    • jtimes output dimensions have changed when any of the arguments is empty.
    • NLP function object's 'lam_p' is now 0-by-1 in case of missing parameters.
  • (3.5.2) Fixed long-standing bug in cosh derivative
  • (3.5.2) An MX operation convexify was added
  • (3.5.2) An inefficiency in MX multiplication sparsity was detected and fixed by Mirko Hahn

Interpolation functionality

  • Support for parametric (=changeable only, but not differentiable) grid and/or coefficients for linear/spline interpolation
    • for interpolant, new constructors where added that takes dimensions instead of concrete vectors
  • Support for symbolic (differentiable) grid and coefficients for linear interpolation (set inline option to true).

Python specific

  • Overhead-less CasADi Function evaluation API added through Python memoryviews
  • Similar functionality in Callbacks
  • (3.5.2) fix numpy compatibility (numpy 1.19)
  • (3.5.3) fix the numpy fix

Matlab/Octave specific

  • breaking: a(:)=b now behaves like Matlab builtin matrices when a is a CasADi matrix. Before, only the first column of a would be touched by this statement. (#2363)
  • breaking: Fixed bug where MX constructor treated a numeric row vector as column vector. Now size(MX(ones(1,4))) returns (1,4) as expected. (#2366)
  • Can now use spy directly on DM,MX,SX
  • (3.5.2) Printing from a multi-threaded map context is disabled beause it could result in crashes. In linux, you may still see the output from a terminal used to start Matlab

Opti

  • Opti supports conic problems now: Opti('conic')
  • One can now easily obtain a parametric solution as a CasADi Function from an Opti instance:
opti = Opti()
x = opti.variable()
y = opti.variable()
p = opti.parameter()
      
opti.minimize(y**2+sin(x-y-p)**2)
opti.subject_to(x+y>=1)
      
opti.solver(nlpsolver,nlpsolver_options)

F = opti.to_function("F",[x,p,opti.lam_g],[x,y])
      
r = F(0,0.1,0)

(3.5.1) Improved support for vertcatted inputs to to_function

  • Using Opti together with max_iter is more natural now: use solve_limited() to avoid exceptions to be raised when iterations or time runs out. No need to try/catch.

Code-generation

  • breaking: external now looks for a .dylib file, not .so for mac
  • breaking: Codegen API has changes related to thread-local memory:
  • void* mem changed to int mem
  • alloc_mem, init_mem, free_mem have been purged. checkout and release replace them.
  int mem = checkout();
  eval(arg, res, iw, w, mem);
  release(mem);
  • Codegen 'CODEGEN_PREFIX' has been renamed to 'CASADI_CODEGEN_PREFIX'
  • QP solvers (QRQP, OSQP) and SqpMethod codegenerate now. This means that embedded MPC with CasADi is now more practical.
  • Runge-Kutta and Collocation Integrator objects can be inlined into code-generatable MX Function with the 'simplify' option.
  • (3.5.1) an important flaw was corrected that caused incorrect code for expression graphs with logical 'and' and 'or'.
  • (3.5.1) fixed regression for expression graphs containing inf/nan
  • (3.5.2) fixed bug of a division looking like a comment
  • (3.5.2) fixed mem.h regression
  • (3.5.2) Made main and mex-related functions c89-compliant

Solvers

  • breaking: NLP solvers - bound_consistency, an option to post-process the primal and dual solution by projecting it on the bounds, introduced in 3.4, was changed to default off

  • Sundials was patched to support multi-threading

  • WORHP was bumped to v1.13

  • SNOPT was bumped to v7.7

  • SuperSCS (conic solver) was added

  • OSQP (QP solver) was added

  • CBC (LP solver) was added

  • (3.5.3) AMPL was fixed to allow other solvers than IPOPT

  • breaking: SQP Method

    • regularize_margin option was added
    • regularize (bool) option was removed. To get the effect of regularize=true, specify convexify_strategy='regularize'. Other strategies include clipping eigenvalues.
    • line search was reverted from a custom designed thing, to standard textbook L1
  • CPLEX and Gurobi got support for sos constraints

  • Conic/qpsol interface extended for semidefinite programming and SOCP

    • Solvers supporting SOCP: Gurobi, SuperSCS, CPLEX
  • breaking: Newton Rootfinder now supports a line_search option (default true)

  • Rootfinder now throws an exception by default ('error_on_fail' option true) when failing to converge

Convenience tools

  • Debugging facilities:
    • Function options print_in/print_in print inputs/outputs when numerically evaluating a function
    • Function option dump_in/dump_out dumps to the file system
    • Function option dump dumps the function itself (loadable with Function.load)
  • DM.from_file and DM.to_file with a MatrixMarket and txt support
  • Helping interaction with codegen with main=true: Function.generate_in/Function.nz_from_in/Function.nz_to_in to help creating input text files.
  • Function.convert_in/Function.convert_out to switch between list and dictionary arguments/results

Binaries

  • (3.5.1) Mac binaries for Matlab was switched to a different build environment. The binaries now require High Sierra or above, and work on Catalina.
  • (3.5.4) Mac binaries for Python and octave have been switched just like Matlab
  • (3.5.4) Linux binaries for Matlab and Octave have been switched to the manylinux environment, with gfortran dependency now grafted in (included, with a unique alias to avoid name collision)
casadi - 3.5.3

Published by jgillis about 4 years ago

Install

Grab a binary from the table (for MATLAB, use the newest compatible version below):

(*) Check your Python console if you need 32bit or 64bit - bitness should be printed at startup.

Unzip in your home directory and adapt the path:

Get started with the example pack.

Troubleshooting

Release notes

CasADi Functions

  • CasADi Functions can be serialized now (#308).
f.save('f.casadi')            % Dump any CasADi Function to a file
f = Function.load('f.casadi') % Loads back in

This enables easy sharing of models/solver isntances beteen Matlab/Python/C++ cross-platform, and enables a form of parallelization.

  • You can now evaluate CasADi Functions from C without requiring code-generation. This makes it possible to embed CasADi computations in Fortran, Julia, FMI, ...
  • All CasADi Functions support timing information now (print_time, default true for QP and NLP solvers). Use record_time to make timings available through f.stats() without printing them.
  • map with reduce arguments now has an efficient implementation (no copying/repmat)
  • Low-overhead Callback eval support was changed to eval_buffer
  • FunctionInternal::finalize no longer takes options dict.
  • Options always_inline and never_inline were added
  • Options is_diff_in and is_diff_out were added
  • (3.5.2) Ctrl-C interrupts are now disabled in multi-threaded Maps since they could result in crashes
  • (3.5.2) Sparsity of Callbacks can be set with has_jacobian_sparsity/get_jacobian_sparsity
  • (3.5.2) Jitted functions can now be serialized
  • (3.5.2) BSpline constructor takes an inline option yielding a fully differentiable (but not very scalable) BSpline operation for MX

CasADi expressions

  • breaking: IM type is removed from public API (was used to represent integer sparse matrices). Use DM instead.
  • breaking: linspace(0,1,3) and linspace(0.0,1,3) now both return [0 0.5 1] instead of [0 0 1] for the former
  • MX supports slicing with MX now (symbolic indexing).
  • Issue #2364:
    • breaking: veccat of an empty list now returns 0-by-1 instead of 0-by-0.
    • jtimes output dimensions have changed when any of the arguments is empty.
    • NLP function object's 'lam_p' is now 0-by-1 in case of missing parameters.
  • (3.5.2) Fixed long-standing bug in cosh derivative
  • (3.5.2) An MX operation convexify was added
  • (3.5.2) An inefficiency in MX multiplication sparsity was detected and fixed by Mirko Hahn

Interpolation functionality

  • Support for parametric (=changeable only, but not differentiable) grid and/or coefficients for linear/spline interpolation
    • for interpolant, new constructors where added that takes dimensions instead of concrete vectors
  • Support for symbolic (differentiable) grid and coefficients for linear interpolation (set inline option to true).

Python specific

  • Overhead-less CasADi Function evaluation API added through Python memoryviews
  • Similar functionality in Callbacks
  • (3.5.2) fix numpy compatibility (numpy 1.19)
  • (3.5.3) fix the numpy fix

Matlab/Octave specific

  • breaking: a(:)=b now behaves like Matlab builtin matrices when a is a CasADi matrix. Before, only the first column of a would be touched by this statement. (#2363)
  • breaking: Fixed bug where MX constructor treated a numeric row vector as column vector. Now size(MX(ones(1,4))) returns (1,4) as expected. (#2366)
  • Can now use spy directly on DM,MX,SX
  • (3.5.2) Printing from a multi-threaded map context is disabled beause it could result in crashes. In linux, you may still see the output from a terminal used to start Matlab

Opti

  • Opti supports conic problems now: Opti('conic')
  • One can now easily obtain a parametric solution as a CasADi Function from an Opti instance:
opti = Opti()
x = opti.variable()
y = opti.variable()
p = opti.parameter()
      
opti.minimize(y**2+sin(x-y-p)**2)
opti.subject_to(x+y>=1)
      
opti.solver(nlpsolver,nlpsolver_options)

F = opti.to_function("F",[x,p,opti.lam_g],[x,y])
      
r = F(0,0.1,0)

(3.5.1) Improved support for vertcatted inputs to to_function

  • Using Opti together with max_iter is more natural now: use solve_limited() to avoid exceptions to be raised when iterations or time runs out. No need to try/catch.

Code-generation

  • breaking: external now looks for a .dylib file, not .so
  • breaking: Codegen API has changes related to thread-local memory:
  • void* mem changed to int mem
  • alloc_mem, init_mem, free_mem have been purged. checkout and release replace them.
  int mem = checkout();
  eval(arg, res, iw, w, mem);
  release(mem);
  • Codegen 'CODEGEN_PREFIX' has been renamed to 'CASADI_CODEGEN_PREFIX'
  • QP solvers (QRQP, OSQP) and SqpMethod codegenerate now. This means that embedded MPC with CasADi is now more practical.
  • Runge-Kutta and Collocation Integrator objects can be inlined into code-generatable MX Function with the 'simplify' option.
  • (3.5.1) an important flaw was corrected that caused incorrect code for expression graphs with logical 'and' and 'or'.
  • (3.5.1) fixed regression for expression graphs containing inf/nan
  • (3.5.2) fixed bug of a division looking like a comment
  • (3.5.2) fixed mem.h regression
  • (3.5.2) Made main and mex-related functions c89-compliant

Solvers

  • breaking: NLP solvers - bound_consistency, an option to post-process the primal and dual solution by projecting it on the bounds, introduced in 3.4, was changed to default off

  • Sundials was patched to support multi-threading

  • WORHP was bumped to v1.13

  • SNOPT was bumped to v7.7

  • SuperSCS (conic solver) was added

  • OSQP (QP solver) was added

  • CBC (LP solver) was added

  • (3.5.3) AMPL was fixed to allow other solvers than IPOPT

  • breaking: SQP Method

    • regularize_margin option was added
    • regularize (bool) option was removed. To get the effect of regularize=true, specify convexify_strategy='regularize'. Other strategies include clipping eigenvalues.
    • line search was reverted from a custom designed thing, to standard textbook L1
  • CPLEX and Gurobi got support for sos constraints

  • Conic/qpsol interface extended for semidefinite programming and SOCP

    • Solvers supporting SOCP: Gurobi, SuperSCS, CPLEX
  • breaking: Newton Rootfinder now supports a line_search option (default true)

  • Rootfinder now throws an exception by default ('error_on_fail' option true) when failing to converge

Convenience tools

  • Debugging facilities:
    • Function options print_in/print_in print inputs/outputs when numerically evaluating a function
    • Function option dump_in/dump_out dumps to the file system
    • Function option dump dumps the function itself (loadable with Function.load)
  • DM.from_file and DM.to_file with a MatrixMarket and txt support
  • Helping interaction with codegen with main=true: Function.generate_in/Function.nz_from_in/Function.nz_to_in to help creating input text files.
  • Function.convert_in/Function.convert_out to switch between list and dictionary arguments/results

Binaries

  • (3.5.1) Mac binaries for Matlab was switched to a different build environment. The binaries now require High Sierra or above, and work on Catalina.
casadi - 3.5.2

Published by jgillis over 4 years ago

Install

Grab a binary from the table (for MATLAB, use the newest compatible version below):

(*) Check your Python console if you need 32bit or 64bit - bitness should be printed at startup.

Unzip in your home directory and adapt the path:

Get started with the example pack.

Troubleshooting

Release notes

CasADi Functions

  • CasADi Functions can be serialized now (#308).
f.save('f.casadi')            % Dump any CasADi Function to a file
f = Function.load('f.casadi') % Loads back in

This enables easy sharing of models/solver isntances beteen Matlab/Python/C++ cross-platform, and enables a form of parallelization.

  • You can now evaluate CasADi Functions from C without requiring code-generation. This makes it possible to embed CasADi computations in Fortran, Julia, FMI, ...
  • All CasADi Functions support timing information now (print_time, default true for QP and NLP solvers). Use record_time to make timings available through f.stats() without printing them.
  • map with reduce arguments now has an efficient implementation (no copying/repmat)
  • Low-overhead Callback eval support was changed to eval_buffer
  • FunctionInternal::finalize no longer takes options dict.
  • Options always_inline and never_inline were added
  • Options is_diff_in and is_diff_out were added
  • (3.5.2) Ctrl-C interrupts are now disabled in multi-threaded Maps since they could result in crashes
  • (3.5.2) Sparsity of Callbacks can be set with has_jacobian_sparsity/get_jacobian_sparsity
  • (3.5.2) Jitted functions can now be serialized
  • (3.5.2) BSpline constructor takes an inline option yielding a fully differentiable (but not very scalable) BSpline operation for MX

CasADi expressions

  • breaking: IM type is removed from public API (was used to represent integer sparse matrices). Use DM instead.
  • breaking: linspace(0,1,3) and linspace(0.0,1,3) now both return [0 0.5 1] instead of [0 0 1] for the former
  • MX supports slicing with MX now (symbolic indexing).
  • Issue #2364:
    • breaking: veccat of an empty list now returns 0-by-1 instead of 0-by-0.
    • jtimes output dimensions have changed when any of the arguments is empty.
    • NLP function object's 'lam_p' is now 0-by-1 in case of missing parameters.
  • (3.5.2) Fixed long-standing bug in cosh derivative
  • (3.5.2) An MX operation convexify was added
  • (3.5.2) An inefficiency in MX multiplication sparsity was detected and fixed by Mirko Hahn

Interpolation functionality

  • Support for parametric (=changeable only, but not differentiable) grid and/or coefficients for linear/spline interpolation
    • for interpolant, new constructors where added that takes dimensions instead of concrete vectors
  • Support for symbolic (differentiable) grid and coefficients for linear interpolation (set inline option to true).

Python specific

  • Overhead-less CasADi Function evaluation API added through Python memoryviews
  • Similar functionality in Callbacks
  • (3.5.2) fix numpy compatibility (numpy 1.19)

Matlab/Octave specific

  • breaking: a(:)=b now behaves like Matlab builtin matrices when a is a CasADi matrix. Before, only the first column of a would be touched by this statement. (#2363)
  • breaking: Fixed bug where MX constructor treated a numeric row vector as column vector. Now size(MX(ones(1,4))) returns (1,4) as expected. (#2366)
  • Can now use spy directly on DM,MX,SX
  • (3.5.2) Printing from a multi-threaded map context is disabled beause it could result in crashes. In linux, you may still see the output from a terminal used to start Matlab

Opti

  • Opti supports conic problems now: Opti('conic')
  • One can now easily obtain a parametric solution as a CasADi Function from an Opti instance:
opti = Opti()
x = opti.variable()
y = opti.variable()
p = opti.parameter()
      
opti.minimize(y**2+sin(x-y-p)**2)
opti.subject_to(x+y>=1)
      
opti.solver(nlpsolver,nlpsolver_options)

F = opti.to_function("F",[x,p,opti.lam_g],[x,y])
      
r = F(0,0.1,0)

(3.5.1) Improved support for vertcatted inputs to to_function

  • Using Opti together with max_iter is more natural now: use solve_limited() to avoid exceptions to be raised when iterations or time runs out. No need to try/catch.

Code-generation

  • breaking: external now looks for a .dylib file, not .so
  • breaking: Codegen API has changes related to thread-local memory:
  • void* mem changed to int mem
  • alloc_mem, init_mem, free_mem have been purged. checkout and release replace them.
  int mem = checkout();
  eval(arg, res, iw, w, mem);
  release(mem);
  • Codegen 'CODEGEN_PREFIX' has been renamed to 'CASADI_CODEGEN_PREFIX'
  • QP solvers (QRQP, OSQP) and SqpMethod codegenerate now. This means that embedded MPC with CasADi is now more practical.
  • Runge-Kutta and Collocation Integrator objects can be inlined into code-generatable MX Function with the 'simplify' option.
  • (3.5.1) an important flaw was corrected that caused incorrect code for expression graphs with logical 'and' and 'or'.
  • (3.5.1) fixed regression for expression graphs containing inf/nan
  • (3.5.2) fixed bug of a division looking like a comment
  • (3.5.2) fixed mem.h regression
  • (3.5.2) Made main and mex-related functions c89-compliant

Solvers

  • breaking: NLP solvers - bound_consistency, an option to post-process the primal and dual solution by projecting it on the bounds, introduced in 3.4, was changed to default off

  • Sundials was patched to support multi-threading

  • WORHP was bumped to v1.13

  • SNOPT was bumped to v7.7

  • SuperSCS (conic solver) was added

  • OSQP (QP solver) was added

  • CBC (LP solver) was added

  • (3.5.2) AMPL was fixed to allow other solvers than IPOPT

  • breaking: SQP Method

    • regularize_margin option was added
    • regularize (bool) option was removed. To get the effect of regularize=true, specify convexify_strategy='regularize'. Other strategies include clipping eigenvalues.
    • line search was reverted from a custom designed thing, to standard textbook L1
  • CPLEX and Gurobi got support for sos constraints

  • Conic/qpsol interface extended for semidefinite programming and SOCP

    • Solvers supporting SOCP: Gurobi, SuperSCS, CPLEX
  • breaking: Newton Rootfinder now supports a line_search option (default true)

  • Rootfinder now throws an exception by default ('error_on_fail' option true) when failing to converge

Convenience tools

  • Debugging facilities:
    • Function options print_in/print_in print inputs/outputs when numerically evaluating a function
    • Function option dump_in/dump_out dumps to the file system
    • Function option dump dumps the function itself (loadable with Function.load)
  • DM.from_file and DM.to_file with a MatrixMarket and txt support
  • Helping interaction with codegen with main=true: Function.generate_in/Function.nz_from_in/Function.nz_to_in to help creating input text files.
  • Function.convert_in/Function.convert_out to switch between list and dictionary arguments/results

Binaries

  • (3.5.1) Mac binaries for Matlab was switched to a different build environemnt. The binaries now require High Sierra or above, and work on Catalina.
casadi - 3.5.1

Published by jgillis about 5 years ago

Install

Grab a binary from the table (for MATLAB, use the newest compatible version below):

(*) Check your Python console if you need 32bit or 64bit - bitness should be printed at startup.

Unzip in your home directory and adapt the path:

Get started with the example pack.

Troubleshooting

Release notes

CasADi Functions

  • CasADi Functions can be serialized now (#308).
f.save('f.casadi')            % Dump any CasADi Function to a file
f = Function.load('f.casadi') % Loads back in

This enables easy sharing of models/solver isntances beteen Matlab/Python/C++ cross-platform, and enables a form of parallelization.

  • You can now evaluate CasADi Functions from C without requiring code-generation. This makes it possible to embed CasADi computations in Fortran, Julia, FMI, ...
  • All CasADi Functions support timing information now (print_time, default true for QP and NLP solvers). Use record_time to make timings available through f.stats() without printing them.
  • map with reduce arguments now has an efficient implementation (no copying/repmat)
  • Low-overhead Callback eval support was changed to eval_buffer
  • FunctionInternal::finalize no longer takes options dict.
  • Options always_inline and never_inline were added
  • Options is_diff_in and is_diff_out were added

CasADi expressions

  • breaking: IM type is removed from public API (was used to represent integer sparse matrices). Use DM instead.
  • breaking: linspace(0,1,3) and linspace(0.0,1,3) now both return [0 0.5 1] instead of [0 0 1] for the former
  • MX supports slicing with MX now (symbolic indexing).
  • Issue #2364:
    • breaking: veccat of an empty list now returns 0-by-1 instead of 0-by-0.
    • jtimes output dimensions have changed when any of the arguments is empty.
    • NLP function object's 'lam_p' is now 0-by-1 in case of missing parameters.

Interpolation functionality

  • Support for parametric (=changeable only, but not differentiable) grid and/or coefficients for linear/spline interpolation
    • for interpolant, new constructors where added that takes dimensions instead of concrete vectors
  • Support for symbolic (differentiable) grid and coefficients for linear interpolation (set inline option to true).

Python specific

  • Overhead-less CasADi Function evaluation API added through Python memoryviews
  • Similar functionality in Callbacks

Matlab/Octave specific

  • breaking: a(:)=b now behaves like Matlab builtin matrices when a is a CasADi matrix. Before, only the first column of a would be touched by this statement. (#2363)
  • breaking: Fixed bug where MX constructor treated a numeric row vector as column vector. Now size(MX(ones(1,4))) returns (1,4) as expected. (#2366)
  • Can now use spy directly on DM,MX,SX

Opti

  • Opti supports conic problems now: Opti('conic')
  • One can now easily obtain a parametric solution as a CasADi Function from an Opti instance:
opti = Opti()
x = opti.variable()
y = opti.variable()
p = opti.parameter()
      
opti.minimize(y**2+sin(x-y-p)**2)
opti.subject_to(x+y>=1)
      
opti.solver(nlpsolver,nlpsolver_options)

F = opti.to_function("F",[x,p,opti.lam_g],[x,y])
      
r = F(0,0.1,0)

(3.5.1) Improved support for vertcatted inputs to to_function

  • Using Opti together with max_iter is more natural now: use solve_limited() to avoid exceptions to be raised when iterations or time runs out. No need to try/catch.

Code-generation

  • breaking: external now looks for a .dylib file, not .so
  • breaking: Codegen API has changes related to thread-local memory:
  • void* mem changed to int mem
  • alloc_mem, init_mem, free_mem have been purged. checkout and release replace them.
  int mem = checkout();
  eval(arg, res, iw, w, mem);
  release(mem);
  • Codegen 'CODEGEN_PREFIX' has been renamed to 'CASADI_CODEGEN_PREFIX'
  • QP solvers (QRQP, OSQP) and SqpMethod codegenerate now. This means that embedded MPC with CasADi is now more practical.
  • Runge-Kutta and Collocation Integrator objects can be inlined into code-generatable MX Function with the 'simplify' option.
  • (3.5.1) an important flaw was corrected that caused incorrect code for expression graphs with logical 'and' and 'or'.
  • (3.5.1) fixed regression for expression graphs containing inf/nan

Solvers

  • breaking: NLP solvers - bound_consistency, an option to post-process the primal and dual solution by projecting it on the bounds, introduced in 3.4, was changed to default off

  • Sundials was patched to support multi-threading

  • WORHP was bumped to v1.13

  • SNOPT was bumped to v7.7

  • SuperSCS (conic solver) was added

  • OSQP (QP solver) was added

  • CBC (LP solver) was added

  • breaking: SQP Method

    • regularize_margin option was added
    • regularize (bool) option was removed. To get the effect of regularize=true, specify convexify_strategy='regularize'. Other strategies include clipping eigenvalues.
    • line search was reverted from a custom designed thing, to standard textbook L1
  • CPLEX and Gurobi got support for sos constraints

  • Conic/qpsol interface extended for semidefinite programming and SOCP

    • Solvers supporting SOCP: Gurobi, SuperSCS, CPLEX
  • breaking: Newton Rootfinder now supports a line_search option (default true)

  • Rootfinder now throws an exception by default ('error_on_fail' option true) when failing to converge

Convenience tools

  • Debugging facilities:
    • Function options print_in/print_in print inputs/outputs when numerically evaluating a function
    • Function option dump_in/dump_out dumps to the file system
    • Function option dump dumps the function itself (loadable with Function.load)
  • DM.from_file and DM.to_file with a MatrixMarket and txt support
  • Helping interaction with codegen with main=true: Function.generate_in/Function.nz_from_in/Function.nz_to_in to help creating input text files.
  • Function.convert_in/Function.convert_out to switch between list and dictionary arguments/results

Binaries

  • (3.5.1) Mac binaries for Matlab was switched to a different build environemnt. The binaries now require High Sierra or above, and work on Catalina.
casadi - 3.5.0

Published by jgillis about 5 years ago

Install

Grab a binary from the table (for MATLAB, use the newest compatible version below):

(*) Check your Python console if you need 32bit or 64bit - bitness should be printed at startup.

Unzip in your home directory and adapt the path:

Get started with the example pack.

Troubleshooting

Release notes

CasADi Functions

  • CasADi Functions can be serialized now (#308).
f.save('f.casadi')            % Dump any CasADi Function to a file
f = Function.load('f.casadi') % Loads back in

This enables easy sharing of models/solver isntances beteen Matlab/Python/C++ cross-platform, and enables a form of parallelization.

  • You can now evaluate CasADi Functions from C without requiring code-generation. This makes it possible to embed CasADi computations in Fortran, Julia, FMI, ...
  • All CasADi Functions support timing information now (print_time, default true for QP and NLP solvers). Use record_time to make timings available through f.stats() without printing them.
  • map with reduce arguments now has an efficient implementation (no copying/repmat)
  • Low-overhead Callback eval support was changed to eval_buffer
  • FunctionInternal::finalize no longer takes options dict.
  • Options always_inline and never_inline were added
  • Options is_diff_in and is_diff_out were added

CasADi expressions

  • breaking: IM type is removed from public API (was used to represent integer sparse matrices). Use DM instead.
  • breaking: linspace(0,1,3) and linspace(0.0,1,3) now both return [0 0.5 1] instead of [0 0 1] for the former
  • MX supports slicing with MX now (symbolic indexing).
  • Issue #2364:
    • breaking: veccat of an empty list now returns 0-by-1 instead of 0-by-0.
    • jtimes output dimensions have changed when any of the arguments is empty.
    • NLP function object's 'lam_p' is now 0-by-1 in case of missing parameters.

Interpolation functionality

  • Support for parametric (=changeable only, but not differentiable) grid and/or coefficients for linear/spline interpolation
    • for interpolant, new constructors where added that takes dimensions instead of concrete vectors
  • Support for symbolic (differentiable) grid and coefficients for linear interpolation (set inline option to true).

Python specific

  • Overhead-less CasADi Function evaluation API added through Python memoryviews
  • Similar functionality in Callbacks

Matlab/Octave specific

  • breaking: a(:)=b now behaves like Matlab builtin matrices when a is a CasADi matrix. Before, only the first column of a would be touched by this statement. (#2363)
  • breaking: Fixed bug where MX constructor treated a numeric row vector as column vector. Now size(MX(ones(1,4))) returns (1,4) as expected. (#2366)
  • Can now use spy directly on DM,MX,SX

Opti

  • Opti supports conic problems now: Opti('conic')
  • One can now easily obtain a parametric solution as a CasADi Function from an Opti instance:
opti = Opti()
x = opti.variable()
y = opti.variable()
p = opti.parameter()
      
opti.minimize(y**2+sin(x-y-p)**2)
opti.subject_to(x+y>=1)
      
opti.solver(nlpsolver,nlpsolver_options)

F = opti.to_function("F",[x,p,opti.lam_g],[x,y])
      
r = F(0,0.1,0)
  • Using Opti together with max_iter is more natural now: use solve_limited() to avoid exceptions to be raised when iterations or time runs out. No need to try/catch.

Code-generation

  • breaking: external now looks for a .dylib file, not .so
  • breaking: Codegen API has changes related to thread-local memory:
  • void* mem changed to int mem
  • alloc_mem, init_mem, free_mem have been purged. checkout and release replace them.
  int mem = checkout();
  eval(arg, res, iw, w, mem);
  release(mem);
  • Codegen 'CODEGEN_PREFIX' has been renamed to 'CASADI_CODEGEN_PREFIX'
  • QP solvers (QRQP, OSQP) and SqpMethod codegenerate now. This means that embedded MPC with CasADi is now more practical.
  • Runge-Kutta and Collocation Integrator objects can be inlined into code-generatable MX Function with the 'simplify' option.

Solvers

  • breaking: NLP solvers - bound_consistency, an option to post-process the primal and dual solution by projecting it on the bounds, introduced in 3.4, was changed to default off

  • Sundials was patched to support multi-threading

  • WORHP was bumped to v1.13

  • SNOPT was bumped to v7.7

  • SuperSCS (conic solver) was added

  • OSQP (QP solver) was added

  • CBC (LP solver) was added

  • breaking: SQP Method

    • regularize_margin option was added
    • regularize (bool) option was removed. To get the effect of regularize=true, specify convexify_strategy='regularize'. Other strategies include clipping eigenvalues.
    • line search was reverted from a custom designed thing, to standard textbook L1
  • CPLEX and Gurobi got support for sos constraints

  • Conic/qpsol interface extended for semidefinite programming and SOCP

    • Solvers supporting SOCP: Gurobi, SuperSCS, CPLEX
  • breaking: Newton Rootfinder now supports a line_search option (default true)

  • Rootfinder now throws an exception by default ('error_on_fail' option true) when failing to converge

Convenience tools

  • Debugging facilities:
    • Function options print_in/print_in print inputs/outputs when numerically evaluating a function
    • Function option dump_in/dump_out dumps to the file system
    • Function option dump dumps the function itself (loadable with Function.load)
  • DM.from_file and DM.to_file with a MatrixMarket and txt support
  • Helping interaction with codegen with main=true: Function.generate_in/Function.nz_from_in/Function.nz_to_in to help creating input text files.
  • Function.convert_in/Function.convert_out to switch between list and dictionary arguments/results
casadi -

Published by jgillis over 5 years ago

casadi - 3.4.5

Published by jgillis about 6 years ago

Install

Grab a binary from the table (for MATLAB, use the newest compatible version below):

(*) Check your Python console if you need 32bit or 64bit - bitness should be printed at startup.

Unzip in your home directory and adapt the path:

Get started with the example pack.

Troubleshooting

Getting error "CasADi is not running from its package context." in Python? Check that you have casadi-py27-v3.4.5/casadi/casadi.py. If you have casadi-py27-v3.4.5/casadi.py instead, that's not good; add an extra casadi folder.

Got stuck while installing? You may also try out CasADi without installing, right in your browser (pick Python or Octave/Matlab).

Release notes

Credit where credit is due: Proper attribution of linear solver routines, reimplementation of code generation for linear solvers #2158, #2134

CasADi 3.3 introduced support for two sparse direct linear solvers relying based on sparse direct QR factorization and sparse direct LDL factorization, respectively. In the release notes and in the code, it was not made clear enough that part of these routines could be considered derivative works of CSparse and LDL, respectively, both under copyright of Tim Davis. In the current release, routines derived from CSparse and LDL are clearly marked as such and to be considered derivative work under LGPL. All these routines reside inside the casadi::Sparsity class.
Since CasADi, CSparse and LDL all have the same open-source license (LGPL), this will not introduce any additional restrictions for users.

Since C code generated from CasADi is not LGPL (allowing CasADi users to use the generated code freely), all CSparse and LDL derived routines have been removed or replaced in CasADi's C runtime. This means that code generation for CasADi's 'qr' and 'ldl' is now possible without any additional license restrictions. A number of bugs have also been resolved.

Parametric sensitivity for NLP solvers #724

CasADi 3.4 introduces differentiability for NLP solver instances in CasADi. Derivatives can be calculated efficiently with either forward or reverse mode algorithmic differentiation. We will detail this functionality in future publications, but in the meantime, feel free to reach out to Joel if you have questions about the functionality. The implementation is based on using derivative propagation rules to the implicit function theorem, applied to the nonlinear KKT system. It is part of the NLP solver base class and should in principle work with any NLP solver, although the factorization and solution of the KKT system (based on the sparse QR above) is likely to be a speed bottle neck in applications. The derivative calculations also depend on accurate Lagrange multipliers to be available, in particular with the correct signs for all multipliers. Functions for calculating parametric sensitivities for a particular system can be C code generated.

A primal-dual active set method for quadratic programming

The parametric sensitivity analysis for NLP solvers, detailed above, is only as good as the multipliers you provide to it. Multipliers from an interior point method such as IPOPT are usually not accurate enough to be used for the parametric sensitivity analysis, which in particular relies on knowledge of the active set. For this reason, we have started work on a primal-dual active set method for quadratic programming. The method relies on the same factorization of the linearized KKT system as the parametric sensitivity analysis and will support C code generation. The solver is available as the "activeset" plugin in CasADi. The method is still work-in-progress and in particular performs poorly if the Hessian matrix is not strictly positive definite.

Changes in Opti

  • describe methods in Matlab now follows index-1 based convention.
  • Added show_infeasibilities to help debugging infeasible problems.
  • Added opti.lbg,opti.ubg

Changes in existing functionality

  • Some CasADi operations failed when the product of rows and columns of a matrix was larger then 2^31-1.
    This limit has been raised to 2^63-1 by changing CasADi integer types to casadi_int (long long).
    The change is hidden for Python/Octave/Matlab users, but C++ users may be affected.
  • Fixed various bottlenecks in large scale MX Function initialization
  • Non-zero location reports for NaN/Inf now follow index-1 based convention in Matlab interface.

Added functionality

  • SX Functions can be serialized/pickled/saved now.
  • Added for-loop equivalents to the users guide
  • New backend for parallel maps: "thread" target, shipped in the binaries.
  • Uniform 'success' flag in solver.stats() for nlpsol/conic
  • Added evalf function to numerically evaluate an SX/MX matrix that does not depend on any symbols
  • Added diff and cumsum (follows the Matlab convention)
  • Added a rootfinder plugin ('fast_newton') that can code-generate
  • Added binary search for Linear/BSpline Interpolant. Used by default for grid dimensions (>=100)

Binaries

  • Binaries now come with a large set of plugins enabled
  • Binaries ship with "thread" parallelization
  • Binaries are hosted on Github instead of Sourceforge

Misc

  • Default build mode is Release mode once again (as was always intended)
  • CasADi passes with -Werror for gcc-6 and gcc-7
casadi - 3.4.4

Published by jgillis over 6 years ago

Install

Grab a binary from the table (for MATLAB, use the newest compatible version below):

(*) Check your Python console if you need 32bit or 64bit - bitness should be printed at startup.

Unzip in your home directory and adapt the path:

Get started with the example pack.

Troubleshooting

Getting error "CasADi is not running from its package context." in Python? Check that you have casadi-py27-v3.4.4/casadi/casadi.py. If you have casadi-py27-v3.4.4/casadi.py instead, that's not good; add an extra casadi folder.

Got stuck while installing? You may also try out CasADi without installing, right in your browser (pick Python or Octave/Matlab).

Release notes

Credit where credit is due: Proper attribution of linear solver routines, reimplementation of code generation for linear solvers #2158, #2134

CasADi 3.3 introduced support for two sparse direct linear solvers relying based on sparse direct QR factorization and sparse direct LDL factorization, respectively. In the release notes and in the code, it was not made clear enough that part of these routines could be considered derivative works of CSparse and LDL, respectively, both under copyright of Tim Davis. In the current release, routines derived from CSparse and LDL are clearly marked as such and to be considered derivative work under LGPL. All these routines reside inside the casadi::Sparsity class.
Since CasADi, CSparse and LDL all have the same open-source license (LGPL), this will not introduce any additional restrictions for users.

Since C code generated from CasADi is not LGPL (allowing CasADi users to use the generated code freely), all CSparse and LDL derived routines have been removed or replaced in CasADi's C runtime. This means that code generation for CasADi's 'qr' and 'ldl' is now possible without any additional license restrictions. A number of bugs have also been resolved.

Parametric sensitivity for NLP solvers #724

CasADi 3.4 introduces differentiability for NLP solver instances in CasADi. Derivatives can be calculated efficiently with either forward or reverse mode algorithmic differentiation. We will detail this functionality in future publications, but in the meantime, feel free to reach out to Joel if you have questions about the functionality. The implementation is based on using derivative propagation rules to the implicit function theorem, applied to the nonlinear KKT system. It is part of the NLP solver base class and should in principle work with any NLP solver, although the factorization and solution of the KKT system (based on the sparse QR above) is likely to be a speed bottle neck in applications. The derivative calculations also depend on accurate Lagrange multipliers to be available, in particular with the correct signs for all multipliers. Functions for calculating parametric sensitivities for a particular system can be C code generated.

A primal-dual active set method for quadratic programming

The parametric sensitivity analysis for NLP solvers, detailed above, is only as good as the multipliers you provide to it. Multipliers from an interior point method such as IPOPT are usually not accurate enough to be used for the parametric sensitivity analysis, which in particular relies on knowledge of the active set. For this reason, we have started work on a primal-dual active set method for quadratic programming. The method relies on the same factorization of the linearized KKT system as the parametric sensitivity analysis and will support C code generation. The solver is available as the "activeset" plugin in CasADi. The method is still work-in-progress and in particular performs poorly if the Hessian matrix is not strictly positive definite.

Changes in Opti

  • describe methods in Matlab now follows index-1 based convention.
  • Added show_infeasibilities to help debugging infeasible problems.
  • Added opti.lbg,opti.ubg

Changes in existing functionality

  • Some CasADi operations failed when the product of rows and columns of a matrix was larger then 2^31-1.
    This limit has been raised to 2^63-1 by changing CasADi integer types to casadi_int (long long).
    The change is hidden for Python/Octave/Matlab users, but C++ users may be affected.
  • Fixed various bottlenecks in large scale MX Function initialization
  • Non-zero location reports for NaN/Inf now follow index-1 based convention in Matlab interface.

Added functionality

  • SX Functions can be serialized/pickled/saved now.
  • Added for-loop equivalents to the users guide
  • New backend for parallel maps: "thread" target, shipped in the binaries.
  • Uniform 'success' flag in solver.stats() for nlpsol/conic
  • Added evalf function to numerically evaluate an SX/MX matrix that does not depend on any symbols
  • Added diff and cumsum (follows the Matlab convention)
  • Added a rootfinder plugin ('fast_newton') that can code-generate
  • Added binary search for Linear/BSpline Interpolant. Used by default for grid dimensions (>=100)

Binaries

  • Binaries now come with a large set of plugins enabled
  • Binaries ship with "thread" parallelization
  • Binaries are hosted on Github instead of Sourceforge

Misc

  • Default build mode is Release mode once again (as was always intended)
  • CasADi passes with -Werror for gcc-6 and gcc-7
casadi - 3.4.3

Published by jgillis over 6 years ago

casadi - 3.4.2

Published by jgillis over 6 years ago

Octave bumped to 4.2.2.
Worhp solver fixed.
Docstrings are back for all casadi methods.

casadi - 3.4.1

Published by jgillis over 6 years ago

casadi -

Published by jgillis over 6 years ago

Package Rankings
Top 1.01% on Pypi.org
Related Projects