genopt.algorithm.util.linesearch
Class Armijo

java.lang.Object
  extended by genopt.algorithm.util.linesearch.Armijo

public class Armijo
extends java.lang.Object

Class for doing a line search using the Armijo algorithm with reset option for the step-size.

This project was carried out at:

and supported by

GenOpt Copyright (c) 1998-2011, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved.

Version:
GenOpt(R) 3.1.0 (December 8, 2011)

Author:
Michael Wetter

Field Summary
private  double Alp
          Algorithm parameter
private  double Bet
          Algorithm parameter
protected  int[] K
          The exponents k and k-1 of Beta
private  int Kappa
          Algorithm parameter
private  int KSta
          Algorithm parameter
private  int LMax
          Algorithm parameter
protected  DiscreteArmijoGradient Opt
          The reference to the Optimizer object
protected  Point[] xLS
          The two points of the line search
 
Constructor Summary
Armijo(DiscreteArmijoGradient optimizer, int kSta, int lMax, int kappa, double alpha, double beta)
          Constructor
 
Method Summary
 int getIndexWithLowestCost()
          Gets the index to the point with the lowest function value.
 int getKWithLowestCost()
          Gets the exponent k of Beta.
 Point getPointWithLowestCost()
          Gets the point with lowest cost.
 void run(int i, Point x, double[] h, int k, double del)
          Runs the line search.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Opt

protected DiscreteArmijoGradient Opt
The reference to the Optimizer object


Alp

private double Alp
Algorithm parameter


Bet

private double Bet
Algorithm parameter


KSta

private int KSta
Algorithm parameter


LMax

private int LMax
Algorithm parameter


Kappa

private int Kappa
Algorithm parameter


xLS

protected Point[] xLS
The two points of the line search


K

protected int[] K
The exponents k and k-1 of Beta

Constructor Detail

Armijo

public Armijo(DiscreteArmijoGradient optimizer,
              int kSta,
              int lMax,
              int kappa,
              double alpha,
              double beta)
Constructor

Parameters:
optimizer - a reference to the Optimizer object
Throws:
OptimizerException - if an OptimizerException occurs or if the user required to stop GenOpt
SimulationInputException - if an error in writing the simulation input file occurs
java.lang.NoSuchMethodException - if a method that should be invoked could not be found
java.lang.IllegalAccessException - if an invoked method enforces Java language access control and the underlying method is inaccessible
InvocationTargetException - if an invoked method throws an exception
java.lang.Exception - if an I/O error in the simulation input file occurs
Method Detail

run

public void run(int i,
                Point x,
                double[] h,
                int k,
                double del)
         throws SimulationInputException,
                OptimizerException,
                java.lang.NoSuchMethodException,
                java.lang.IllegalAccessException,
                java.lang.Exception
Runs the line search.

Throws:
OptimizerException - if an OptimizerException occurs or if the user required to stop GenOpt
SimulationInputException - if an error in writing the simulation input file occurs
java.lang.NoSuchMethodException - if a method that should be invoked could not be found
java.lang.IllegalAccessException - if an invoked method enforces Java language access control and the underlying method is inaccessible
InvocationTargetException - if an invoked method throws an exception
java.lang.Exception - if an I/O error in the simulation input file occurs

getKWithLowestCost

public int getKWithLowestCost()
Gets the exponent k of Beta.

Returns:
the value k of the point

getPointWithLowestCost

public final Point getPointWithLowestCost()
Gets the point with lowest cost.

Returns:
the point with the lowest cost function value

getIndexWithLowestCost

public final int getIndexWithLowestCost()
Gets the index to the point with the lowest function value.

Returns:
the index of the point with the lowest cost function value