Main content

MPL License Agreement

All source code available for download from this website is subject to the terms of the Mozilla Public License, v. 2.0. The full MPL can be found at The most important grants and limitations are summarised below.

  • The code can be freely used, altered and redistributed (§2.1.a). All distribution of the source code, including any modifications, must be under the terms of the MPL (§3.1).
  • If used in a licensed software, you must ensure access to or provide all source-code files covered by the MPL, even if the software is offered as an executable (§3.2) or combined with other code under a proprietary license.
  • Code under the MPL may be combined with files under any license in a "larger work", so long as the above conditions are still met for all components under the MPL (§3.3).
  • You may not remove or alter the substance of any license notices contained within the source-code files (§3.4).
  • No warranty of any kind is provided, especially not for the absence of defects in the code. The entire risk of using the code is with you. (§6)
  • No liability is assumed for any direct, indirect or even incidental damages of any character, including commercial losses, work stoppage or computer failure (§7).
Accordion. Press Tab to navigate to entries, then Enter to open or collapse content.


DPM Function

Here you can find the latest version of the dpm-function and some examples. Please cite [1] when using the DPM function:

User FAQ

User FAQ: (PDF, 739 KB) If you encounter any problems using the dpm function, please consult the User-FAQ document before contacting IDSC.

dpm-function version 1.1.2 (ZIP, 727 KB) (right-click and save as)

Examples (included in .zip file)

The dpm function comes with three simple examples to facilitate the first application by new users.

The fishery and the hybrid electric vehicle example are discussed in both [1] and [2].

A further academic example with two state variables is discussed in [3].


[1] Sundstrom, O.; Guzzella, L., "A generic dynamic programming Matlab function," Control Applications, (CCA) & Intelligent Control, (ISIC), 2009 IEEE , vol., no., pp.1625,1630, 8-10 July 2009

[2] Sundström, O;, Ambühl, D.; Guzzella, L., "On Implementation of Dynamic Programming for Optimal Control Problems with Final State Constraints", Oil Gas Sci. Technol. – Rev. IFP 65 (1) 91-102, 2010

[3] Elbert, P.; Ebbesen, S.; Guzzella, L., "Implementation of Dynamic Programming for -Dimensional Optimal Control Problems With Final State Constraints," Control Systems Technology, IEEE Transactions on , vol.21, no.3, pp.924,931, May 2013


The DPM-Function source code is subject to the terms of the Mozilla Public License, v. 2.0. If You do not have a copy of the MPL, You can obtain one at


A generic particle swarm optimization function for Matlab

Here you can find the latest version of our particle swarm optimization function for Matlab. Detailed documentation of the PSO function is found in the following publication

[1] Ebbesen, S., Kiwitz, P. and Guzzella, L. "A Generic Particle Swarm Optimization Matlab Function", 2012 American Control Conference, Proceedings of the, June 27-29, Montreal, Canada, pp. 1514-1524

PSO function for Matlab version 0.6.0 (ZIP, 33 KB) (right-click and save as)

This download includes the PSO function pso.m, two examples, and additional helper functions such as the plotting function psoplotbestf.m. The first example is the Ackley problem which is a common academic test problem. The second example, is a simplified problem of optimizing the gear ratios in a hybrid electric drivetrain.

Contact information

Contact if you have any questions related to the pso-function.

Note: The PSO function requires the Matlab Optimization Toolbox. Furthermore, the current version has been tested on Matlab R2012b. You may (or may not) experience problems if you are using an older version of Matlab. In case of problems, please contact us so we can identify the problem and take appropriate action. Your feedback is appreciated!


Please be so kind to cite our PSO function [1] if you use it in your published research.

PSO applied to the Ackley problem  
PSO applied to the Ackley problem


The QSS-toolbox 2.0.1 is available for download here:
Toolbox (ZIP, 2.7 MB)


The QSS Toolbox is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at

Subroutine Generator

Subroutine generator for one-dimensional catalytic reactors

SubGen is a code-generator based software which automatically generates FORTRAN subroutines describing a tubular catalytic reactor from simply structured xml-input files
The input files specify the reacting species together with their thermodynamic properties and the complete reaction network.

The generated FORTRAN subroutines can then be linked to the adaptive PDE solver BACOL which shows a high computational performance and has been extended with a MATLAB interface for convienient usage.

Details of the software are presented in

T. R. Boehme, C. H. Onder, L. Guzzella, "Code-generator based software package for defining and solving one-dimensional, dynamic, catalytic reactor models", Computers & Chemical Engineering, submitted for publication

If your are interested in using the code, please contact me by e-mail.

For details, contact

Sharing Prior Knowledge

Data set containing the data from the experiments about sharing articulation models: (ZIP, 11.1 MB)


Catalyst Model Generator (camgen)

Here you can find the latest version of our catalyst model generator (camgen).

camgen version 0.9: (9, 399 KB) (9, 399 KB) (right-click and save as)

This download includes all the source files and the example of a TWC model. Instructions are given in a README.

Contact information

Contact if you have any questions related to camgen.

Note: the current version has been tested on Matlab 7.14 (R2012a). When compiling the mex-file make sure to include the libraries of your current Matlab installation.


Please be so kind to cite camgen if you use it in your published research.

IPOPT Installation and Matlab Interface

IPOPT implements an interior-point line-search algorithm for solving large-scale nonlinear programming problems (NLPs). It is released as open-source code under the Eclipse Public License (EPL).
Related Publication

Compilation of the program under Windows operating systems has been found to be a challenging task, especially on 64bit architectures. The following documentations provide a step-by-step guide for the installation of IPOPT and describe its MATLAB interface.

Installation Guide (PDF, 640 KB)
MATLAB Interface (PDF, 119 KB)

Page URL:
Sun Feb 19 21:36:32 CET 2017
© 2017 Eidgenössische Technische Hochschule Zürich