Description Usage Arguments Details Value Examples
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.
1 | Rebuild(element.data, block.data, rebuild.money)
|
element.data |
An element-level data-frame. |
block.data |
A block-level data-frame. |
rebuild.money |
A number |
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.
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.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.