Open
Conversation
Added a Pelicun conversion method to `input_builder.py`. This commit is not yet functional due to incomplete simulated_damage.json outputs. Changes: - build_simulated_inputs() now searches for DMG_sample.csv as an indicator of Pelicun outputs - convert_pelicun() builds raw inputs using Pelicun outputs. - (hotfix) in build_inputs.py -> build_simulated_inputs(): - check for 'tenant_units' to populate now matches, and for 'story' vice versa - Under # Write in individual dictionaries... Input: - CMP_QNT.csv - DL_summary.csv - DMG_sample.csv - DV_repair_sample.csv - general_inputs.json - input.json Output: - building_model.json - damage_consequences.json - comp_ds_list.csv - comp_population.csv - simulated_damage.json
- Changed file structure to match src/ reorganization - Temporarily handled edge case where `repair_start_day` is all NaN by replacing it with 0.0 - Removed x-lim on recovery plot as it is tied to currently faulty "Full recovery day"
- driver.run_analysis(force_rebuild=True) will now rebuild simulated_inputs.json even if existing file is found.
…o pelicun converter
plotters/main_plot_functionality - Removed plotModel_PBEE_recovery.py (moved under plotters for future archiving) - Added plot_results() function to plotters.main_plot_functionality
- For input_builder.csv, damage for each side (affecting cladding) is randomly assigned a percentage summing up to 1.0 - Separated "tenant_units" and "story" from simulated_damage.json. "Story" now only includes the ["qnt_damaged_dir_n"] keys. Future implementation should consider allowing for side damage to be specified via general_inputs, e.g.
- Set seed occurs earlier to account for randomness in side damage (cladding) assignment
- Fixed overwrite in comp_population.csv to prevent resetting of component quantity if same component is listed multiple times in CMP_QNT.csv
- allow users to specify engineering cost as a fraction of repair cost in general_inputs.json - updated example `general_inputs.json` to reflect this
- removed json typo error - removed edge case NaN handling in other_plot_functions
- Allow users to specify `side_damage_ratio.csv`, an array to split cladding damage by direction - Elevators and stair count can now be overridden from `CMP_QNT.csv` using `general_input.json` - Default action for simultaneous damage state (elevators) is now to turn off the `is_sim_ds` flag without needing a custom `damage_state_attribute_mapping.csv`. Users are warned about simultaneous ds in multiple PGs and are recommended to change component. - Added robustness in cmp-loc-dir-ds metatag detection and reorder appropriately in DMG and DV samples. - doc: Added default and override instructions to README for the above.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Added a Pelicun conversion method to
input_builder.py. All major changes are implemented ininput_builder.convert_pelicun(), and core ATC-138 functions are unmodified.Key Changes
1. Support for Pelicun outputs as input files
input_builder.convert_pelicunwill be called if Pelicun files are found in a model directorybuild_simulated_inputs()now searches for DMG_sample.csv as an indicator of Pelicun outputsforce_rebuild_flagindriver.run_analysis()andcli.pyto allow overriding of existingsimulated_inputsexamples/RCSW_4story_pelicun2. Reorganized plotting module
plotters/main_plot_functionalityp_ganttas an argument to plot realizations other than median3. Hotfixes
build_inputs.py -> build_simulated_inputs(): check fortenant_unitsto populate now matches, and forstoryvice versa (Under# Write in individual dictionaries...)functionality.other_functionality_functions: Fixed typo insys.exit4. Documentation
README.mdto reflect the package changes.HP:comments5. Implementation notes
damage_state_attribute_mapping.csvto overrideis_sim_dsfor elevatorsVerification
RCSW_4story_pelicunexample:Plots generated