I am currently working on an optimization of chemical kinetic model.
Starting points for FindMinimum is defined as: $k_{10} = 2.45\cdot 10^{-1}$ and $k_{20} = 8.65\cdot 10^{-11}$.
The step monitor is used to show calculated values of $k_1$ and $k_2$ and a value of the objective function.
The goal function is:
Diff[k1diff_, k2diff_] :=
Sum[(TGexp[[i]] -
TG[k1diff, k2diff][texp[[i]]] /. ParEq)^2, {i,1, Length[texp], 1}];
Optimization:
FindMinimum[{Diff[k1opt, k2opt], k1opt >= 0, k2opt >= 0, {{k1opt,
k10}, {k2opt, k20}}, StepMonitor :> {Print[i, ": k1=", k1opt, " k2=",
k2opt," Error=",
Diff[k1opt, k2opt]], i++}, MaxIterations -> 200];
The problem is that on the 1st step, when $k_1$ and $k_2$ should be equal the starting points values, these values are $k_1=0.245$ and $k_2=0.001$. So the $k_2$ has probably a problem with precision. I have tried to solve this issue using WorkingPrecision option in FindMinimum, but nothing changed.
Could anyone help with the problem? I want that the $k_2$ value will be the same as the value of $k_{20}$ variable.