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.

  • Field Details

  • 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 interface nz.org.riskscape.engine.rl.agg.AggregationFunction
    • getArguments

      public nz.org.riskscape.engine.function.ArgumentList getArguments()
      Specified by:
      getArguments in interface nz.org.riskscape.engine.rl.agg.AggregationFunction
    • getReturnType

      public nz.org.riskscape.engine.types.Type getReturnType()
      Specified by:
      getReturnType in interface nz.org.riskscape.engine.rl.agg.AggregationFunction