fail: Model failures of the network

Description Usage Arguments Value Author(s)

Description

Allows pipes to randomly fail. If a failure occurs, the failure costs (repair + damage) are calculated and subtracted from the budget. Note, that this may result in a negative budget.

Usage

1
fail(state, prob.failure)

Arguments

state

a state object

prob.failure

function returning the annual failure rate; i.e. the probability of a pipe failing in the current year of simulation. prob.failure must take age, age.last.failure, n.failure as input arguments. Note that in the case of a pipe with zero previous failures (i.e. n.failure=0), age.last.failure=NA.

Value

inventory with new failures

Author(s)

Andreas Scheidegger


WaMaSim documentation built on May 6, 2019, 1:09 a.m.