replace.n.oldest: Rehabilitation strategy: replace the 'n' oldest pipes

Description Usage Arguments Value Author(s) See Also Examples

Description

Prioritize the oldest pipes for replacement. Pipes are only replaced if the budget remains positive.

Usage

1
replace.n.oldest(state, n, max.costs = Inf)

Arguments

state

a state list

n

number of oldest pipes to replace

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.random, replace.older.than, replace.more.failures.than, do.nothing

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## define a strategy function that can be passed to simulate_network():
mystrategy <- . %>% replace.n.oldest(n=10)

## 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)

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