Releases: FilippoAiraldi/casadi-nlp
Releases · FilippoAiraldi/casadi-nlp
1.6.4
1.6.3
Changes
Major
- implemented
Solution.infeasible
property that tries to understand whether the solver returned an infeasible status - implemented
csnlp.util.math.norm_1
andnorm_inf
for easier conversion of these norms to linear programmes - converted
Mpc.set_linear_dynamics
to the more generalset_affine_dynamics
- added single and multiple shooting affine time-varying dynamics in
PwaMpc
, allowing users to specify a switching sequence and solving a simpler quadratic programme, instead of optimizing also over the sequence of regions
Minor
- added
solver_plugin
property toSolution
, so that one can retrieve the solver used to compute a solution to an optimization problem - fixed bug with optimization problems with a single scalar discrete variable
- fixed bug in
ScenarioMpc
where single slack variables were not properly substituted - better docstrings
- updated CI
1.6.2
Changes
Major
- implemented support for discrete variables (see argument
discrete
incsnlp.Nlp.variable
) - implemented new wrapper
csnlp.wrappers.PwaMpc
for creating model predictive control (MPC) controllers for piecewise affine (PWA) systems. The class takes care of automatically converting the PWA dynamics to a big-M mixed-logic relaxation - renamed
csnlp.wrappers.Mpc.set_dynamics
to the more informative namecsnlp.wrappers.Mpc.set_nonlinear_dynamics
- implemented
csnlp.wrappers.Mpc.set_linear_dynamics
- all dynamics constraints are now generated via
casadi.Function.map
(in multiple shooting) andcasadi.Function.mapaccum
(in single shooting) for faster construction time
Minor
- implemented new examples for mixed-integer optimization problems and optimal control problems
- better docstrings and error messages
- dynamics functions are no longer saved, after setting them, in the
csnlp.wrappers.Mpc
class and subclasses
1.6.1
Changes
Major
- Implemented a lazy version of
csnlp.Solution
that will postpone computations of various quantities pertaining to a primal-dual optimal point until necessary - Removed the need to specify
n_in
andn_out
incsnlp.wrappers.Mpc.set_dynamics
- Refined the dependency on NumPy
Minor
- In
csnlp.wrappers.NlpSensitivity
, the computation of Jacobians and Hessians was streamlined: now only those sensitivities that are needed by the user are computed - Bug fixed in
csnlp.Nlp.init_solver
where the solver options were not properly saved for later re-initalizations - Improvements and fixes to documentation
v1.6.0
Changes
- Now documentation is available online here
- Updated dependency to
numpy < 2.0.0
, as the newest release ofnumpy
breakscasadi
- Updated dependency to
joblib >= 1.4.0
- Updated
multistart.ParallelMultistartNlp.__init__
to accept a genericparallel_kwargs
dict to instantiate thejoblib.Parallel
backend
v1.5.10
Changes
Major
- added support for NumPy's .npz saving format to the I/O utils in
csnlp.util.io
- implemented new multistart NLP paradigm, the
MappedMultistartNlp
class, which leverages thecasadi.Function.map
API
Minor
- improvements to
ParallelMultistartNlp
: now the solutions are ranked first by feasibility, then by success, and only at the end by optimality - improvements to
RandomStartPoints
: now supports two new arguments,biases
andscales
- improved internal logics and type hints
v1.5.9
Changes
Major
- fixed error on bounds on initial and terminal states in
ScenarioBasedMpc
Minor
- improvements to internal files
- switched to pre-hooks
- fixes to tests
- better type hinting for seed
v1.5.8
Changes
Major
- removed support for Python 3.8
- implemented the
ScenarioBasedMpc
wrapper to create MPC controllers based on the Scenario Approach - added extra args in
Mpc
andScenarioBasedMpc
to allow to include or exclude lower and upper bounds on initial and terminal state upon creation - removed
quad_form
in favour ofcasadi.bilin
(which is built in in the library) - added support for all solvers (previously, only IPOPT, sqpmethod, and a small other few could be instantiated)
Minor
- updates to config files
- updated plotting utilities
- moved from
full
totoarray
, which appears to be faster - moved to relative imports
v1.5.7
Changes
Major
- method
licq
inNlpSensitivity
wrapper now includes also the jacobians of the upper and lower bound inequalities - added methods in
Nlp
to remove bounds on variables and constraints AFTER their creation (still, it is recommended to avoid doing so it not necessary) - in
Mpc
, added possibility to automatically remove upper and lower bounds on initial states to avoid overconstraining (disabled by default) Solution
object now hosts also the values of the dual variables at the optimal point
Minor
- improved cache handling
- removed usage of slots due to bugs in pickling and deepcopying
- removed some unused methods
v1.5.6
Changes
- improved lower and upper bound broadcasting during variable creation
- removed
util/random.py
in favour ofnp.random.default_rng