Problems with FindMinimum

• To: mathgroup at smc.vnet.net
• Subject: [mg117715] Problems with FindMinimum
• From: "philipp.giese at googlemail.com" <philipp.giese at googlemail.com>
• Date: Wed, 30 Mar 2011 04:12:31 -0500 (EST)

```Help!

To evaluate my data, I fit them to chemical equations. That worked
quite (at the very least up until December) but now I run constantly
into this error:

FindMinimum::eit: The algorithm does not converge to the tolerance of
4.806217383937354`*^-6 in 500 iterations. The best estimated solution,
with feasibility residual, KKT residual or complementary residual of
{7.41706*10^-9,0.0685413,1.22711*10^-9}, is returned. >>

Moreover the Fit does not recognize the constraints I am setting up.
For clarity I include some sources:

bfext[ka1t_,ka2t_,kb1t_,kb2t_,kb3t_,kc1t_,kc2t_,kc2min_,ke1t_,ke2t_,V0t_,Om01t_,Om02t_,N2O01t_,N2O02t_,N2O03t_] :=
FindMinimum[{sseext[ka1, ka2, kb1, kb2, kb3, kc1, kc2, ke1, ke2, V0,
Om01, Om02, N2O01, N2O02, N2O03], 0.04 <= ka1<=0.6, 0.01 <=
ka2<=0.03,
0.00 <= kb1<=0.01, 0.02 <= kb2, 0<=kb3, 0 <= kc1, kc2min <= kc2, 0
<= ke1, 0 <= ke2,
0.01 <= V0<=0.25, 0 <= Om01, 0 <= Om02, 0 <= N2O01 <=
First[N2Oexp],
0 <= N2O02 <= First[N2Oexp], 0 <= N2O03 <= First[N2Oexp]}, {{ka1,
ka1t}, {ka2, ka2t}, {kb1, kb1t}, {kb2, kb2t}, {kb3, kb3t}, {kc1,
kc1t}, {kc2, kc2t}, {ke1, ke1t}, {ke2, ke2t}, {V0,
V0t}, {Om01, Om01t}, {Om02, Om02t}, {N2O01, N2O01t}, {N2O02,
N2O02t}, {N2O03, N2O03t}}]

bfext is simply the Fitfunction with some constraints and some values,
so nothing special (albeit the number of parameters is immense). This
function uses the procedure ssext which is sth like a combined least
square fit for three parameter sets:

sseext[ka1_?NumberQ, ka2_?NumberQ, kb1_?NumberQ, kb2_?NumberQ,
kb3_?NumberQ, kc1_?NumberQ, kc2_?NumberQ, ke1_?NumberQ,
ke2_?NumberQ, V0_?NumberQ, Om01_?NumberQ, Om02_?NumberQ,
N2O01_?NumberQ, N2O02_?NumberQ, N2O03_?NumberQ] :=
Block[{sol, N2, N2O, Om, N22, N2O2, Om2, N2O3},
sol = dglext[ka1, ka2, kb1, kb2, kb3, kc1, kc2, ke1, ke2, V0, Om01,
Om02, N2O01, N2O02, N2O03][[1]];
((100*Apply[
Plus, (Oexp - ((Om[t] /. sol /.
t -> texp) + ((Om2[t] /. sol /.
t -> texp))))^2/((Om[t] /. sol /.
t -> texp) + ((Om2[t] /. sol /. t -> texp)))] +
100*Apply[
Plus, (N2exp - ((N2[t] /. sol /.
t -> texp) + ((N22[t] /. sol /.
t -> texp))))^2/((N2[t] /. sol /.
t -> texp) + ((N22[t] /. sol /. t -> texp)))] +
Apply[Plus, (N2Oexp - ((N2O[t] /. sol /.
t -> texp) + ((N2O2[t] /. sol /.
t -> texp) + (N2O3[t] /. sol /.
t -> texp))))^2/((N2O[t] /. sol /.
t -> texp) + ((N2O2[t] /. sol /.
t -> texp) + (N2O3[t] /. sol /. t -> texp)))])^2/
4)^0.5]

dglext is then a system of differential equations which is solved
numerically. That this works is proven by the fact that I can use the
diff eq. to plot data etc. the ssefunctio gives also nice values,
however what I cannot understand is why the fitfunction is not working
anymore. For clarity: I had already some nice results but now I cannot
reproduce them any longer. Where did I include an error?

```

• Prev by Date: Re: Grid frame do not show when exporting to HTML
• Next by Date: Re: Importing into Mathematica from URL (PubMed)
• Previous by thread: InheritScope in CDF player
• Next by thread: NDSolve and Plot