A direct collocation method for the numerical solution of optimal control problems


The algorithm DIRCOL consists of a set of Fortran subroutines designed to solve optimal control problems of systems described by (first order) ordinary differential equations subject to general inequality or equality constraints on the control and/or state variables. Discontinuities in the right hand side of the differential equations can be treated as well as multi-phase problems. The user must provide subroutines that define the objective and the constraint functions. Subroutines for derivatives of the problem functions are not required.

DIRCOL is a direct collocation method: By a discretization of state and control variables the infinite dimensional optimal control problem is transcribed into a sequence of (finite dimensional) nonlinearly constrained optimization problems (NLPs). Optimal Control Theory and adjoint differential equations are not required in order to apply the algorithm. The NLPs are solved either by the dense Sequential Quadratic Programming (SQP) method NPSOL due to Gill, Murray, Saunders, and Wright or by the sparse SQP method SNOPT (Version 5.3-4 or higher) due to Gill, Murray and Saunders. SNOPT will perform much more efficiently than NPSOL.

Please note that we do neither distribute NPSOL nor SNOPT.

DIRCOL also computes reliable estimates of the adjoint variables, the multiplier functions of state constraints and the switching structure. Therefore the method can conveniently be combined with an indirect method such as multiple shooting.

Supplementary programs are provided for supporting a visualization of the numerical results.


Up to now, DIRCOL has mainly been installed on Unix systems (e.g., SunOS, IRIX, Linux etc.). First installations under Win95/98 and WinNT are under investigation. We have made very good experiences with installing Linux on a Windows PC. DIRCOL Version 1.2 (and higher) compiles and runs fine, e.g., with S.u.S.E. Linux 4.2/kernel 2.0.18 or 5.2/kernel 2.0.33 or higher and the GNU f77 and C compilers.

However, a first successful installation on WinNT has been reported: The source codes of DIRCOL and NPSOL have been compiled all together using the EGCS-1.1.2 compiler without any major problems and now execute sucessfully.

Announcement (November 1999):

DIRCOL Version 2.1 is now available. New features include

  • significantly improved computational speed,
  • improved robustness,
  • improved graphics output with Gnuplot, and
  • new, additional options and features, e.g., automatic refinement of the discretization grid.

Algorithmic extensions include improved internal approximation of gradients, a full utilization of the sparse structure of the Jacobians and a new interface to SNOPT (Versions 5.3-4 and 5.3-5).

In first benchmark computations, the speed-up factor was significantly greater than ten and even more than one hundred in some cases. The speed-up increases with the number of grid points.

Further information on


Until today, DIRCOL has been licensed more than 60 institutions from research and industry in the following 21 countries worldwide:

  • Africa: South Africa
  • Americas: Brazil, Mexico, USA
  • Asia: Japan, Singapore, South Korea
  • Europe: Austria, Croatia, England, Finland, France, Germany, Hungary, Italy, Poland, Portugal, Spain, Sweden, Switzerland
  • Oceania: Australia

Licensing policy

The software DIRCOL is not in the public domain. However, it is available for license, without fee, for education and non-profit research purposes. Please contact the author at the address given below.

Any entity desiring permission to incorporate this software or a work based on the software into commercial products or otherwise use it for commercial purposes should also contact:


Prof. Dr. Oskar von Stryk
Fachgebiet Simulation, Systemoptimierung und Robotik
(Simulation, Systems Optimization and Robotics Group)
Fachbereich Informatik (Department of Computer Science)
Technische Universität Darmstadt
D-64283 Darmstadt, Germany
E-Mail (preferred): stryk(at)sim.tu-darmstadt.de
Phone: +49 6151-16-25560
Fax: +49 6151-16-25569
URL: http://www.sim.informatik.tu-darmstadt.de/res/sw/dircol/ 

A A A | Print Drucken | Legal note Impressum | Contact Kontakt | Datenschutz
zum Seitenanfang