Scientific programming with Delphi/Kylix

Up Scientific Programming

DE Electrochemical Fit project

The Differential Evolution algorithm is applied to the fitting of the electrochemical data (see Electrochemical Fit).

Subject covered:


The initial Nernst equation is (see Electrochemical Fit)

It is better to rewrite Eq. (1) in terms of logarithms because of the wide range of concentration and parameters:




The objective function (the function to be minimized) is the weighted sum of the squares of deviations:


Here En is the experimental potential and wn is the weight at the point n (n = 1, . . . , N ). The wn is a measure of accuracy and is usually chosen as

 where the noise variance. 

Visual Design


First drop the MainMenu component on the form and create "File", "Plot" and "Help" menu items with ("New", "Open", "Open, Set W=1", "Save"), ("Copy", "L/Lg L") and ("Help", "About") sub-items respectively. Refer to the Delphi help for details.

Then drop the PageControl and by right-clicking on it create two Pages: "Data" and "Fit" 

Data page 

(in preparation, see the code)

Fit page

(in preparation, see the code)


(in preparation, see the code)


(in preparation, see the code)


(in preparation, see the code)


(in preparation, see the code)


The project code for Delphi 7 (including bitmaps and sample files) can be downloaded here


Kylix-specific notes

(in preparation)

Lazarus-specific notes

(in preparation)

Other projects

Up Scientific Programming

Home | Resumé | |  Computing |  Links |  Publications

©Nikolai V. Shokhirev, 2004-2005