Derfreemethods¶
- BDF(mapp, x0, options)[source]¶
BDF is a derivative-free algorithm for solving systems of nonlinear equations \(f(x) = 0\), x in \(R^m\) using the nonlinear unconstrained minimization \(\textrm{min}\ \psi(x) = 1/2 ||f(x)||^2\) s.t. x in \(R^m\).
- USAGE
[x_best, psi_best, out] = BDF (mapp, x0, options)
- INPUTS
mapp – function handle provides f(x) and gradient f(x)
x0 – initial point
options – structure including the parameteres of scheme
.MaxNumIter - maximum number of iterations
.MaxNumMapEval - maximum number of function evaluations
.TimeLimit - maximum running time
.epsilon - accuracy parameter
.x_opt - optimizer
.psi_opt - optimum
.alpha - constant with \(\alpha < 2 \sigma\)
.beta - reduction constant of the line search
.flag_x_error - 1: saves \(x_{error}\), 0: do not saves \(x_{error}\) (default)
.flag_psi_error - 1:saves \(\psi_{error}\), 0: do not saves \(\psi_{error}\) (default)
.flag_time - 1: saves \(\psi_{error}\), 0: do not saves \(\psi_{error}\) (default)
.Stopping_Crit - stopping criterion:
stop if \(||nfxk|| \leq \epsilon\)
stop if MaxNumIter is reached
stop if MaxNumMapEval is reached
stop if TimeLimit is reached
stop if (default) \(||hxk|| \leq \epsilon\) or MaxNumIter is reached
- OUTPUTS
x_best – the best approximation of the optimizer
psi_best – the best approximation of the optimum
out – structure including more output information
.T - running time
.Niter - total number of iterations
.Nmap - total number of mapping evaluations
.merit_func - array including all merit function values
.x_error - relative error \(norm(x_k(:)-x_{opt}(:))/norm(x_{opt})\)
.psi_error - relative error \((\psi_k-\psi_{opt})/(\psi_0-\psi_{opt}))\)
.Status - reason of termination
- CSDF(mapp, x0, options)[source]¶
CSDF is a derivative-free algorithm for solving systems of nonlinear equations \(f(x) = 0\), x in \(R^m\) using the nonlinear unconstrained minimization \(\textrm{min}\ \psi(x) = 1/2 ||f(x)||^2\) s.t. x in \(R^m\).
- USAGE
[x_best, psi_best, out] = CSDF (mapp, x0, options)
- INPUTS
mapp – function handle provides f(x) and gradient f(x)
x0 – initial point
options – structure including the parameteres of scheme
.MaxNumIter - maximum number of iterations
.MaxNumMapEval - maximum number of function evaluations
.TimeLimit - maximum running time
.epsilon - accuracy parameter
.x_opt - optimizer
.psi_opt - optimum
.sigma - strong duplomonotone parameter
.l - Lipschitz continuity constant of f
.tauBar - a constant for determining the step-size
.flag_x_error - 1: saves \(x_{error}\), 0: do not saves \(x_{error}\) (default)
.flag_psi_error - 1:saves \(\psi_{error}\), 0: do not saves \(\psi_{error}\) (default)
.flag_time - 1: saves \(\psi_{error}\), 0: do not saves \(\psi_{error}\) (default)
.Stopping_Crit - stopping criterion:
stop if \(||nfxk|| \leq \epsilon\)
stop if MaxNumIter is reached
stop if MaxNumMapEval is reached
stop if TimeLimit is reached
stop if (default) \(||hxk|| \leq \epsilon\) or MaxNumIter is reached
- OUTPUTS
x_best – the best approximation of the optimizer
psi_best – the best approximation of the optimum
out – structure including more output information
.T - running time
.Niter - total number of iterations
.Nmap - total number of mapping evaluations
.merit_func - array including all merit function values
.x_error - relative error \(norm(x_k(:)-x_{opt}(:))/norm(x_{opt})\)
.psi_error - relative error \((\psi_k-\psi_{opt})/(\psi_0-\psi_{opt}))\)
.Status - reason of termination
- DBDF(mapp, x0, options)[source]¶
DBDF is a derivative-free algorithm for solving systems of nonlinear equations \(f(x) = 0\), x in \(R^m\) using the nonlinear unconstrained minimization \(\textrm{min}\ \psi(x) = 1/2 ||f(x)||^2\) s.t. x in \(R^m\).
- USAGE
[x_best, psi_best, out] = DBDF (mapp, x0, options)
- INPUTS
mapp – function handle provides f(x) and gradient f(x)
x0 – initial point
options – structure including the parameteres of scheme
.MaxNumIter - maximum number of iterations
.MaxNumMapEval - maximum number of function evaluations
.TimeLimit - maximum running time
.epsilon - accuracy parameter
.x_opt - optimizer
.psi_opt - optimum
.alpha - constant with \(\alpha < 2 \sigma\)
.beta - reduction constant of the line search
.lambda_min - lower bound of the step-size
.lambda_max - upper bound of the step-size
.flag_x_error - 1: saves \(x_{error}\), 0: do not saves \(x_{error}\) (default)
.flag_psi_error - 1:saves \(\psi_{error}\), 0: do not saves \(\psi_{error}\) (default)
.flag_time - 1: saves \(\psi_{error}\), 0: do not saves \(\psi_{error}\) (default)
.Stopping_Crit - stopping criterion:
stop if \(||nfxk|| \leq \epsilon\)
stop if MaxNumIter is reached
stop if MaxNumMapEval is reached
stop if TimeLimit is reached
stop if (default) \(||hxk|| \leq \epsilon\) or MaxNumIter is reached
- OUTPUTS
x_best – the best approximation of the optimizer
psi_best – the best approximation of the optimum
out – structure including more output information
.T - running time
.Niter - total number of iterations
.Nmap - total number of mapping evaluations
.merit_func - array including all merit function values
.x_error - relative error \(norm(x_k(:)-x_{opt}(:))/norm(x_{opt})\)
.psi_error - relative error \((\psi_k-\psi_{opt})/(\psi_0-\psi_{opt}))\)
.Status - reason of termination
- InitialDuplo(options)[source]¶
Function for initializing the parameters of DuploBacktrack, DuploConStep, and DuploDoubBacktrack. If some parameters specified by the user InitialDuplo uses these parameters. Otherwise, the default values will be used.
- USAGE
[MaxNumIter, MaxNumMapEval, TimeLimit, epsilon, alpha, beta, sigma, l, tauBar, lambda_min, lambda_max, flag_x_error, flag_psi_error, flag_time, Stopping_Crit] = InitialDuplo (options)
- INPUTS
options – structure including the parameteres of scheme
.MaxNumIter - maximum number of iterations
.MaxNumMapEval - maximum number of function evaluations
.TimeLimit - maximum running time
.epsilon - accuracy parameter
.x_opt - optimizer
.psi_opt - optimum
.alpha - constant with \(\alpha < 2 \sigma\)
.beta - reduction constant of the line search
.sigma - strong duplomonotone parameter
.l - Lipschitz continuity constant of f
.tauBar - a constant for determining the step-size
.lambda_min - lower bound of the step-size
.lambda_max - upper bound of the step-size
.flag_x_error - 1: saves \(x_{error}\), 0: do not saves \(x_{error}\) (default)
.flag_psi_error - 1: saves \(\psi_{error}\), 0: do not saves \(\psi_{error}\) (default)
.flag_time - 1: saves \(\psi_{error}\), 0: do not saves \(\psi_{error}\) (default)
.Stopping_Crit - stopping criterion
stop if \(||nfxk|| \leq \epsilon\)
stop if MaxNumIter is reached
stop if MaxNumMapEval is reached
stop if TimeLimit is reached
stop if (default) \(||hxk|| \leq \epsilon\) or MaxNumIter is reached
- OUTPUTS
MaxNumIter – maximum number of iterations
MaxNumMapEval – maximum number of function evaluations
TimeLimit – maximum running time
epsilon – accuracy parameter
x_opt – optimizer
psi_opt – optimum
alpha – a constant
beta – a constant
flag_x_error – 1: saves \(x_{error}\), 0: do not saves \(x_{error}\) (default)
flag_psi_error – 1: saves \(\psi_{error}\), 0: do not saves \(\psi_{error}\) (default)
flag_time – 1: saves \(\psi_{error}\), 0: do not saves \(\psi_{error}\) (default)
Stopping_Crit – stopping criterion
- Rate_function(opt, varargin)[source]¶
- USAGE
Rate_function (opt, varargin)
- INPUTS
xk – current point;
opt – structure includes required parameters;
.FR - concatenation of forward and reverse stoichiometric matrix
.A - Reduced forward stoichiometric matrix
.B - Reduced reverse stoichiometric matrix
.k - initial kinetic
- OUTPUT
fxk – the vector f(xk)
- StopCritDuplo(nfxk, Niter, Nmap, T, MaxNumIter, MaxNumMapEval, TimeLimit, epsilon, Stopping_Crit)[source]¶
Function checking that one of the stopping criteria holds to terminate LLM and GLM. It perepares the status determining why the algorithm is stopped.
- USAGE
[StopFlag, Status] = StopCritDuplo (nfxk,Niter, Nmap, T, MaxNumIter, MaxNumMapEval, TimeLimit, epsilon, Stopping_Crit)
- INPUTS
nhxk – the norm 2 of h(xk)
Niter – the number of iterations
Nmap – the number of mapping calls
T – the running time
MaxNumIter – maximum number of iterations
MaxNumMapEval – maximum number of function evaluations
TimeLimit – maximum running time
epsilon – accuracy parameter
Stopping_Crit – stopping criterion:
stop if \(||nfxk|| \leq \epsilon\)
stop if MaxNumIter is reached
stop if MaxNumMapEval is reached
stop if TimeLimit is reached
stop if (default) \(||hxk|| \leq \epsilon\) or MaxNumIter is reached
- OUTPUTS
StopFlag – 1: if one of the stopping criteria holds, 0: if none of the stopping criteria holds
Status – the reason of the scheme termination