Class AALHazardBasedFunction
java.lang.Object
nz.org.riskscape.defaults.function.AALHazardBasedFunction
- All Implemented Interfaces:
nz.org.riskscape.engine.rl.agg.AggregationFunction
public class AALHazardBasedFunction
extends Object
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
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final com.google.common.collect.Range<Double>
static final AALHazardBasedFunction.LocalProblems
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionnz.org.riskscape.engine.function.ArgumentList
nz.org.riskscape.engine.types.Type
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)
-
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.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
-
getArguments
public nz.org.riskscape.engine.function.ArgumentList getArguments()- Specified by:
getArguments
in interfacenz.org.riskscape.engine.rl.agg.AggregationFunction
-
getReturnType
public nz.org.riskscape.engine.types.Type getReturnType()- Specified by:
getReturnType
in interfacenz.org.riskscape.engine.rl.agg.AggregationFunction
-