
from nz.org.riskscape.engine.types import Text, IdentifiedType

ID = "simple-fragility"
DESCRIPTION = "This function creates a string that combines values of the hazard and the loss"

# for now, we will instantiate this directly, but we probably want this to be declared as a string, e.g.
# riskscape:some-loss
LOSS_TYPE = IdentifiedType("foo", Text())
HAZARD_TYPE_ID = 'hazard:simple'
ASSET_TYPE_ID = 'asset:simple:anything'

def fragility_function(asset, feature):
  result = "%s + %s" % (asset.value['materials'], feature.value)
  return result

