
Write files for a generated model
write_model_generated.Rdwrite_model_generated() exports a building model structure to a YAML file
and, if available, its associated furniture to a CSV file.
Arguments
- output_path
character(1), directory path where
building.yamlandfurniture.csvwill be written.- model
list, a building model object (generated by
generate_model()) containing astructureelement, or the raw structure itself. May also contain afurnitureelement.- furniture
data.frame, optional furniture description. If missing, the function attempts to extract it from
model[["furniture"]].
Details
The function extracts the structural component from model (checking for
a $structure entry first) and serializes it to building.yaml via
yaml::write_yaml().
If a furniture table is supplied directly or found inside model, it is
exported to furniture.csv using utils::write.csv() with row.names = FALSE
and quote = FALSE. If neither is present, no CSV file is created.