rebuild: An internal function that determines rebuilding intervention...

Description Usage Arguments Details Value Examples

View source: R/rebuild.R

Description

A given amount of money (rebuild_monies) is invested in rebuilding the blockbuster_tibble, passed as an arguement to the function. This is dependent on the block_rebuild_cost and the rebuild_monies.

Usage

1
rebuild(blockbuster_tibble, rebuild_monies)

Arguments

blockbuster_tibble

a blockbuster dataframe or tibble.

rebuild_monies

a vector of length one.

Details

Outputs a blockbuster_tibble after spending rebuild_monies on a finite number of blocks. Rebuilding a block converts all it's building components back to grade N, making it as new. The rebuilding decision making is based on a summarised sorted list of blocks, sorted by the ratio of the total cost of repairs divided by the rebuild cost of the block (this is calculated in blockbuster). As this ratio approaches one it suggests the cost of repairs are equivalent to building a new block! Using the available funding or rebuild_monies we systematically work through and rebuild each block based on our sorted list until all the money is used up. If a block is to expensive to rebuild, we move on and attempt to rebuild the next one. If our rebuild_monies is less than the cheapest block to repair we stop trying to rebuild. Thus money can be wasted. Upon rebuilding the unit_area must be re-estimated for each building component thus the areafy2 function is called internally. If rebuild_monies are zero (the default) then the rebuilding is skipped and the blockbuster_tibble argument is the output.

Value

A blockbuster_tibble that has had blocks rebuilt (or not if rebuild_monies are 0).

Examples

1
2
3
jackpot <- blockbuster(dplyr::filter(blockbuster_pds,
  buildingid == 4382 | buildingid == 4472 | buildingid == 4487), 
  forecast_horizon = 2, rebuild_monies = 5e6)

DFE-Capital/blockbuster documentation built on March 19, 2018, 4:09 a.m.