meshi.optimizers
Class ConjugateGradient

java.lang.Object
  extended by meshi.optimizers.Optimizer
      extended by meshi.optimizers.Minimizer
          extended by meshi.optimizers.ConjugateGradient

public class ConjugateGradient
extends Minimizer

This class implements a nonlinear Conjugate Gradient minimizer PR+ algorithm is implemented. Fletcher-Reeves algorithm is the base (FR-CG 5.4 in book below) using betaPR (PR-CG algorithm) (Polak-Ribiere) 5.43 and using 5.44 (non-negative beta: PR+) pp. 122. with posible restarts every n steps. according to the scheme in: Numerical Optimization by J. Nocendal & S. J. Wright, Springer 1999, pp 120-122.


Nested Class Summary
 
Nested classes/interfaces inherited from class meshi.optimizers.Optimizer
Optimizer.OptimizerStatus
 
Field Summary
protected  double beta
           
protected  double[][] bufferCoordinates
           
private  double c1
           
private  double c2
           
protected  double[][] coordinates
           
private static double DEFAULT_C1
           
private static double DEFAULT_C2
           
private static double DEFAULT_EXTENDED_ALPHA_FACTOR_WOLF_SEARCH
           
private static int DEFAULT_MAX_ITERATION
           
private static int DEFAULT_MAX_NUM_EVALUATIONS_WOLF_SEARCH
           
private static int DEFAULT_REPORT_EVERY
           
private static int DEFAULT_RESTART_EVERY
           
private static double DEFAULT_TOLERANCE
           
private  double extendAlphaFactorWolfSearch
           
protected  double[] G
           
private static double initStepSteepestDecent
           
private  int iterationNum
           
protected  LineSearch lineSearch
           
private  double magnitudeForce
           
private  int maxNumEvaluationsWolfSearch
           
private static int maxSteepestDecent
           
private  int nSteepestDecent
           
private static int numStepsSteepestDecent
           
protected  double[] P
           
protected  int restartEvery
           
private static double stepSizeExpansionSteepestDecent
           
private static double stepSizeReductionSteepestDecent
           
 
Fields inherited from class meshi.optimizers.Minimizer
MAX_KICKSTARTS, terminator, tolerance
 
Fields inherited from class meshi.optimizers.Optimizer
energy, maxSteps, optimizerTerminator, reportEvery
 
Constructor Summary
ConjugateGradient(TotalEnergy energy)
           
ConjugateGradient(TotalEnergy energy, double tolerance, int maxSteps, int reportEvery)
           
ConjugateGradient(TotalEnergy energy, double tolerance, int maxSteps, int reportEvery, double c1, double c2, double extendAlphaFactorWolfSearch, int maxNumEvaluationsWolfSearch, int restartEvery)
           
ConjugateGradient(TotalEnergy energy, double tolerance, int maxSteps, int reportEvery, int restartEvery)
           
 
Method Summary
protected  void init()
           
protected  void kickStart()
           
protected  boolean minimizationStep()
           
 java.lang.String toString()
           
 
Methods inherited from class meshi.optimizers.Minimizer
run, run
 
Methods inherited from class meshi.optimizers.Optimizer
energy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

lineSearch

protected LineSearch lineSearch

coordinates

protected double[][] coordinates

bufferCoordinates

protected double[][] bufferCoordinates

P

protected double[] P

G

protected double[] G

beta

protected double beta

DEFAULT_RESTART_EVERY

private static final int DEFAULT_RESTART_EVERY
See Also:
Constant Field Values

restartEvery

protected int restartEvery

iterationNum

private int iterationNum

magnitudeForce

private double magnitudeForce

DEFAULT_TOLERANCE

private static final double DEFAULT_TOLERANCE
See Also:
Constant Field Values

DEFAULT_MAX_ITERATION

private static final int DEFAULT_MAX_ITERATION
See Also:
Constant Field Values

DEFAULT_REPORT_EVERY

private static final int DEFAULT_REPORT_EVERY
See Also:
Constant Field Values

initStepSteepestDecent

private static double initStepSteepestDecent

stepSizeReductionSteepestDecent

private static double stepSizeReductionSteepestDecent

stepSizeExpansionSteepestDecent

private static double stepSizeExpansionSteepestDecent

numStepsSteepestDecent

private static int numStepsSteepestDecent

maxSteepestDecent

private static int maxSteepestDecent

nSteepestDecent

private int nSteepestDecent

c1

private double c1

c2

private double c2

extendAlphaFactorWolfSearch

private double extendAlphaFactorWolfSearch

maxNumEvaluationsWolfSearch

private int maxNumEvaluationsWolfSearch

DEFAULT_C1

private static final double DEFAULT_C1
See Also:
Constant Field Values

DEFAULT_C2

private static final double DEFAULT_C2
See Also:
Constant Field Values

DEFAULT_EXTENDED_ALPHA_FACTOR_WOLF_SEARCH

private static final double DEFAULT_EXTENDED_ALPHA_FACTOR_WOLF_SEARCH
See Also:
Constant Field Values

DEFAULT_MAX_NUM_EVALUATIONS_WOLF_SEARCH

private static final int DEFAULT_MAX_NUM_EVALUATIONS_WOLF_SEARCH
See Also:
Constant Field Values
Constructor Detail

ConjugateGradient

public ConjugateGradient(TotalEnergy energy,
                         double tolerance,
                         int maxSteps,
                         int reportEvery,
                         double c1,
                         double c2,
                         double extendAlphaFactorWolfSearch,
                         int maxNumEvaluationsWolfSearch,
                         int restartEvery)

ConjugateGradient

public ConjugateGradient(TotalEnergy energy,
                         double tolerance,
                         int maxSteps,
                         int reportEvery)

ConjugateGradient

public ConjugateGradient(TotalEnergy energy,
                         double tolerance,
                         int maxSteps,
                         int reportEvery,
                         int restartEvery)

ConjugateGradient

public ConjugateGradient(TotalEnergy energy)
Method Detail

init

protected void init()
Specified by:
init in class Minimizer

minimizationStep

protected boolean minimizationStep()
                            throws OptimizerException
Specified by:
minimizationStep in class Minimizer
Throws:
OptimizerException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

kickStart

protected void kickStart()
Specified by:
kickStart in class Minimizer