BDCAmethods¶

BDCA(mapp, x0, options)[source]

BDCA 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] = BDCA(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 for the line searche
• .beta - backtarcking constant
• .lambda_bar - starting step-size for the line search
• .rho - strong convexity parameter
• .kin - kinetic parameter in R^(2n)
• .flag_line_search - “Armijo” or “Quadratic_interpolation”
• .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:
1. stop if $$||nfxk|| \leq \epsilon$$
2. stop if MaxNumIter is reached
3. stop if MaxNumMapEval is reached
4. stop if TimeLimit is reached
5. 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 $$\textrm{norm}(x_k(:)-x_{opt}(:))/\textrm{norm}(x_{opt})$$
• .psi_error - relative error $$(\psi_k-\psi_{opt})/(\psi_0-\psi_{opt}))$$
• .Status - reason of termination
DCA(mapp, x0, options)[source]

DCA is a derivative-free algorithm for solving systems of nonlinear equations $$f(x) = 0$$, x in $$R^m$$ using the nonlinear unconstrained minimization $$min psi(x) = 1/2 ||f(x)||^2$$ s.t. x in $$R^m$$.

Usage

[x_best,psi_best,out] = DCA(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 for the line searche
• .beta - backtarcking constant
• .lambda_bar - starting step-size for the line search
• .rho - strong convexity parameter
• .kin - kinetic parameter in $$R^{2n}$$
• .flag_line_search - “Armijo” or “Quadratic_interpolation”
• .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:
1. stop if $$||nfxk|| \leq \epsilon$$
2. stop if MaxNumIter is reached
3. stop if MaxNumMapEval is reached
4. stop if TimeLimit is reached
5. 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 $$\textrm{norm}(x_k(:)-x_{opt}(:))/\textrm{norm}(x_{opt})$$
• .psi_error - relative error $$(\psi_k-\psi_{opt})/(\psi_0-\psi_{opt}))$$
• .Status - reason of termination
FuncGradHessSub(x, y, F, R, kin, rho)[source]

SubGradHess provides the function value, the gradient, and the Hessian of the subproblem of DCA and BDCA to be used in fminunc.

Usage

Inputs

• x,y – points
• F – Forward stoichiometric matrix
• kin – kinetics parameter in $$R^{2n}$$
• rho – strongly comvex modulus

Outputs

• f – function value
• H – Hessian
InitialBDCA(options)[source]

InitialBDCA is a function for initializing the parameters of BDCA and DCA. If some parameters specified by the user InitialDuplo uses these parameters. Otherwise, the default values will be used.

Input

• 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 for the line searche
• .beta - backtarcking constant
• .lambda_bar - starting step-size for the line search
• .rho - strong convexity parameter
• .kin - kinetic parameter in $$R^{2n}$$
• .flag_line_search - “Armijo” or “Quadratic_interpolation”
• .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:
1. stop if $$||nfxk|| \leq \epsilon$$
2. stop if MaxNumIter is reached
3. stop if MaxNumMapEval is reached
4. stop if TimeLimit is reached
5. 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 – constant for the line search
• beta – backtracking constant
• lambda_bar – starting step-size for 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
Rate_function(opt, varargin)[source]

Usage

fxk = 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
StopCritBDCA(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 perepare the status determining why the algorithm is stopped.

Usage

[StopFlag, Status] = StopCritBDCA(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:
1. stop if $$||nfxk|| \leq \epsilon$$
2. stop if MaxNumIter is reached
3. stop if MaxNumMapEval is reached
4. stop if TimeLimit is reached
5. 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