Rebuild: Rebuild blocks by adjusting the block- and element-level data...

Description Usage Arguments Details Value Examples

Description

This function simulates rebuilding by changing all component blocks to grade A in rebuilt blocks. The output is an element-level data frame and only the grade probabilities are changed. The repair costs are not updated in this function. It is therefore important to run UpdateElementRepairs and UpdateBlockRepairs on the element- and block-level data frames respectively after calling this function, and in that order too.

Usage

1
Rebuild(element.data, block.data, rebuild.money)

Arguments

element.data

An element-level data-frame.

block.data

A block-level data-frame.

rebuild.money

A number

Details

The decision about which blocks to rebuild is made based on a measure of cost-effectiveness, the ratio between the cost to repair all components in a block and the cost to rebuild the entire block. The rebuild cost is estimated using the unit rebuild cost times the Gross Internal Floor Area (GIFA) of the block.

After eliminating all zero rebuild cost block from consideration (to save computational time), the blocks are ordered in descending order of cost effectiveness. If there is enough money then the first block is repaired, then the second, and so on, skipping blocks if there are not enough funds. This continues until either there are no blocks left to rebuild or not enough money to rebuild any remaining blocks.

Value

An element-level data frame with updated grade proportions for rebuilt blocks. Note that repair costs are not updated, nor the block-level data frame holding block-level information so UpdateElementRepairs and UpdateBlockRepairs should be run afterwards.

Examples

1
2
3
4
5
6
7
# Rebuild blocks with budget of £1M
rebuilt_elements <- blockbuster2:::Rebuild(simulated_elements, simulated_blocks, 1e6)
# IMPORTANT - This does not update the repair costs so you need to pass
# the results to UpdateElementRepairs
rebuilt_elements <- blockbuster2:::UpdateElementRepairs(rebuilt_elements)
# Also update the block-level costs
rebuild_blocks <- blockbuster2:::UpdateBlockRepairs(simulated_blocks, rebuilt_elements)

DFE-Capital/blockbuster2 documentation built on May 4, 2019, 1:08 p.m.