donlp2 {fPortfolio}R Documentation

Solve constrained nonlinear minimization problem

Description

Solve constrained nonlinear minimization problem.

Usage

rdonlp2(par, fn,
    par.upper=rep(+Inf, length(par)), par.lower=rep(-Inf, length(par)),
    A = NULL, 
    lin.upper = rep(+Inf, length(par)), lin.lower = rep(-Inf, length(par)),
    nlin = list(), 
    nlin.upper = rep(+Inf, length(nlin)), nlin.lower = rep(-Inf, length(nlin)),
    control = rdonlp2Control(), control.fun = function(lst){return(TRUE)},
    env = .GlobalEnv, name = NULL)

Arguments

fn the objective function to be minimized. Currently, fn must take only one argument, and the parameter vector(par) will be passed to fn during the optimization. The first element of return value must be the evaluated value.
par parameter vector(vector object).
par.upper, par.lower upper and lower bounds for parameter vector, respectively. Their length must equal to length(par). If some elements are unbounded, specify +Inf or -Inf explicitly.
A the matrix object that represents linear constraints. Its columns must be equal to length(par), and its rows must be equal to the number of linear constraints.
lin.upper, lin.lower upper and lower bounds for linear constraints, respectively. Their length must equal to the number of linear constraints. If some elements are unbounded, specify +Inf or -Inf explicitly.
nlin list object whose elements are functions that represents nonlinear constraints. Rule for argument and return value is the same as fn, i.e., these functions take only one arugument(par), and return a vector object whose first element is the evaluated value.
nlin.upper, nlin.lower upper and lower bounds for nonlinear constraints, respectively. Their length must equal to length(nlin). If some elements are unbounded, specify +Inf or -Inf explicitly.
control "control parameters" that defines the behavior of Rdonlp2. See rdonlp2Control for details.
control.fun rdonlp2() reports a group of optimization parameters in every iteration(see below for details). This (read-only) information can be available within control.fun(), in which user can decide whether the optimization should be iterrupted. Set its return value to FALSE to interrupt rdonlp2().
env the environment in which objective, constraint, control functions are evaluated.
name an character object that specify file name(without extension, max 40 characters) of output file. If not NULL, DONLP2 creates 2 files(name.pro and name.mes) in current working directory which contain detailed information during the optimization. The amount of information depends te0,te1,te2,te3 specified in rdonlp2Control.

Value

For n=length(par) parameters, lin linear constraints, and nlin nonlinear constraints, a list with following elements:

par parameters returned by DONLP2.
gradf gradient evaluated at par.
u 2*(n+lin+nlin) vector of lagrange multipliers for constraints.
w 2*(n+lin+nlin) vector of penalty term.
step.nr total number of iterations.
fx the value of objective function fn.
sci scaling of fn.
psi psi the weighted penalty term.
upsi the unweighted penalty term(L1 norm of constraint vector).
del.k.1 bound for the last active constraints.
b2n0 weighted L2 norm of projected gradients.
b2n L2norm of gradients based on del.k.1.
nr number of binding constraints.
sing value other than texttt{-1} indicates working set is singular.
umin infinity norm of negative part of inequalities multipliers.
not.used always 0(currently not used).
cond.r condition number of diagonal part of qr decomposition of normalized gradients of binding constraints.
cond.h condition number of diagonal of cholesky factor of updated full Hessian.
scf0 the relative damping of tangential component if upsi > tau0/2.
xnorm L2 norm of par.
dnorm unsclaed norm of d, correction from eqp/qp subproblem.
phase -1:infeasibility improvement phase, 0: initial optimization, 1:binding constraints unchanged, 2:d small, maratos correction is in use.
c.k number of decreases of penalty weights.
wmax infinity norm of weights.
sig.k stepsize from uidimensional minimization(backgracking).
cfincr number of objective function evaluations for stepsize algorithm
dirder scaled derectional derivative of penalty function along d.
dscal scaling factor for d.
cosphi cosine of arc between d and previous d.
violis number of constraints not binding at current values of par but hit during line search.
hesstype one of 4 values indicating type of update for Hessian. 1: normal P&M-BFGS update, 0: update suppressed, -1: restart with scaled unit matrix, 2: standard BFGS, 3: BFGS modified by Powell's Device.
modbifgs modification factor for damping the projector into the BFGS or pantoja-mayne update.
modnr modification factor for daming the quasi-newton-relation in BFGS.
qpterm 0:if sing==-1, termination indicator of the QP solver, 1:successful, -1:\tau becomes larger than tauqp without slack variables becoming sufficiently small.
tauqp weight of slack variables in QP solver.
infeas L1 norm of slack variables in QP solver.
nr.update the approximated newton-raphson update in upper trianglar form.
hessian numeric Hessian matrix if hessian=TRUE in rdonlp2Control.
runtime the elapsed time for the optimization.
message the termination message.

Note

IMPORTANT: Due to license reasons the R package Rdonlp2 is not part of the Rmetrics distribution. You can download and install the package from
https://svn.r-project.org/Rmetrics/trunk/Rdonlp2/

Author(s)

Rdonlp2(R port) is copyrighted by Ryuichi Tamura. Original DONLP2 is copyrighted software written by Peter Sperucci.

References

http://plato.la.asu.edu/donlp2.html(original DONLP2), http://arumat.net/Rdonlp2/(Rdonlp2)

See Also

rdonlp2Control


[Package fPortfolio version 260.72 Index]