help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re[2]: status = jacobian evaluations are not improving the solution


From: Sergey Shcherbina
Subject: Re[2]: status = jacobian evaluations are not improving the solution
Date: Sun, 30 Jul 2023 19:57:46 +0300

Hi all!

We use some parameters: 

 double A01 = X01*X01 + Y01*Y01, B01 = -2.0*X01, C01 = +1.0, D01 = -2.0*Y01, 
E01 = +1.0, F01 = -1.0*T10*T10, G01 = +2.0*T10, H01 = -1.0 ; 
  double A02 = X02*X02 + Y02*Y02, B02 = -2.0*X02, C02 = +1.0, D02 = -2.0*Y02, 
E02 = +1.0, F02 = -1.0*T20*T20, G02 = +2.0*T20, H02 = -1.0 ; 
  double A03 = X03*X03 + Y03*Y03, B03 = -2.0*X03, C03 = +1.0, D03 = -2.0*Y03, 
E03 = +1.0, F03 = -1.0*T30*T30, G03 = +2.0*T30, H03 = -1.0 ; 
  double A04 = X04*X04 + Y04*Y04, B04 = -2.0*X04, C04 = +1.0, D04 = -2.0*Y04, 
E04 = +1.0, F04 = -1.0*T40*T40, G04 = +2.0*T40, H04 = -1.0 ; 

for this structure rparams p:

struct rparams p =   { A01, B01, C01, D01, E01, F01, G01, H01,
                       A02, B02, C02, D02, E02, F02, G02, H02,
                       A03, B03, C03, D03, E03, F03, G03, H03,
                       A04, B04, C04, D04, E04, F04, G04, H04
                     };
for solving the next system nonlinear equations: 

  const double x0 = gsl_vector_get (x, 0);
  const double x1 = gsl_vector_get (x, 1);
  const double x2 = gsl_vector_get (x, 2);
  const double x3 = gsl_vector_get (x, 3);

  const double y0 = a1 + b1*x0 + c1*x0*x0 + d1*x1 + e1*x1*x1 + f1*x2*x2 + 
g1*x2*x2*x3 + h1*x2*x2*x3*x3 ;
  const double y1 = a2 + b2*x0 + c2*x0*x0 + d2*x1 + e2*x1*x1 + f2*x2*x2 + 
g2*x2*x2*x3 + h2*x2*x2*x3*x3 ;
  const double y2 = a3 + b3*x0 + c3*x0*x0 + d3*x1 + e3*x1*x1 + f3*x2*x2 + 
g3*x2*x2*x3 + h3*x2*x2*x3*x3 ;
  const double y3 = a4 + b4*x0 + c4*x0*x0 + d4*x1 + e4*x1*x1 + f4*x2*x2 + 
g4*x2*x2*x3 + h4*x2*x2*x3*x3 ;

on base the using of the next approaches:

gsl_multiroot_function f = {&rosenbrock_f, n, &p};

  double x_init[4] = { 0.08, 9.0, 163.32, 581.001 };

  gsl_vector *x = gsl_vector_alloc (n);

  gsl_vector_set (x, 0, x_init[0]);
  gsl_vector_set (x, 1, x_init[1]);
  gsl_vector_set (x, 2, x_init[2]);
  gsl_vector_set (x, 3, x_init[3]);

  T = gsl_multiroot_fsolver_hybrids;
  s = gsl_multiroot_fsolver_alloc (T, 4);

  gsl_multiroot_fsolver_set (s, &f, x);

and we receive next negative message all time:
.....
iter =  57 x =  482.684  2845.699  175.618  1.258   f(x) =  1.418e+03 
-9.620e+02  7.932e+02 -1.249e+03 
iter =  58 x =  482.684  2845.699  175.618  1.258   f(x) =  1.418e+03 
-9.620e+02  7.932e+02 -1.249e+03 
iter =  59 x =  482.681  2845.135  175.652  1.264   f(x) =  1.416e+03 
-9.640e+02  7.912e+02 -1.251e+03 
iter =  59 x =  482.681  2845.135  175.652  1.264   f(x) =  1.416e+03 
-9.640e+02  7.912e+02 -1.251e+03 
status = jacobian evaluations are not improving the solution

Where to search our mistakes or should be used other methods for solving this 
system nonlinear equations ?
Or these initail parameters should be others - double x_init[4] = { 0.08, 9.0, 
163.32, 581.001 };?
If yes, how to build it optimally?

Regards,
Serhii.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]