Author Topic: Rerunning DL in Working Directory  (Read 4642 times)

mlochhead

  • Newbie
  • *
  • Posts: 11
    • View Profile
Rerunning DL in Working Directory
« on: August 31, 2023, 06:44:18 PM »
Is there a way to rerun just the Damage and Loss portion of the R2D workflow within the working directory? I set up all my inputs in the GUI, ran once, and want to keep rerunning the DL portion of the analysis for debugging purposes, without going through the entire workflow every time. Let me know!

jyzhao

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: Rerunning DL in Working Directory
« Reply #1 on: August 31, 2023, 06:55:06 PM »
In the program output panel, after running R2D, there are commands to run the DL calculation, e.g.,
"
11:47:03 Running damage and loss assessment
         Damage and loss assessment command (1):

"/Library/Frameworks/Python.framework/Versions/3.9/bin/python3" "/Applications/R2D.app/Contents/MacOS/applications/performDL/pelicun/DL_calculation.py" "--filenameDL" "/Users/user/Documents/R2D/LocalWorkDir/tmp.SimCenter/Results/Buildings/8001-AIM.json" "--demandFile" "response.csv" "--DL_Method" "HAZUS MH EQ IM" "--Realizations" "100" "--coupled_EDP" "True" "--detailed_results" "False" "--event_time" "off" "--ground_failure" "False" "--log_file" "True" "--resource_dir" "/Users/user/Documents/R2D/LocalWorkDir/tmp.SimCenter/Results" "--dirnameOutput" "/Users/user/Documents/R2D/LocalWorkDir/tmp.SimCenter/Results/Buildings/8001"
"
The command performs DL calculations for one asset, and you may have to create a script to call this command for each asset. Also, you may need to pass the full file path of "response.csv" for the "--demandFile".

For debugging, it may be helpful to set up the above Python command in a python debugger.

Hope this helps.

Jinyan
« Last Edit: August 31, 2023, 07:02:09 PM by jyzhao »

canceltechnical

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Rerunning DL in Working Directory
« Reply #2 on: September 13, 2023, 07:45:57 AM »
Hi jyzhao,
Your sharing is very useful. Nice day!


spreadcarved

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Rerunning DL in Working Directory
« Reply #3 on: October 09, 2023, 07:43:15 AM »
In the program output panel, after running R2D, there are commands to run the DL calculation, e.g.,
"
11:47:03 Running damage and loss assessment
         Damage and loss assessment command (1): baldi's basics

"/Library/Frameworks/Python.framework/Versions/3.9/bin/python3" "/Applications/R2D.app/Contents/MacOS/applications/performDL/pelicun/DL_calculation.py" "--filenameDL" "/Users/user/Documents/R2D/LocalWorkDir/tmp.SimCenter/Results/Buildings/8001-AIM.json" "--demandFile" "response.csv" "--DL_Method" "HAZUS MH EQ IM" "--Realizations" "100" "--coupled_EDP" "True" "--detailed_results" "False" "--event_time" "off" "--ground_failure" "False" "--log_file" "True" "--resource_dir" "/Users/user/Documents/R2D/LocalWorkDir/tmp.SimCenter/Results" "--dirnameOutput" "/Users/user/Documents/R2D/LocalWorkDir/tmp.SimCenter/Results/Buildings/8001"
"
The command performs DL calculations for one asset, and you may have to create a script to call this command for each asset. Also, you may need to pass the full file path of "response.csv" for the "--demandFile".

For debugging, it may be helpful to set up the above Python command in a python debugger.

Hope this helps.

Jinyan
it's useful for me. Thank.