|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgenopt.algorithm.Optimizer
genopt.algorithm.util.gps.ModelGPS
genopt.algorithm.GPSCoordinateSearch
public class GPSCoordinateSearch
Class for minimizing a function using the coordinate search algorithm.
This project was carried out at:
and supported byGenOpt 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.
| Field Summary | |
|---|---|
private int[] |
cooPoi
Array with element 0 or 1, if the previous step in this direction was successful or failed, respectively |
private int |
dimX
The number of independent variables |
| Fields inherited from class genopt.algorithm.util.gps.ModelGPS |
|---|
basDirMat, checkObjFun, EMPTY_SEARCH_SET, FAIMOV, NEGDIR, nMaxSteRed, POSDIR, SUCMOV |
| Fields inherited from class genopt.algorithm.Optimizer |
|---|
done, EXCLUDING, FS, INCLUDING, LS, MAINITERATION, ORIGINAL, SUBITERATION, TRANSFORMED |
| Constructor Summary | |
|---|---|
GPSCoordinateSearch(GenOpt genOptData)
Constructor |
|
GPSCoordinateSearch(int meshSizeDivider,
int initialMeshSizeExponent)
Constructor used to run the algorithm in a hybrid algorithm for the last iterations. |
|
| Method Summary | |
|---|---|
protected Point[] |
globalSearch(Point[] x,
double delta)
Method for the global search (this method returns always null. |
protected double[][] |
initializeBaseDirectionMatrix()
Method that initializes the base direction matrix. |
protected Point[] |
localSearch(Point[] x,
double delta)
Method for the local search. |
private Point |
perturb(Point xBes,
double delta,
int i)
Perturbs a given point in one direction. |
private void |
reportFailure(Point x,
int i)
Reports a trial that yield no reduction in the cost function value. |
private void |
reportSuccess(Point x,
int i)
Reports a trial that reduced the cost function value. |
| Methods inherited from class genopt.algorithm.util.gps.ModelGPS |
|---|
add, checkObjectiveFunctionValue, getClosestEuclideanMeshPoint, getDelta, getF, getIndexLowestFunctionValue, getInitialDelta, getIterationNumber, getMaximumNumberOfStepReduction, getMinimumPoint, getNumberOfStepReduction, haveSufficientDecrease, report, reportMinimum, reportMinimum, run, setMaximumNumberOfStepReduction |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private int[] cooPoi
private int dimX
| Constructor Detail |
|---|
public GPSCoordinateSearch(GenOpt genOptData)
throws OptimizerException,
java.io.IOException,
java.lang.Exception,
InputFormatException
genOptData - a reference to the GenOpt object.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
java.io.IOException
InputFormatException
public GPSCoordinateSearch(int meshSizeDivider,
int initialMeshSizeExponent)
throws OptimizerException,
java.io.IOException,
java.lang.Exception,
InputFormatException
meshSizeDivider - the mesh size divider.
If set to Integer.MAX_VALUE, then
the value will be read from the command fileinitialMeshSizeExponent - the initial mesh size exponent.
If set to Integer.MAX_VALUE, then
the value will be read from the command file
OptimizerException
java.lang.Exception
java.io.IOException - if an I/O exception occurs
InputFormatException| Method Detail |
|---|
protected double[][] initializeBaseDirectionMatrix()
Each column vector is a direction, and the set of column vectors must be a positive span for the domain of independent parameters.
initializeBaseDirectionMatrix in class ModelGPS
protected Point[] globalSearch(Point[] x,
double delta)
throws SimulationInputException,
OptimizerException,
java.lang.NoSuchMethodException,
java.lang.IllegalAccessException,
java.lang.Exception
null.
globalSearch in class ModelGPSx - Sequence of previous iteratesdelta - current mesh size
null pointer
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
protected Point[] localSearch(Point[] x,
double delta)
throws SimulationInputException,
OptimizerException,
java.lang.NoSuchMethodException,
java.lang.IllegalAccessException,
java.lang.Exception
localSearch in class ModelGPSx - Sequence of previous iteratesdelta - current mesh size
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
private Point perturb(Point xBes,
double delta,
int i)
throws SimulationInputException,
OptimizerException,
java.lang.NoSuchMethodException,
java.lang.IllegalAccessException,
java.lang.Exception
The value of cooPoi determines whether a point will first be
perturbed along the negative or positive coordinate direction.
xBes - Point to be perturbeddelta - current mesh sizei - index of independent parameter that has to be perturbed
xBes is returned.
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
private void reportSuccess(Point x,
int i)
throws java.io.IOException,
OptimizerException
x - the point that will be reportedi - the coordinate that has been perturbed
java.io.IOException - if an error occurs
OptimizerException - if an error occurs
private void reportFailure(Point x,
int i)
throws java.io.IOException,
OptimizerException
x - the point that will be reportedi - the coordinate that has been perturbed
java.io.IOException - if an error occurs
OptimizerException - if an error occurs
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||