Downhill Simplex for Delphi

Components for Delphi & Lazarus (Windows, Linux).

This project is maintained by dvmorozov

Please consider making donation. Thank you!

fitminimizers

Downhill simplex algorithm including variant with simulated annealing for Delphi & Lazarus (Windows, Linux).

This software is distributed under Mozilla Public License 2.0, which allows you to use these components in commercial software.

Free personal expense tracker.

TDownhillSimplexAlgorithm

Classical implementation of downhill simplex algorithm.

TDownhillSimplexSAAlgorithm

Downhill simplex algorithm with simulated annealing.

Demo applications

The algorithm is abstracted from any particular task. As an example of optimization task the “minimum bounding box” problem is used. The goal is to find 3D box of minimum volume completely enclosing given set of points. Many thanks to Ingo Wulf for contributing into development and providing test models.

See Minimum bounding box

Bounding volume

Initially model data containing set of points are loaded into the program. Rotation angles are used as parameters of optimization coordinate. Angles are varied until minimum volume of the box enclosing given points is found.

There are two variants of demo application having the same functionality. The first one uses interface to provide algorithm with data and compute goal function. It also demostrates an approach to parallel optimization of independent tasks.

Minimum Bounding Box Demo

The second example demonstrates using form component to run optimization, which can take significant time, in separate thread allowing interaction with application.

Component Demo

Class diagram

Class diagram

Find me on

LinkedIn or Facebook.

These components are used in following projects
MotifMASTER
Fit

Building

Component should be built separately for Lazarus 0.9.24 (from branch lazarus-0-9-24) and for latest version of Lazarus (from branch master).

Notes for Lazarus 0.9.24 build

If you see message like that C:\lazarus-0.9.24\fpc\2.2.0\bin\i386-win32\windres.exe: can’t open file ‘TForm1’: No such file or directory make sure that {$R *.dfm} are excluded by compiler condition.

hit counter