Class PathOptimiser
- java.lang.Object
-
- pulse.util.UpwardsNavigable
-
- pulse.util.Group
-
- pulse.util.Accessible
-
- pulse.util.PropertyHolder
-
- pulse.search.direction.PathOptimiser
-
- All Implemented Interfaces:
Serializable,Descriptive,Reflexive
- Direct Known Subclasses:
GradientBasedOptimiser,ParticleSwarmOptimiser
public abstract class PathOptimiser extends PropertyHolder implements Reflexive
An abstract class that defines the mathematical basis of solving the reverse heat conduction problem.Defines the method for calculating the gradient of the target function (the sum of squared residuals, SSR) and a search iteration method, which is used in the main loop of the
SearchTask'srunmethod. Declares (but not defines!) the methods for finding the direction of the minimum. This class is closely linked with another abstract search class, theLinearSolver.- See Also:
LinearOptimiser, Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPathOptimiser()Abstract constructor that sets up the defaultITERATION_LIMIT, ERROR_TOLERANCEandGRADIENT_RESOLUTIONfor thisPathSolver.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleancompatibleWith(OptimiserStatistic os)Checks if this optimiser is compatible with the statistic passed to the method as its argument.By default, this will accept anyOptimiserStatisticList<Property>genericProperties()This method has been overriden to account for each individual flag in theList<Flag>set out by this class.NumericPropertygetErrorTolerance()static PathOptimisergetInstance()NumericPropertygetMaxIterations()protected DirectionSolvergetSolver()booleanignoreSiblings()ShouldAccessibles that belong to thisPropertyHolderbe ignored when thisPropertyHolderis displayed in a table?abstract IterativeStateinitState(GeneralTask t)Creates a newPathsuitable for thisPathSolverabstract booleaniteration(GeneralTask task)This method sets out the basic algorithm for estimating the minimum of the target function, which is defined as the sum of squared residuals (SSR), or the deviations of the model solution (aDifferenceSchemeused to solve theProblemfor thistask) from the empirical values (theExperimentalData).Set<NumericPropertyKeyword>listedKeywords()The types of the listed parameters for this class include:ERROR_TOLERANCE, ITERATION_LIMIT.abstract voidprepare(GeneralTask task)Defines a set of procedures to be run at the end of the search iteration.voidreset()Resets the defaultITERATION_LIMIT, ERROR_TOLERANCEandGRADIENT_RESOLUTIONvalues for thisPathSolver.voidset(NumericPropertyKeyword type, NumericProperty property)The accepted types are:ERROR_TOLERANCE, ITERATION_LIMIT.voidsetErrorTolerance(NumericProperty errorTolerance)static voidsetInstance(PathOptimiser selectedPathOptimiser)voidsetMaxIterations(NumericProperty maxIterations)protected voidsetSolver(DirectionSolver solver)StringtoString()voidupdate(Property property)Finds aFlagequivalent toflagin theoriginalListand substitutes its value withflag.getValue.-
Methods inherited from class pulse.util.PropertyHolder
addListener, areDetailsHidden, data, describe, firePropertyChanged, getDescriptor, getListeners, getPrefix, initListeners, isListedNumericType, isListedParameter, listedTypes, numericData, parameterListChanged, removeListeners, setPrefix, updateProperties, updateProperty
-
Methods inherited from class pulse.util.Accessible
accessibleChildren, genericProperty, numericProperties, numericProperty, property, update
-
Methods inherited from class pulse.util.UpwardsNavigable
addHierarchyListener, getHierarchyListeners, getParent, identify, removeHierarchyListener, removeHierarchyListeners, setParent, specificAncestor, tellParent
-
-
-
-
Method Detail
-
reset
public void reset()
Resets the defaultITERATION_LIMIT, ERROR_TOLERANCEandGRADIENT_RESOLUTIONvalues for thisPathSolver. In addition, sets up a list of search flags defined by theFlag.defaultListmethod.
-
iteration
public abstract boolean iteration(GeneralTask task) throws SolverException
This method sets out the basic algorithm for estimating the minimum of the target function, which is defined as the sum of squared residuals (SSR), or the deviations of the model solution (a
DifferenceSchemeused to solve theProblemfor thistask) from the empirical values (theExperimentalData). The algorithm will go through the following steps: (1) find the direction, which points to the minimum, using the concretedirectionmethod; (2) estimate the magnitude of the step to reach the minimum using theLinearSolver; (3) assign a new set of parameters to theSearchTask; (4) calculate the new SSR value.- Parameters:
task- aSearchTaskthat needs to be driven to a minimum of SSR.- Returns:
- the SSR value with the newly found parameters.
- Throws:
SolverException- See Also:
direction(Path),LinearOptimiser
-
prepare
public abstract void prepare(GeneralTask task) throws SolverException
Defines a set of procedures to be run at the end of the search iteration.- Parameters:
task- theSearchTaskundergoing optimisation- Throws:
SolverException
-
getErrorTolerance
public NumericProperty getErrorTolerance()
-
setErrorTolerance
public void setErrorTolerance(NumericProperty errorTolerance)
-
getMaxIterations
public NumericProperty getMaxIterations()
-
setMaxIterations
public void setMaxIterations(NumericProperty maxIterations)
-
genericProperties
public List<Property> genericProperties()
This method has been overriden to account for each individual flag in theList<Flag>set out by this class.- Overrides:
genericPropertiesin classAccessible- Returns:
- This will return a
List<Property>containing all properties belonging to thisAccessible, which are not assignable from theNumericPropertyclass.
-
listedKeywords
public Set<NumericPropertyKeyword> listedKeywords()
The types of the listed parameters for this class include:
ERROR_TOLERANCE, ITERATION_LIMIT. Also, all the flags in this class are treated as separate listed parameters.- Overrides:
listedKeywordsin classPropertyHolder- Returns:
- a set of
NumericPropertyKeywordinstances, which have been explicitly marked as a listed parameter for thisPropertyHolder. - See Also:
NumericPropertyKeyword
-
set
public void set(NumericPropertyKeyword type, NumericProperty property)
The accepted types are:ERROR_TOLERANCE, ITERATION_LIMIT.- Specified by:
setin classAccessible- Parameters:
type- the type, which must be equal by definition toproperty.getType().property- the property, which contains new information.
-
ignoreSiblings
public boolean ignoreSiblings()
Description copied from class:PropertyHolderShouldAccessibles that belong to thisPropertyHolderbe ignored when thisPropertyHolderis displayed in a table?- Overrides:
ignoreSiblingsin classPropertyHolder- Returns:
falseforPathSolver- See Also:
PropertyHolderTable
-
update
public void update(Property property)
Finds aFlagequivalent toflagin theoriginalListand substitutes its value withflag.getValue.- Overrides:
updatein classAccessible- Parameters:
property- theProperty, which will update a similar property of thisAccessible.
-
getInstance
public static PathOptimiser getInstance()
-
setInstance
public static void setInstance(PathOptimiser selectedPathOptimiser)
-
getSolver
protected final DirectionSolver getSolver()
-
setSolver
protected final void setSolver(DirectionSolver solver)
-
compatibleWith
public boolean compatibleWith(OptimiserStatistic os)
Checks if this optimiser is compatible with the statistic passed to the method as its argument.By default, this will accept anyOptimiserStatistic- Parameters:
os- a selected optimiser metric- Returns:
true, if not specified otherwise by its subclass implementation.
-
initState
public abstract IterativeState initState(GeneralTask t)
Creates a newPathsuitable for thisPathSolver- Parameters:
t- the task, the optimisation path of which will be tracked- Returns:
- a
Pathinstance
-
-