Class AALHazardBasedFunction
java.lang.Object
nz.org.riskscape.engine.function.BaseRealizableFunction
nz.org.riskscape.defaults.function.AALHazardBasedFunction
- All Implemented Interfaces:
nz.org.riskscape.engine.rl.agg.AggregationFunction
,nz.org.riskscape.engine.rl.RealizableFunction
public class AALHazardBasedFunction
extends nz.org.riskscape.engine.function.BaseRealizableFunction
implements nz.org.riskscape.engine.rl.agg.AggregationFunction
Calculates an AAL for a hazard-based probabilistic data. We have a series of x,y datapoints, representing the loss and EP (Exceedance Probability). The AAL is the area under the x,y "curve". NB: we just connect the data-points via a straight-line (i.e. piecewise linear data), which simplifies the AAL calculation.
For the AAL calculation we use x=EP, y=loss. This seems to produce better results, because the spacing between X datapoints is consistent. Whereas if we used x=loss, y=EP, if we get duplicate losses then we end up with a zero AAL for the duplicates (i.e. there's no area under the curve). Refer GL993 for more details.
-
Nested Class Summary
Nested classes/interfaces inherited from interface nz.org.riskscape.engine.rl.RealizableFunction
nz.org.riskscape.engine.rl.RealizableFunction.MetadataIdentifiedRealizableFunction
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final com.google.common.collect.Range<Double>
static final AALHazardBasedFunction.LocalProblems
Fields inherited from class nz.org.riskscape.engine.function.BaseRealizableFunction
arguments, returnType
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionnz.org.riskscape.engine.function.RiskscapeFunction
nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.rl.agg.RealizedAggregateExpression>
realize
(nz.org.riskscape.engine.rl.RealizationContext context, nz.org.riskscape.engine.types.Type inputType, nz.org.riskscape.rl.ast.FunctionCall fc) nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.function.RiskscapeFunction>
realize
(nz.org.riskscape.engine.rl.RealizationContext context, nz.org.riskscape.rl.ast.FunctionCall fc, List<nz.org.riskscape.engine.types.Type> givenTypes) Methods inherited from class nz.org.riskscape.engine.function.BaseRealizableFunction
build, builtin, getArguments, getReturnType, identified
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface nz.org.riskscape.engine.rl.agg.AggregationFunction
getArguments, getReturnType
-
Field Details
-
PROBABILITY_RANGE
-
MIN_NUM_EVENTS
public static final int MIN_NUM_EVENTS- See Also:
-
PROBLEMS
-
-
Constructor Details
-
AALHazardBasedFunction
public AALHazardBasedFunction()
-
-
Method Details
-
realize
public nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.function.RiskscapeFunction> realize(nz.org.riskscape.engine.rl.RealizationContext context, nz.org.riskscape.rl.ast.FunctionCall fc, List<nz.org.riskscape.engine.types.Type> givenTypes) - Specified by:
realize
in interfacenz.org.riskscape.engine.rl.RealizableFunction
- Overrides:
realize
in classnz.org.riskscape.engine.function.BaseRealizableFunction
-
asFunction
public nz.org.riskscape.engine.function.RiskscapeFunction asFunction()- Overrides:
asFunction
in classnz.org.riskscape.engine.function.BaseRealizableFunction
-
realize
public nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.rl.agg.RealizedAggregateExpression> realize(nz.org.riskscape.engine.rl.RealizationContext context, nz.org.riskscape.engine.types.Type inputType, nz.org.riskscape.rl.ast.FunctionCall fc) - Specified by:
realize
in interfacenz.org.riskscape.engine.rl.agg.AggregationFunction
-