Skip to contents

Save a model

Usage

save_model(model, verbose = getOption("floodam_building_verbose"))

Arguments

model

model

verbose

logical, default to getOption("floodam_building_verbose")

Value

An object of class "model" with those characteristics

building

list, representation of information stored in the building file

path

list, useful paths to read and write data

file_name

list, useful file names to read and write data

#

Examples


  model_path = list(
    data = system.file("extdata", package = "floodam.building"),
    output = tempdir()
  )
  model = analyse_model(
    model = "adu_t", 
    type = "adu", 
    stage = c("load", "extract", "damaging"), 
    path = model_path
  )
#> Loading model 'adu_t'...
#> 	- Structure of building.xml of 'adu_t' has been successfully checked
#> 	... successful
#> 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 2.21 secs
#> More information availabe at /tmp/RtmpZhomgU/model/adu/adu_t/adu_t.log
#> 
  save_model(model)
#> Saving informations for 'adu_t'...
#> 	- building successesfully saved as xml
#> 	- building successesfully saved as yaml
#> 	- all 'data_table' successesfully saved as csv
#> 	- all 'parameter' successesfully saved as csv
#> 	- all 'value' successesfully saved as csv
#> 	- summarized 'damaging' successesfully saved as csv
#> 	... Informations successfully saved for 'adu_t'