Mise à jour terminée. Pour connaître les apports de la version 13.8.4 par rapport à notre ancienne version vous pouvez lire les "Release Notes" suivantes :
https://about.gitlab.com/releases/2021/02/11/security-release-gitlab-13-8-4-released/
https://about.gitlab.com/releases/2021/02/05/gitlab-13-8-3-released/

Commit 008a06a4 authored by Laurent Belcour's avatar Laurent Belcour

Better working non-linear solver.

parent cb99c1eb
......@@ -111,7 +111,7 @@ class altaNLP : public Ipopt::TNLP
vec _y = _di - (*_f)(_x);
for(int i=0; i<_f->dimY(); ++i)
{
obj_value += abs(_y[i]);
obj_value += pow(_y[i], 2);
}
}
......@@ -143,7 +143,7 @@ class altaNLP : public Ipopt::TNLP
// Compute the difference vector and add its
// components to the obj_value
vec _y = _di - (*_f)(_x);
vec _y = (*_f)(_x) - _di;
// Get the jacobian of the function at position x_i for the current
// set of parameters (set prior to function call)
......@@ -156,14 +156,7 @@ class altaNLP : public Ipopt::TNLP
// vector row
for(int i=0; i<_f->dimY(); ++i)
{
if(_y[i] > 0.0)
{
grad_f[j] += -_jac[i*_f->nbParameters() + j];
}
else
{
grad_f[j] += _jac[i*_f->nbParameters() + j];
}
grad_f[j] += 2 * _y[i] * _jac[i*_f->nbParameters() + j];
}
}
}
......
......@@ -59,14 +59,14 @@ void df(double* fjac, const nonlinear_function* f, const data* d)
// Should add the resulting vector completely
vec _y = (*f)(xi) - _di;
// For each output channel, update the subpart of the
// vector row
for(int i=0; i<f->dimY(); ++i)
// Fill the columns of the matrix
for(int j=0; j<f->nbParameters(); ++j)
{
// Fill the columns of the matrix
for(int j=0; j<f->nbParameters(); ++j)
// For each output channel, update the subpart of the
// vector row
for(int i=0; i<f->dimY(); ++i)
{
fjac[j] = 2 * _y[i] * _jac[i*f->nbParameters() + j];
fjac[j] += 2 * _y[i] * _jac[i*f->nbParameters() + j];
}
}
}
......@@ -176,6 +176,14 @@ bool nonlinear_fitter_nlopt::fit_data(const data* d, function* fit, const argume
{
algorithm = NLOPT_LN_SBPLX;
}
else if(optimizerName == "controlled-random-search")
{
algorithm = NLOPT_GN_CRS2_LM;
}
else if(optimizerName == "SQP")
{
algorithm = NLOPT_LD_SLSQP;
}
else
{
// The default option one can find in the NLOpt documentation
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment