Class Problem
- java.lang.Object
-
- pulse.util.UpwardsNavigable
-
- pulse.util.Group
-
- pulse.util.Accessible
-
- pulse.util.PropertyHolder
-
- pulse.problem.statements.Problem
-
- All Implemented Interfaces:
Serializable,Optimisable,Descriptive,Reflexive
- Direct Known Subclasses:
ClassicalProblem
public abstract class Problem extends PropertyHolder implements Reflexive, Optimisable
AProblemis an abstract class defining the general rules for handling heat conduction problems, and also providing access to the basic properties used in the calculation with one of theDifferenceSchemes. Most importantly, this class sets out the procedures for reading and writing the vector argument of the objective function for solving the optimisation problem.- See Also:
DifferenceScheme, Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanareDetailsHidden()Checks whether some 'advanced' details should stay hidden by the GUI when customising theProblemstatement.voidassign(ParameterVector params)Assigns parameter values of thisProblemusing the optimisation vectorparams.List<DifferenceScheme>availableSolutions()Lists the availableDifferenceSchemes for thisProblem.abstract Problemcopy()abstract Class<? extends DifferenceScheme>defaultScheme()DiscretePulsediscretePulseOn(Grid grid)Constructs aDiscretePulseon the specifiedgridusing thePulsecorresponding to thisProblem.voidestimateSignalRange(ExperimentalData c)The signal range is defined as , where and are robust to outliers.BaselinegetBaseline()Return theBaselineof thisProblem.InstanceDescriptor<? extends Baseline>getBaselineDescriptor()ProblemComplexitygetComplexity()HeatingCurvegetHeatingCurve()ThermalPropertiesgetProperties()PulsegetPulse()abstract voidinitProperties()abstract voidinitProperties(ThermalProperties properties)booleanisEnabled()Used for debugging.abstract booleanisReady()Set<NumericPropertyKeyword>listedKeywords()Listed parameters include:MAXTEMP, DIFFUSIVITY, THICKNESS, HEAT_LOSS_FRONT, HEAT_LOSS_REAR.List<Property>listedTypes()By default, collects a list of default properties corresponding to types defined by listedKeywords().voidoptimisationVector(ParameterVector output)Calculates the vector argument defined on to the scalar objective function for thisProblem.voidretrieveData(ExperimentalData c)This will use the data contained incto estimate the detector signal span and the thermal diffusivity for thisProblem.voidset(NumericPropertyKeyword type, NumericProperty value)Used to change the parameter values of thisProblem.voidsetBaseline(Baseline baseline)Sets a new baseline.voidsetComplexity(ProblemComplexity complexity)static voidsetDetailsHidden(boolean b)Allows to either hide or display all 'advanced' settings for thisProblem.voidsetHeatingCurve(HeatingCurve curve)voidsetProperties(ThermalProperties properties)voidsetPulse(Pulse pulse)Sets thepulseof thisProblemand assigns thisProblemas its parent.StringtoString()-
Methods inherited from class pulse.util.PropertyHolder
addListener, data, describe, firePropertyChanged, getDescriptor, getListeners, getPrefix, ignoreSiblings, initListeners, isListedNumericType, isListedParameter, numericData, parameterListChanged, removeListeners, setPrefix, updateProperties, updateProperty
-
Methods inherited from class pulse.util.Accessible
accessibleChildren, genericProperties, genericProperty, numericProperties, numericProperty, property, update, update
-
Methods inherited from class pulse.util.UpwardsNavigable
addHierarchyListener, getHierarchyListeners, getParent, identify, removeHierarchyListener, removeHierarchyListeners, setParent, specificAncestor, tellParent
-
-
-
-
Constructor Detail
-
Problem
protected Problem()
Creates aProblemwith default parameters (as found in the .XML file).First, invokes the
super()constructor ofPropertyHolderto initialisePropertyHolderListeners, then initialises the variables and creates defaultPulseandHeatingCurve, setting this object as their parent.
-
Problem
public Problem(Problem p)
Copies all essential parameters fromp, excluding the heating curve, which is created anew.- Parameters:
p- theProblemto replicate
-
-
Method Detail
-
copy
public abstract Problem copy()
-
setHeatingCurve
public final void setHeatingCurve(HeatingCurve curve)
-
availableSolutions
public final List<DifferenceScheme> availableSolutions()
Lists the availableDifferenceSchemes for thisProblem.This is done utilising the
Reflexiveinterface implemented by the classDifferenceSheme. This method dynamically locates any subclasses of theDifferenceSchemein the associated package (note this can be extended to include plugins) and checks whether any of the instances of those schemes return a non-nullresult when calling thesolver(Problem)method.- Returns:
- a
Listof availableDifferenceSchemes for solving thisProblem.
-
set
public void set(NumericPropertyKeyword type, NumericProperty value)
Used to change the parameter values of thisProblem. It is only allowed to use those types ofNumericProperythat are listed by thelistedParameters().- Specified by:
setin classAccessible- Parameters:
type- the type, which must be equal by definition toproperty.getType().value- the property, which contains new information.- See Also:
listedTypes()
-
getHeatingCurve
public final HeatingCurve getHeatingCurve()
-
getPulse
public final Pulse getPulse()
-
setPulse
public final void setPulse(Pulse pulse)
Sets thepulseof thisProblemand assigns thisProblemas its parent.- Parameters:
pulse- aPulseobject
-
retrieveData
public void retrieveData(ExperimentalData c)
This will use the data contained incto estimate the detector signal span and the thermal diffusivity for thisProblem. Note these estimates may be very rough.- Parameters:
c- theExperimentalDataobject
-
estimateSignalRange
public void estimateSignalRange(ExperimentalData c)
The signal range is defined as , where and are robust to outliers. This calls themaxTemperaturemethod ofcand uses the baseline value at0as the value.- Parameters:
c- theExperimentalDataobject
-
optimisationVector
public void optimisationVector(ParameterVector output)
Calculates the vector argument defined on to the scalar objective function for thisProblem. To fill the vector with data, only those parameters from thisProblemwill be used which are defined by theflags, e.g. if the flag associated with theHEAT_LOSSkeyword is set to false, its value will be skipped when creating the vector.- Specified by:
optimisationVectorin interfaceOptimisable- Parameters:
output- the output vector where the result will be stored- See Also:
listedTypes()
-
assign
public void assign(ParameterVector params) throws SolverException
Assigns parameter values of thisProblemusing the optimisation vectorparams. Only those parameters will be updated, the types of which are listed as indices in theparamsvector.- Specified by:
assignin interfaceOptimisable- Parameters:
params- the optimisation vector, containing a similar set of parameters to thisProblem- Throws:
SolverException- ifparamscontains invalid parameter values- See Also:
listedTypes()
-
areDetailsHidden
public boolean areDetailsHidden()
Checks whether some 'advanced' details should stay hidden by the GUI when customising theProblemstatement.- Overrides:
areDetailsHiddenin classPropertyHolder- Returns:
trueif the user does not want to see the details (by default),falseotherwise.
-
setDetailsHidden
public static final void setDetailsHidden(boolean b)
Allows to either hide or display all 'advanced' settings for thisProblem.- Parameters:
b-trueif the user does not want to see the details,falseotherwise.
-
isEnabled
public boolean isEnabled()
Used for debugging. Initially, the nonlinear and two-dimensional problem statements are disabled, since they have not yet been thoroughly tested- Returns:
trueif this problem statement has been enabled,falseotherwise
-
discretePulseOn
public DiscretePulse discretePulseOn(Grid grid)
Constructs aDiscretePulseon the specifiedgridusing thePulsecorresponding to thisProblem.- Parameters:
grid- the grid- Returns:
- a
DiscretePulseobjects constructed for thisProblemand thegrid
-
listedKeywords
public Set<NumericPropertyKeyword> listedKeywords()
Listed parameters include:MAXTEMP, DIFFUSIVITY, THICKNESS, HEAT_LOSS_FRONT, HEAT_LOSS_REAR.- Overrides:
listedKeywordsin classPropertyHolder- Returns:
- a set of
NumericPropertyKeywordinstances, which have been explicitly marked as a listed parameter for thisPropertyHolder.
-
listedTypes
public List<Property> listedTypes()
Description copied from class:PropertyHolderBy default, collects a list of default properties corresponding to types defined by listedKeywords(). However, this method is overridable to include non-numeric properties.
- Overrides:
listedTypesin classPropertyHolder- Returns:
- a list of
Propertyinstances, which have been explicitly marked as a listed parameter for thisPropertyHolder.
-
getComplexity
public final ProblemComplexity getComplexity()
-
setComplexity
public final void setComplexity(ProblemComplexity complexity)
-
getBaseline
public Baseline getBaseline()
Return theBaselineof thisProblem.- Returns:
- the baseline
-
setBaseline
public final void setBaseline(Baseline baseline)
Sets a new baseline. Callsapply(baseline)on theHeatingCurvewhen done and sets theparentof the baseline to this object.- Parameters:
baseline- the new baseline.
-
getBaselineDescriptor
public final InstanceDescriptor<? extends Baseline> getBaselineDescriptor()
-
getProperties
public final ThermalProperties getProperties()
-
setProperties
public final void setProperties(ThermalProperties properties)
-
initProperties
public abstract void initProperties()
-
initProperties
public abstract void initProperties(ThermalProperties properties)
-
defaultScheme
public abstract Class<? extends DifferenceScheme> defaultScheme()
-
isReady
public abstract boolean isReady()
-
-