Exemplo n.º 1
0
                   rosen_der,
                   x0=theta,
                   lb=lb, ub=ub,
                   G=None, h=None,
                   A=A, b=b,
                   method='trust',
                   disp=3, full_output=True)


## interior point interface

xhat, output = ip(rosen,
                  rosen_der,
                  x0=theta,
                  lb=None, ub=None,
                  G=None, h=None,
                  A=None, b=None,
                  maxiter=50,
                  method='pdc',
                  disp=5, full_output=True)


xhat, output = ip(rosen,
                  rosen_der,
                  x0=theta,
                  lb=lb, ub=ub,
                  G=None, h=None,
                  A=None, b=None,
                  maxiter=500,
                  method='pdc',
                  disp=5, full_output=True)
Exemplo n.º 2
0

from pygotools.convex import sqp, ip

boxBoundsArray = numpy.array(boxBounds)
lb = numpy.array([0.0,0.0,0.0])
ub = numpy.array([5.0,5.0,5.0])

xhat,qpOut = sqp(objFH.cost, objFH.gradient, hessian=objFH.jtj, x0=[0.5,0.5,0.5], lb=lb, ub=ub,disp=3,full_output=True)

xhat,qpOut = sqp(objFH.cost, objFH.gradient, hessian=None, x0=[0.5,0.5,0.5], lb=lb, ub=ub,disp=3,full_output=True)

xhat,output = ip(objFH.cost,
                 objFH.gradient,
                 hessian=objFH.jtj,
                 x0=[0.5,0.5,0.5],
                 lb=lb, ub=ub,
                 method='bar',
                 disp=3, full_output=True)

xhat,output = ip(objFH.cost, objFH.gradient, hessian=None, x0=[0.5,0.5,0.5], lb=lb, ub=ub,disp=3,full_output=True)

xhat,output = ipD(objFH.cost, objFH.gradient, hessian=objFH.jtj, x0=[0.5,0.5,0.5], lb=lb, ub=ub,disp=3,full_output=True)

xhat,output = ipD(objFH.cost, objFH.gradient, hessian=None, x0=[0.5,0.5,0.5], lb=lb, ub=ub,disp=3,full_output=True)

from pygotools.optutils.consMani import addLBUBToInequality
G,h = addLBUBToInequality(lb,ub)
G = matrix(G)
h = matrix(h)
z = qpOut['z']
Exemplo n.º 3
0
                   objFH.gradient,
                   x0=theta,
                   disp=4, full_output=True)

xhat, output = sqp(objFH.cost,
                   objFH.gradient,
                   x0=theta,
                   lb=lb, ub=ub,
                   disp=4, full_output=True)

## interior point interface

xhat, output = ip(objFH.cost,
                  objFH.gradient,
                  x0=theta,
                  lb=None, ub=None,
                  G=None, h=None,
                  A=None, b=None,
                  method='bar',
                  disp=3, full_output=True)


xhat, output = ip(objFH.cost,
                  objFH.gradient,
                  x0=theta,
                  lb=lb, ub=ub,
                  G=None, h=None,
                  A=None, b=None,
                  maxiter=200,
                  method='bar',
                  disp=3, full_output=True)