Skip to contents

Extract some values information of a model

Usage

extract_value(
  model,
  room = NULL,
  furniture = NULL,
  category = NULL,
  model_name = NULL,
  verbose = getOption("floodam_building_verbose")
)

Arguments

model

an object of class model

room

a data.frame describing room of a model, set to model[["data_table"]][["room"]] if model is provided.

furniture

a data.frame describing furniture of a model, set to model[["data_table"]][["furniture"]] if model is provided.

category

a character vector describing category of a model, set to model[["category"]] if model is provided.

model_name

a character scalar giving names of a model, set to model[["name"]] if model is provided.

verbose

logical, default to getOption("floodam_building_verbose")

Value

An list of value organized as follow

surface

a data.frame with 'internal' and 'external' surfaces. Surfaces are estimated at storey level, maximum is taken.

monetary

a data frame with the estimation of total monetary value replacement for elementary components classified according to the 'category' of the model

Examples

# Example 1

# analyzing model 'simple' of type 'simple' using the sequential steps *load* 
# (load model data) and *extract* (extract model data)
model = analyse_model(
     model = "simple",
    type = "simple",
     path = init_create_path(
         input = system.file("extdata", package = "floodam.building"),
         output = tempdir()
     ),
     stage = c("load", "extract")
)
#> Loading model 'simple'...
#> 	- Structure of building.xml of 'simple' has been successfully checked
#> 	... successful
#> Extracting building information for 'simple'...
#> 	- extracted:
#>  		- parameter
#>  		- storey
#>  		- room
#>  		- wall
#> 	- missing (not found):
#>  		- opening
#>  		- coating
#>  		- furniture
#> 	... Informations successfully extracted for 'simple'
#> Computing some values for 'simple'...
#> 	... Informations successfully extracted for 'simple'
#> End of analysis for 'simple'. Total elapsed time 0.09 secs
#> More information availabe at /tmp/RtmpZhomgU/model/simple/simple/simple.log
#> 
extract_value(model)
#> Computing some values for 'simple'...
#> 	... Informations successfully extracted for 'simple'

# Example 2

# using already loaded library model 'dwelling' 
model = dwelling

# extracting model data
model = analyse_model(model = model, stage = "extract")
#> Extracting building information for 'adu_t'...
#> 	- extracted:
#>  		- parameter
#>  		- storey
#>  		- room
#>  		- wall
#>  		- opening
#>  		- coating
#>  		- furniture
#> 	- missing (not found):
#>  	... Informations successfully extracted for 'adu_t'
#> Computing some values for 'adu_t'...
#> 	... Informations successfully extracted for 'adu_t'
#> End of analysis for 'adu_t'. Total elapsed time 0.18 secs
#> More information availabe at /tmp/RtmpBUioc4/model/adu/adu_t/adu_t.log
#> 

extract_value(model)
#> Computing some values for 'adu_t'...
#> 	... Informations successfully extracted for 'adu_t'