Changelog
floodam.building 1.6.0.0
In this version of the library, the hydraulic module has been rewritten entirely in R and Rcpp. The goal is to enhance the coherence of the code and make it more flexible for futur updates. All python dependencies have been removed.
Enhancements
-
analyse_hydraulic()
- New function that sets up new hydraulic module written in R
-
compute_hydraulic()
(internal)- New hydraulic module written in R, faster and more optimised than the previous Python hydraulic module.
-
compute_exchange()
(internal)- New function allowing flow rate computations written in pure R.
-
rcpp_compute_exchange()
(internal)- New function allowing flow rate computations written in Rcpp. It has a faster running time than it’s R counter part
compute_exchange()
.
- New function allowing flow rate computations written in Rcpp. It has a faster running time than it’s R counter part
-
generate_limnigraph()
- The limnigraph now has to be ordered by externals, and the externals have to be specified.
-
update_path()
-
model_output_hydraulic
added to save hydraulic outputs.
-
- dependency of
reticulate
library removed - function
manage_python()
removed - module
hydraulic_module.py
removed - function
analyse_hydraulics()
removed - function
.onAttach()
removed - package global variable floodam_building_py removed
- Test is_compatible_python removed
floodam.building 1.5.0.3
Bugs
-
order_wall()
(internal)- Could not deal external with many walls (more than 26). Now it can. Start the 27th to AA and so on up to ZZ. Model can have external with 702 walls now.
-
compute_damage_detail()
(internal)- Information on room and storey were discarded for ceiling before being passed to adjust_dam_by_component. And so
distrib_by_room()
could not affect ceiling components to the good room.
- Information on room and storey were discarded for ceiling before being passed to adjust_dam_by_component. And so
floodam.building 1.5.0.0
Enhancements
-
adjust_elementary_damaging()
-
stop()
sequence when checking parameter damaging removed. Now the function returns NULL if parameter damaging is NULL, allowing the estimate of the building’s damage function ignoring missing elementary components
-
-
compute_damage()
- use of
message()
instead ofcat()
forverbose
ortalkative
mode - new management of missing elementary component:
- if some elementary components ar missing (i.e. are not present in
DAM
), thencompute_damage()
does not return NULL. It continues the calculation, consistent with new behavior ofadjust_elementary_damaging()
. - a message and a warning are sent to inform the user that the estimation will be done ignoring those elementary components.
- if some elementary components ar missing (i.e. are not present in
- use of
-
check_damaging()
- Modified warning message, consistent with new behavior of
adjust_elementary_damaging()
- Modified log message, consistent with new behavior of
adjust_elementary_damaging()
- variable missing renamed to missing_component to avoid confusion with the
base::missing()
function
- Modified warning message, consistent with new behavior of
-
load_model()
- no use of
options(warn)
to be better tested withtestthat::expect_warning()
- no use of
-
order_wall()
- no use of
options(warn)
to be better tested withtestthat::expect_warning()
- no use of
-
to_numeric()
(internal)- extracted from
loead_model()
, to deal with ‘clever’ transformation from character to numeric - test added
- extracted from
-
remove_comment()
(internal)- extracted from
loead_model()
, to deal with removal of comments when reading xml files - test to be added
- extracted from
floodam.building 1.4.1.0
Data
- New model dwelling available as package data
- New model available in inst/extdata:
- adu_t_bassement is two storey dwelling composed of a single-room basement and a 4-room ground floor (3 rooms around a central room)
- Furniture included in models adu_t and adu_t_basement
floodam.building 1.4.0.2
Bugs
-
load_model()
- keep only one category of elementary components when too many are found and generate a warning
-
COMPONENT_ELEMENTARY
- keep only one category for activities’ elementary components
-
analyse_hydraulics()
- adapt to reticulate’s strange way of calling attribute
floodam.building 1.4.0.1
Enhancements
-
create_new_model()
- New metadata value for the input_file parameter to generate, from an internal template, the metadata file to be inputted
floodam.building 1.3.2.0
Enhancements
-
analyse_hydraulics()
- The function now executes the hydraulic module of floodam.building in either the default python virtual environment “floodam” or in a user-defined python virtual environment, provided using the new parameter
envname
.
- The function now executes the hydraulic module of floodam.building in either the default python virtual environment “floodam” or in a user-defined python virtual environment, provided using the new parameter
-
manage_python()
- Function to manage the installation of python dependencies needed by the hydraulic module of floodam.building. It creates a virtual environment to avoid system pollution or dependency conflicts.
-
compatible_python()
(internal)- Internal function that checks whether Python 3 is installed
-
py_simulate_hydraulics()
(internal)- replace
sim_hydrau_py()
- execute the hydraulic module of floodam.building in either the default python virtual environment, “floodam”, or in a user-defined python virtual environment, provided using the new parameter
envname
.
- replace
-
plot.damaging()
- Finalization of snake_case transformation for internal functions.
-
plot.model()
- Finalization of snake_case transformation for internal functions.
floodam.building 1.3.1.1
Bugs
-
compute_damage()
- Solved bug provoking error when function called from function apply_measure()
-
create_new_model()
- export added
floodam.building 1.3.1.0
Enhancements
-
create_new_model()
- Function to generate template for new model
floodam.building 1.3.0.0
Enhancements
-
analyse_hydraulics()
- Function to simulate the hydraulics in the interior of the building
-
analyse_model()
- New stage “hydraulic”
-
extract_hydraulic_input()
- Function called by
analyse_model()
to generate input on exchanges through openings - Called when “hydraulic” is given as
stage
- Function called by
-
generate_limnigraph()
- Function to generate limnigraph (evolution of water depth against time)
- New global variables (input needed by hydraulic simulator)
-
floodam_building_hydraulic_discharge_coefficient
, default value 0.42 -
floodam_building_hydraulic_initial_water_depth_interior
default value 0 -
floodam_building_hydraulic_closed_opening_clearance
default value 0.5
-
- New optional tags in XML input to facilitate the identification of water exchanges through openings and empty walls
- opening names
- wall names
Data
- dwelling models in inst/extdata:
- adu_l is a single storey linear 4-room dwelling
- adu_t is a single storey 4-room dwelling; 3 rooms around a central room
- adu_t_2room is a single storey 2-room dwelling; created by merging rooms in adu_t
- adu_t_invisible is similar to adu_t_2room but instead of merged, rooms are separated by invisible walls