Code Generation - MapleSim Features - System-Level Modeling and Simulation
Why MapleSim?  |  Features  |  Academic  |  Demos & Videos  |  Model Gallery  |  Resources  |  Toolboxes  |  Services
Optimized Code Generation

Optimized code generation produces high-performance, royalty-free code suitable even for repeated optimization runs and complex real-time simulations, including hardware-in-the-loop (HIL) applications. With MapleSim, you do not have to choose between model fidelity and real-time performance.

  • The symbolic techniques that lie at the heart of MapleSim generate efficient system equations, without loss of fidelity, eliminating the need to simplify the model manually to reduce its computational complexity.
  • Equation simplification steps include index reduction for DAEs, eliminating algebraic loops, and algebraically manipulating the system to produce a smaller, computationally simpler set of equivalent equations.
  • MapleSim code generation tools convert these simplified equations to source code while applying symbolic optimization steps that dramatically speed up execution times. The optimizing tools extract common subexpressions and replace them with a single variable whose value is computed in advance. By removing expensive calculations from inside iteration loops, MapleSim can decrease the number of calculations for a single common subexpression from thousands to one in a typical application.
  • Automatic code generation is available for all models, including those that contain custom components, eliminating the need for error-prone hand-coding.
  • Available code generation targets, using MapleSim or MapleSim with a connectivity add-on, include:
  • The resulting code can be seamlessly incorporated into popular real-time toolchains and other applications, royalty-free.

Learn more about optimized code generation in MapleSim