Skip to contents

Summarize detailed list of elementary damaging functions.

Usage

sumup_damaging(x, who = NULL)

Arguments

x,

object of class elementary_damaging or a list

who,

NULL or character to trace the name of the calling function if an error occurs

Value

an object of class "damaging"

Examples


  model = analyse_model(model = adu_t, stage = c("extract", "damaging"))
#> 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'
#> Computing damage for 'adu_t'...
#> 	... Damaging successfully computed for 'adu_t'
#> End of analysis for 'adu_t'. Total elapsed time 0.67 secs
#> More information availabe at /tmp/R-test/model/adu/adu_t/adu_t.log
  damage = sumup_damaging(model[["damaging"]][["detail"]])


 model = analyse_model(adu_t_basement, stage = c("extract", "damaging"))
#> Extracting building information for 'adu_t_basement'...
#> 	- extracted:
#> 		- parameter
#> 		- storey
#> 		- room
#> 		- wall
#> 		- opening
#> 		- coating
#> 		- furniture
#> 	- missing (not found):
#> 	... Informations successfully extracted for 'adu_t_basement'
#> Computing some values for 'adu_t_basement'...
#> 	... Informations successfully extracted for 'adu_t_basement'
#> Computing damage for 'adu_t_basement'...
#> 	... Damaging successfully computed for 'adu_t_basement'
#> End of analysis for 'adu_t_basement'. Total elapsed time 1.04 secs
#> More information availabe at /tmp/R-test/model/adu/adu_t_basement/adu_t_basement.log
 selection = grepl(
   "external",
   levels(model[["data_table"]][["wall"]][["room"]])
 )
 
 external = split(
   as.character(model[["data_table"]][["wall"]][["wall"]]), 
   model[["data_table"]][["wall"]][["room"]]
 )[selection]
 
 detail_by_room = extract_damage_detail_by_room(
   x = model[["damaging"]][["detail"]], 
   room = levels(model[["data_table"]][["room"]][["room"]])
 )
 
 damage = sumup_damaging(detail_by_room[["external_basement"]])