replace.more.failures.than {WaMaSim} | R Documentation |
Rehabilitation strategy: replace pipes with too many failures
Description
Replace pipes with a high number of failures. Pipes are only replaced if the budget remains positive.
Usage
replace.more.failures.than(state, failures, max.costs = Inf)
Arguments
state |
a state list |
failures |
maximal allowed number of failures |
max.costs |
maximal amount of money allowed to be spent on this strategy |
Value
a state list
Author(s)
Andreas Scheidegger
See Also
replace.n.highest.risk
,
replace.n.oldest
, replace.n.random
, replace.older.than
,
do.nothing
Examples
## define a strategy function that can be passed to simulate_network():
mystrategy <- . %>% replace.more.failures.than(max.failure=3, max.costs=20000)
## or define a more complex strategy by combining multiple strategies
## into a prioritized sequence:
mystrategy <- . %>%
replace.more.failures.than(failures=2) %>%
replace.n.oldest(n=3) %>%
replace.n.highest.risk(n=2, prob.failure=prob.failure.exp) %>%
replace.older.than(age=8) %>%
replace.n.random(n=4)
[Package WaMaSim version 1.0.0 Index]