This pull request adds some fixes and improvements to the recent time-varying solvers, to the tutorials and to the mex functions.
Changes have only been made for the ADMM and FISTA solvers of the LaxMPC and EquMPC formulations. Some of these changes still need to be made for the solvers of the other MPC formulations (see Issue #41).
In particular:
Improved how mexFunction() handles working with structured in C/Matlab. The code has been improved so that we now pass the solution structure to the C solver and then extract the results from it to a Matlab structure. The benefit is that we no longer need separate function prototypes for the plain C and the Matlab versions. This greatly simplifies the code, which no longer makes use of the CONF_MATLAB compiler flag. The code for measuring computation times has also been simplified thanks to this.
Improved handling of LB and UB. The recent introduction of the time-varying solvers broke how system constraints LB and UB where handled by the toolbox. This has been fixed. Now LB and UB can only be modified in the time-varying version of the solvers.
Improved the tutorials and added a new tutorial for the time-varying solvers. Renamed them to provide some indication of which order to follow (Issue #35)
Fixed a bug that resulted in an error when a cell for the variables was empty (Issue #30)
Renamed defines nn, nm and NN to nn_, nm_ and NN_.
Cleaned a bit the code of the time-varying solvers and added some notes on possible improvements.
This pull request adds some fixes and improvements to the recent time-varying solvers, to the tutorials and to the
mex
functions.Changes have only been made for the
ADMM
andFISTA
solvers of theLaxMPC
andEquMPC
formulations. Some of these changes still need to be made for the solvers of the other MPC formulations (see Issue #41).In particular:
mexFunction()
handles working with structured in C/Matlab. The code has been improved so that we now pass thesolution
structure to theC
solver and then extract the results from it to a Matlab structure. The benefit is that we no longer need separate function prototypes for the plain C and the Matlab versions. This greatly simplifies the code, which no longer makes use of theCONF_MATLAB
compiler flag. The code for measuring computation times has also been simplified thanks to this.LB
andUB
. The recent introduction of the time-varying solvers broke how system constraintsLB
andUB
where handled by the toolbox. This has been fixed. NowLB
andUB
can only be modified in the time-varying version of the solvers.nn
,nm
andNN
tonn_
,nm_
andNN_
.