MaximeVH / EquivalentCircuits.jl

A julia package to either fit the parameters of a specified equivalent electrical circuit to electrochemical impedance data, or to suggest a plausible circuit configuration for a given set of measurements (either through a comparison of circuits from the literature, or through an evolutionary algorithm approach).
MIT License
22 stars 6 forks source link

Non-deterministic behavior #26

Closed klaff closed 3 months ago

klaff commented 1 year ago

Hi, I am trying out EquivalentCircuits. I created a circuit of configuration [R1,C2]-[R3,C4]-R5 and created dummy (ideal) impedance values.

If I pass those to parameteroptimisation with the circuit string, it generates correct values.

If I use circuit_evaluation and pass in terminals = "RC", it sometimes gets close [C1,R2]-[C3,R4] (and the dropping of the R5 is excusable due to it's relatively small value in the original model) but if I repeat the execution it might fail with Algorithm did not converge. In all cases I get a series of Initial position cannot be on the boundary of the box. Moving elements to the interior. Element indices affected: [4] prints (although with varying indices).

I can share dummy values and test script if they would be helpful.

Also, is there a preferred forum for questions other than creating issues here? Thanks!

MaximeVH commented 11 months ago

Hi, Are you using the newest version of the package? The superfluous warnings should be removed by now. Due to the circuit_evolution function being dependent on an evolutionary algorithm, it is not guaranteed to converge every time. However, within a few months, I will be releasing a new and improved version of the algorithm, using some new developments in evolutionary algorithms.