public class GPSCoordinateSearch extends ModelGPS
This project was carried out at:
and supported byGenOpt Copyright (c) 1998-2021, 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.
| Modifier and Type | Field and Description |
|---|---|
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
|
basDirMat, checkObjFun, EMPTY_SEARCH_SET, FAIMOV, NEGDIR, nMaxSteRed, POSDIR, SUCMOVdone, EXCLUDING, FS, INCLUDING, LS, MAINITERATION, ORIGINAL, SUBITERATION, TRANSFORMED| Constructor and Description |
|---|
GPSCoordinateSearch(GenOpt genOptData)
Constructor
|
GPSCoordinateSearch(int meshSizeDivider,
int initialMeshSizeExponent)
Constructor used to run the algorithm in a hybrid algorithm for the
last iterations.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
add, checkObjectiveFunctionValue, getClosestEuclideanMeshPoint, getDelta, getF, getIndexLowestFunctionValue, getInitialDelta, getIterationNumber, getMaximumNumberOfStepReduction, getMinimumPoint, getNumberOfStepReduction, haveSufficientDecrease, report, reportMinimum, reportMinimum, run, setMaximumNumberOfStepReductionalgorithmRequiresUsageOfStepNumber, appendToOutputListing, checkMaxIteration, ensureOnlyContinuousParameters, ensureOnlyDiscreteParameters, getAbsAccuracyFunction, getDimensionContinuous, getDimensionDiscrete, getDimensionF, getDimensionX, getDiscreteValueDouble0, getDx, getDx0, getF, getIndex0, getIndex0, getInputValueBoolean, getInputValueDouble, getInputValueDouble, getInputValueInteger, getInputValueInteger, getInputValueString, getInputValueString, getKindOfConstraint, getL, getLengthDiscrete, getMainIterationNumber, getMaximumThreadPoolSize, getMaxIterationNumber, getMode, getObjectiveFunctionName, getOutputPath, getPointerToEqualPoints, getRelAccuracyFunction, getSimulationNumber, getStepNumber, getU, getVariableNameContinuous, getVariableNameDiscrete, getX0, getX0, goToEndOfCommandFile, increaseStepNumber, increaseStepNumber, isFeasible, isNextToken, maxIterationReached, mustStopOptimization, print, println, replace, reportCurrentLowestPoint, resetStepNumber, roundCoordinates, run, setInfo, setMode, setNumberOfMatchingResults, setToFeasibleCoordinate, setToFeasibleCoordinate, setWarning, simulate, throwInputError, useStepNumber, writeStepNumberprivate int[] cooPoi
private int dimX
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 GenOptSimulationInputException - if an error in writing the
simulation input file occursjava.lang.NoSuchMethodException - if a method that should be invoked could not be foundjava.lang.IllegalAccessException - if an invoked method enforces Java language access
control and the underlying method is inaccessibleInvocationTargetException - if an invoked method throws an exceptionjava.lang.Exception - if an I/O error in the simulation input file occursjava.io.IOExceptionInputFormatExceptionpublic 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 fileOptimizerExceptionjava.lang.Exceptionjava.io.IOException - if an I/O exception occursInputFormatExceptionprotected 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 ModelGPSprotected 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 sizenull pointerOptimizerException - if an OptimizerException occurs or
if the user required to stop GenOptSimulationInputException - if an error in writing the
simulation input file occursjava.lang.NoSuchMethodException - if a method that should be invoked could not be foundjava.lang.IllegalAccessException - if an invoked method enforces Java language access
control and the underlying method is inaccessibleInvocationTargetException - if an invoked method throws an exceptionjava.lang.Exception - if an I/O error in the simulation input file occursprotected 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 sizeOptimizerException - if an OptimizerException occurs or
if the user required to stop GenOptSimulationInputException - if an error in writing the
simulation input file occursjava.lang.NoSuchMethodException - if a method that should be invoked could not be foundjava.lang.IllegalAccessException - if an invoked method enforces Java language access
control and the underlying method is inaccessibleInvocationTargetException - if an invoked method throws an exceptionjava.lang.Exception - if an I/O error in the simulation input file occursprivate 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 perturbedxBes is returned.OptimizerException - if an OptimizerException occurs or
if the user required to stop GenOptSimulationInputException - if an error in writing the
simulation input file occursjava.lang.NoSuchMethodException - if a method that should be invoked could not be foundjava.lang.IllegalAccessException - if an invoked method enforces Java language access
control and the underlying method is inaccessibleInvocationTargetException - if an invoked method throws an exceptionjava.lang.Exception - if an I/O error in the simulation input file occursprivate void reportSuccess(Point x, int i) throws java.io.IOException, OptimizerException
x - the point that will be reportedi - the coordinate that has been perturbedjava.io.IOException - if an error occursOptimizerException - if an error occursprivate void reportFailure(Point x, int i) throws java.io.IOException, OptimizerException
x - the point that will be reportedi - the coordinate that has been perturbedjava.io.IOException - if an error occursOptimizerException - if an error occurs