1. Introduction¶
This is a user manual for FORCESPRO, a commercial tool for generating highly customized optimization solvers that can be deployed on all embedded computers. FORCESPRO is intended to be used in situations were the same optimization problem has to be solved many times, possibly in real-time, with varying data, i.e. there is sufficient time in the design stage for generating a customized solution for the problem you want to solve.

Figure 1.1 Overview of FORCESPRO.¶
The code generation engine in FORCESPRO extracts the structure in your optimization problem and automatically synthesizes a custom optimization solver. The resulting C code can only solve one optimization problem (with certain data changing), hence it is typically many times more efficient and smaller code size than general-purpose optimization solvers. The generated C code is also library-free and uses no dynamic memory allocation making it suitable for safe deployment on real-time autonomous systems.
This document will show you how to input your optimization problem description for code generation in FORCESPRO. It is important to point out that FORCESPRO is not a tool for transforming a problem specification into an optimization problem description. This responsibility lies with the user.
1.1. Troubleshooting and support¶
FORCESPRO typically returns meaningful error messages when code generation errors occur due to invalid user inputs. When encountering other errors please consult our documentation which is included in the FORCESPRO client and is also available on all FORCESPRO servers. In case you cannot find a solution to your problem please submit a bug report to support@embotech.com.
Much effort has gone into making this interface easy to use. We welcome all your suggestions for further improving the usability of the tool. Requests for special functionality for your particular problem will also be considered by our development team. For all requests and feedback please contact support@embotech.com.
1.2. Licensing¶
1.2.1. Commercial licensing¶
FORCESPRO licenses are available through a subscription model. There are four types of licenses, as seen below:
Engineer License: For generating FORCESPRO solvers. Charged per engineer computer.
Software Testing License (Sil/CI): For running FORCESPRO solvers on a desktop PC or a server for simulation and (automated) testing. No physical system is controlled. Charged per platform running the solver.
Floating License: For running FORCESPRO solvers on servers or virtualised environments (such as Docker containers) without permanently mapping the license to a hardware system. Charged per number of platforms able to concurrently run the solver. Currently available only on Linux x86/x86_64.
Hardware Testing License (HiL/Field Testing): For controlling a physical system (i.e. the target platform may also be an ECU or a rapid prototyping platform). Charged per platform running the solver.
For more information regarding licensing please check on our website or contact sales@embotech.com.
FORCESPRO licenses are available in variants S, M and L. For more information please check the section License Variants
1.2.2. Academic licensing¶
Users at degree granting institutions can have access to the Engineer License version of FORCESPRO free of charge provided they are not doing research for an industrial partner. Software Testing and Hardware Testing licenses are also available at highly reduced rates.
1.3. Citing FORCESPRO¶
If you use FORCESPRO in published scientific work, please cite the following two papers:
@misc{FORCESPro,
Author = "Alexander Domahidi and Juan Jerez",
Howpublished = "Embotech AG, url=https://embotech.com/FORCES-Pro",
Title = "FORCES Professional",
Year = "2014--2019"
}
@article{FORCESNLP,
Author = "A. Zanelli and A. Domahidi and J. Jerez and M. Morari",
Title = "FORCES NLP: an efficient implementation of interior-point...
methods for multistage nonlinear nonconvex programs",
Journal = "International Journal of Control",
Year = "2017",
Pages = "1-17"
}
1.4. Release Notes¶
1.4.1. Improvements in FORCESPRO 4.1.1¶
Improved hashing of sparse linear algebra routines
Fixed MATLAB network communication, replaced deprecated SOAP methods with new ones, enabled with legacyNetworkConnections = 0
Parallel BFGS updates with compact_code = 0 (default)
Prevent Matlab client to overwrite user script if solver has same filename
Throw proper exceptions when block structure is not detected in sparse parametric equalities in low-level interface
Parallel callbacks evaluation with compact_code = 1 and parallel >= 1
Reverted to legacy integrators in default behaviour
Added code generation compatibility with MATLAB 2016a
Various fixes and updates in the API of the Python dump tool
1.4.2. Bug Fixes in FORCESPRO 4.1.1¶
Fixed FORCESconfigureClient to work on all OS
Fixed codegen failure with compact_code related to nonlinear inequalities
Disabled compact_code when initial equality constraint not eliminated (D0)
Restored functionality to collect variable declarations at beginning of CasADi callbacks (only if c90 codeoption is set)
Bug fix for copy of scaler parameters with compact_code = 1
1.4.3. New features in FORCESPRO 4.1.0¶
Code-generated explicit integrators and sensitivity with chain rule and variational differential equality
Python dump tool and compatible MATLAB dump tool
Option for adding a single external callback instead of adding all callbacks externally
Added solver and webcompiler support for speedgoat qnx
1.4.4. Improvements in FORCESPRO 4.1.0¶
Scalar parameters are not treated as arrays anymore for compatibility with Matlab Coder. To enable the previous behaviour set codeoptions.size_one_param_as_array = 1
Separated CasADi and Symbolic math toolbox callbacks to have more control over dynamics callbacks.
Introduce codeoptions.separateCasadiFiles which when == 1 ensures old callback file structure (separate model files).
Replaced old obstacle avoidance client examples for python and matlab by new interactive ones
Added path tracking example for the python and the matlab client
1.4.5. Bug Fixes in FORCESPRO 4.1.0¶
Fixed Simulink and standalone Python interface using scalar parameters
Fixed some openmp issues and added number of threads as runtime parameter
1.4.6. New features in FORCESPRO 4.0.0¶
Support for FORCES PRO NLP solvers (PDIP_NLP and SQP_NLP) in The MathWorks Model Predictive Control Toolbox (TM)
Solver timeout option for PDIP_NLP, SQP_NLP and PDIP
New option exportBFGS which enables export of BFGS diagonal on every stage
1.4.7. Improvements in FORCESPRO 4.0.0¶
Server now returns interface/definitions.py file independent of whether the request was sent from the MATLAB or Python client
Added support for symbolic step size in Python integrators
Added connection tester for the forces server
Added new parameter type Adense to allow copy of dense A matrix to sparse internally. Should be used within Model Predictive Control Toolbox plugin only !!
New option nlp.parametricBFGSinit for initializing BFGS matrix as a run-time parameter
1.4.8. Bug Fixes in FORCESPRO 4.0.0¶
Fixed export of root relaxation solution in MINLP solver
Fixed number of outputs in ADMM method
Added fix for floattype ‘int’ and ‘short’
Fixed issue occuring in Python client when all initial or all final variables are fixed
Fixed reading issue in csmatio library
1.4.9. New features in FORCESPRO 3.1.0¶
High-level Python interface for NLP solvers
1.4.10. Improvements in FORCESPRO 3.1.0¶
Vectorized outer product on one-stage dense QP problems in double precision on Intel platforms
Refactoring of clients and server to enable standalone release
Check for vectorization instructions in Python client, refactored C code in dll
Made variables in generated interface static
Improved efficiency of CasADi file postprocessing in Matlab client
Export of dual variables in PDIP_NLP
Fixed updateClient scripts to delete old data
Made FORCES_NLP return dumped formulation even if an error occurs during execution
Allow to specify directory when saving dumped problem formulation/instance
1.4.11. Bug Fixes in FORCESPRO 3.1.0¶
Fix in detection of selection matrix
Fix in CasADi for linux systems
Fixed bug with stacked parametric bounds
Updated accessing of Stage properties to work with obfuscation
fix issue with variable number of equality constraints in convex problems
Fixed issue in CasADi code generation
Fixed internal rounding heuristic in MINLP solver
1.4.12. Improvements in FORCESPRO 3.0.1¶
New
nlp.stack_parambounds
for stacking parametric bounds over stages with PDIP_NLP and SQP_NLPSupport for MicroAutoBox III
1.4.13. Bug Fixes in FORCESPRO 3.0.1¶
Bug fix in fraction to boundary rule
Bug fixes for specific compilation settings
Fixed download of casadi for macos
Fixed bug in model files declarations in casadi2forces with SQP_NLP
1.4.14. New features in FORCESPRO 3.0.0¶
Real-time sequential quadratic programming solver via code option
SQP_NLP
Support for MathWorks Symbolic Math Toolbox and CasADI 3.5.1 (with limitations)
Code option
nlp.compact_code
for generating small-size code on long horizon problemsSupport for license files
Option for dumping problem formulation and data for support
1.4.15. Improvements in FORCESPRO 3.0.0¶
Revamped licensing system
Removed object files from dowloaded solver package
1.4.16. Bug Fixes in FORCESPRO 3.0.0¶
Fixed bug with number of stages and integer guess in MINLP solver
1.4.17. New features in FORCESPRO 2.0.0¶
Introduced support for FORCESPRO QP solvers in the MATLAB MPC Toolbox from MathWorks
Created new examples for the MPC Toolbox plugin
1.4.18. Improvements in FORCESPRO 2.0.0¶
Made tolerances on equalities, inequalities, stationarity and complementarity run-time parameters in NLP solver
Automatic disabling of vectorization when some matrix parameters are sparse
1.4.19. Bug Fixes in FORCESPRO 2.0.0¶
Fixed linking issue with avx on linux host
Fixed mex interface to not copy empty parameters
Fixed bug with MINLP solver exitflag on infeasible problems
1.4.20. New features in FORCESPRO 1.9.1¶
Adapted FORCESPRO license check to portal database
Adapted floating license database checks to portal database
Made linear algebra vectorization stage dependent
1.4.21. Improvements in FORCESPRO 1.9.1¶
Fixed numerical bug in NLP line-search
1.4.22. New features in FORCESPRO 1.9.0¶
New code-generation options for AVX and NEON vectorization
New code generation options and parameters to provide an integer guess to the MINLP solver
New runtime parameter parallelStrategy for MINLP solver
Created dedicated Floating License web Server
1.4.23. Improvements in FORCESPRO 1.9.0¶
Changed floating license communication to http
Enabled user-defined outputs in MINLP solver
Added codeoption c90 to add extra C definitions in casadi model files
Added openmp flag to nvidia webcompiler
Added support for python3.6
Updated usysid files in client
1.4.24. Bug Fixes in FORCESPRO 1.9.0¶
Fixed bug with constraints handling in code-generation
Fixed memory bug in MINLP solver
Fixed bug in parameters indexing in client. Parameters are now indexed with a fixed number of digits depending on the horizon length. 1 digit below 10, 2 digits between 10 and 100 excluded,…
Fixed bug with stacked parameter ineq.p.b
1.4.25. New features in FORCESPRO 1.8.0¶
Mixed-integer nonlinear solver with parallelizable search and other customization features
Support for the Speedgoat platform
Support for the Integrity ARM platform
Support for Docker containers
Updated newParam API to allow for parameters stacked over stages
1.4.26. Improvements in FORCESPRO 1.8.0¶
Improved performance of compactSparse feature
Added custom headers to specify platforms
1.4.27. Bug Fixes in FORCESPRO 1.8.0¶
Fixed numerical bug in v1.7.0
1.4.28. New features in FORCESPRO 1.7.0¶
MISRA 2012 compliance, no mandatory or required violations in generated C code
Added support for dSPACE MicroAutoBox II
Added support for ARM Cortex A72 platforms
Added support for MinGW as a mex compiler
New codeoption compactSparse for smaller code and faster compilation of sparse problems
Adding threadSafeStorage option, enabling creation of thread-safe solvers (requires C11 compilers)
1.4.29. Improvements in FORCESPRO 1.7.0¶
Improved CodeGen speed for sparse problems
Improved web compilation to reduce http timeouts
Secure client-server communication under custom embotech domain
Improved portability of functions used
Added display of license and solver expiration as well as generation id on header files
Updated FORCEScleanup to include all solver related files
Improved messages and warnings returned from FORCESPRO client
Now passing iteration number to function evaluations
Added new error code for invalid parameter initial values
1.4.30. Bug Fixes in FORCESPRO 1.7.0¶
Changed default server when default server file is missing
Always check for default server files when choosing server to use
Corrected the logic for updating the best solution found so far (NLP)
Fixed sparse linear algebra routine names
1.5. Version history of manual¶
The version history of this document is presented in Version history of FORCESPRO manual.
Version |
Revision |
Date |
Reason for change |
---|---|---|---|
1 |
0 |
04/10/2017 |
Initial version |
2 |
0 |
09/27/2018 |
Overhaul of outdated manual |
2 |
1 |
11/19/2018 |
Add dSPACE code deployment |
3 |
0 |
02/20/2019 |
Updated manual for v1.7.0 |
4 |
0 |
06/04/2019 |
Updated manual for v1.8.0 |
4 |
1 |
08/29/2019 |
Updated manual for v1.9.0 |
5 |
0 |
10/10/2019 |
Updated manual for v1.9.1 |
6 |
0 |
12/09/2019 |
Updated manual for v2.0.0 |
7 |
0 |
04/07/2020 |
Updated manual for v3.0.0 |
7 |
1 |
05/26/2020 |
Updated manual for v3.0.1 |
7 |
2 |
07/13/2020 |
Updated manual for v3.1.0 |
8 |
0 |
09/21/2020 |
Updated manual for v4.0.0 |
8 |
1 |
10/30/2020 |
Updated manual for v4.1.0 |
8 |
2 |
12/7/2020 |
Updated manual for v4.1.1 |