Skip to content

Commit

Permalink
updates outputs files used for checking substation model
Browse files Browse the repository at this point in the history
  • Loading branch information
marufr committed Dec 16, 2024
1 parent eb839a3 commit 14b998d
Show file tree
Hide file tree
Showing 12 changed files with 327 additions and 373 deletions.
60 changes: 7 additions & 53 deletions .github/workflows/build-test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@ on:
jobs:

tests:
name: "Tests on ${{ matrix.os }} Python ${{ matrix.python-version }}"
runs-on: "${{ matrix.os }}"
name: "Build and test for Python ${{ matrix.python-version }}"
runs-on: ubuntu-latest

strategy:
matrix:
os:
- ubuntu-latest
python-version:
- "3.11"

Expand All @@ -34,7 +32,7 @@ jobs:
libpng
cache-environment: true

- name: Install uv and requirements
- name: Install env requirements
shell: bash -l {0}
run: |
micromamba activate sira_env
Expand All @@ -48,55 +46,11 @@ jobs:
pytest
- name: Upload coverage data
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
with:
name: coverage-data-${{ matrix.python-version }}
name: coverage-data
path: .coverage.*
overwrite: true
include-hidden-files: true
if-no-files-found: ignore

coverage:
name: Coverage
needs: tests
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install the latest version of uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"
if-no-files-found: warn

- name: Install dependencies
run: |
python -m pip install tox tox-gh-actions
- name: Download coverage data
uses: actions/download-artifact@v4
with:
pattern: coverage-data-*

- name: Combine coverage
run: |
python -Im pip install --upgrade coverage[toml]
python -Im coverage combine
python -Im coverage html --skip-covered --skip-empty
python -Im coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
python -m tox -e coverage
export TOTAL=$(python -c "import json;print(json.load(open('coverage.json'))['totals']['percent_covered_display'])")
echo "total=$TOTAL" >> $GITHUB_ENV
echo "### Total coverage: ${TOTAL}%" >> $GITHUB_STEP_SUMMARY
- name: Upload HTML report if check had failed
uses: actions/upload-artifact@v4
with:
name: html-report
path: htmlcov
if: ${{ failure() }}
Binary file not shown.
108 changes: 54 additions & 54 deletions tests/models/substation_66kv/output_array_ssx/component_response.csv

Large diffs are not rendered by default.

238 changes: 119 additions & 119 deletions tests/models/substation_66kv/output_array_ssx/comptype_response.csv

Large diffs are not rendered by default.

106 changes: 53 additions & 53 deletions tests/models/substation_66kv/output_array_ssx/log.txt
Original file line number Diff line number Diff line change
@@ -1,64 +1,64 @@
2024-12-09 10:28:56,361,361.0 - INFO [__main__:190] Simulation initiated at: 2024-12-09 10:28:56
2024-12-10 12:24:54,633,633.0 - INFO [__main__:190] Simulation initiated at: 2024-12-10 12:24:54

2024-12-09 10:28:56,362,362.0 - INFO [sira.simulation:184] Initiating calculation of component damage states for hazard event set.
2024-12-09 10:28:56,362,362.0 - INFO [sira.simulation:190] Starting parallel run
2024-12-09 10:28:56,363,363.0 - INFO [sira.simulation:212] Allocating 41 chunks across 8 processes
2024-12-09 10:29:11,425,425.0 - INFO [sira.simulation:236] Completed parallel run
2024-12-09 10:29:11,437,437.0 - INFO [sira.infrastructure_response:407] Writing component type response to:
2024-12-10 12:24:54,634,634.0 - INFO [sira.simulation:184] Initiating calculation of component damage states for hazard event set.
2024-12-10 12:24:54,634,634.0 - INFO [sira.simulation:190] Starting parallel run
2024-12-10 12:24:54,635,635.0 - INFO [sira.simulation:212] Allocating 41 chunks across 8 processes
2024-12-10 12:25:11,729,729.0 - INFO [sira.simulation:236] Completed parallel run
2024-12-10 12:25:11,741,741.0 - INFO [sira.infrastructure_response:407] Writing component type response to:
 C:/code/sira/tests/models/substation_66kv/output_array_ssx
/comptype_response.csv
2024-12-09 10:29:11,451,451.0 - INFO [sira.infrastructure_response:410] Done.
2024-12-10 12:25:11,763,763.0 - INFO [sira.infrastructure_response:410] Done.

2024-12-09 10:29:11,476,476.0 - INFO [sira.infrastructure_response:438]
2024-12-10 12:25:11,809,809.0 - INFO [sira.infrastructure_response:438]
Writing component hazard response data to:
 C:/code/sira/tests/models/substation_66kv/output_array_ssx
/component_response.csv
2024-12-09 10:29:11,507,507.0 - INFO [sira.infrastructure_response:441] Done.
2024-12-10 12:25:11,847,847.0 - INFO [sira.infrastructure_response:441] Done.

2024-12-09 10:29:11,507,507.0 - INFO [sira.infrastructure_response:457] Collating data output line capacities of system ...
2024-12-09 10:29:11,524,524.0 - INFO [sira.infrastructure_response:481] Writing system line capacity data to:
2024-12-10 12:25:11,848,848.0 - INFO [sira.infrastructure_response:457] Collating data output line capacities of system ...
2024-12-10 12:25:11,868,868.0 - INFO [sira.infrastructure_response:481] Writing system line capacity data to:
 C:/code/sira/tests/models/substation_66kv/output_array_ssx
/system_output_vs_hazard_intensity.csv
2024-12-09 10:29:11,526,526.0 - INFO [sira.infrastructure_response:485] Done.
2024-12-10 12:25:11,870,870.0 - INFO [sira.infrastructure_response:485] Done.

2024-12-09 10:29:11,526,526.0 - INFO [sira.infrastructure_response:492] Collating data on system loss and output ...
2024-12-09 10:29:11,528,528.0 - INFO [sira.infrastructure_response:512] Done.
2024-12-10 12:25:11,870,870.0 - INFO [sira.infrastructure_response:492] Collating data on system loss and output ...
2024-12-10 12:25:11,873,873.0 - INFO [sira.infrastructure_response:512] Done.

2024-12-09 10:29:11,528,528.0 - INFO [sira.infrastructure_response:526] Calculating system recovery information ...
2024-12-09 10:29:11,528,528.0 - INFO [sira.infrastructure_response:292] Processing 121 events in 1 chunks of 121
2024-12-10 12:25:11,874,874.0 - INFO [sira.infrastructure_response:526] Calculating system recovery information ...
2024-12-10 12:25:11,874,874.0 - INFO [sira.infrastructure_response:292] Processing 121 events in 1 chunks of 121

2024-12-09 10:29:37,273,273.0 - INFO [sira.infrastructure_response:560] Writing system hazard response data to:
2024-12-10 12:25:40,535,535.0 - INFO [sira.infrastructure_response:560] Writing system hazard response data to:
 C:/code/sira/tests/models/substation_66kv/output_array_ssx
/system_response.csv
2024-12-09 10:29:37,276,276.0 - INFO [sira.infrastructure_response:563] Done.
2024-12-10 12:25:40,542,542.0 - INFO [sira.infrastructure_response:563] Done.

2024-12-09 10:29:37,284,284.0 - INFO [sira.infrastructure_response:318]
2024-12-10 12:25:40,562,562.0 - INFO [sira.infrastructure_response:318]
Calculating summary stats for system loss...
2024-12-09 10:29:38,403,403.0 - INFO [sira.infrastructure_response:334]
2024-12-10 12:25:41,871,871.0 - INFO [sira.infrastructure_response:334]
Calculating summary stats for system output...
2024-12-09 10:29:39,495,495.0 - INFO [sira.infrastructure_response:350]
2024-12-10 12:25:43,038,38.0 - INFO [sira.infrastructure_response:350]
Calculating summary stats for system recovery...
2024-12-09 10:29:40,643,643.0 - INFO [sira.infrastructure_response:588]
2024-12-10 12:25:44,181,181.0 - INFO [sira.infrastructure_response:588]
Calculating correlations between loss & output...
2024-12-09 10:29:44,060,60.0 - INFO [sira.infrastructure_response:714] Writing prob of exceedance data to:
2024-12-10 12:25:48,045,45.0 - INFO [sira.infrastructure_response:714] Writing prob of exceedance data to:
 C:/code/sira/tests/models/substation_66kv/output_array_ssx/RAW_OUTPUT
/pe_sys_econloss.npy
2024-12-09 10:29:44,062,62.0 - INFO [sira.infrastructure_response:717] Done.
2024-12-10 12:25:48,047,47.0 - INFO [sira.infrastructure_response:717] Done.

2024-12-09 10:29:44,065,65.0 - INFO [__main__:222] Hazard impact simulation completed...
2024-12-09 10:29:44,066,66.0 - INFO [__main__:227] Attempting to draw system topology ...
2024-12-09 10:29:44,099,99.0 - INFO [sira.modelling.system_topology:555] Drawing schematic of Electric Substation Topology using `dot` ...
2024-12-09 10:29:48,891,891.0 - INFO [sira.modelling.system_topology:583] Done!
2024-12-09 10:29:48,892,892.0 - INFO [sira.modelling.system_topology:585] Drawing schematic of Electric Substation Topology using `neato` ...
2024-12-09 10:29:56,436,436.0 - INFO [sira.modelling.system_topology:606] Done!
2024-12-09 10:29:56,436,436.0 - INFO [__main__:264] Initiating model fitting for simulated system fragility data...
2024-12-09 10:29:56,450,450.0 - INFO [__main__:273] Infrastructure type: Substation
2024-12-09 10:29:56,450,450.0 - INFO [__main__:274] System Limit States: ['DS0 None', 'DS1 Minor', 'DS2 Extensive', 'DS3 Complete']
2024-12-09 10:29:56,450,450.0 - INFO [__main__:275] System Limit State Bounds: [0.05, 0.4, 0.7, 1.0]
2024-12-09 10:29:56,452,452.0 - INFO [sira.fit_model:282] Fitting system FRAGILITY data...
2024-12-09 10:29:56,489,489.0 - INFO [sira.fit_model:625] 
2024-12-10 12:25:48,052,52.0 - INFO [__main__:222] Hazard impact simulation completed...
2024-12-10 12:25:48,052,52.0 - INFO [__main__:227] Attempting to draw system topology ...
2024-12-10 12:25:48,087,87.0 - INFO [sira.modelling.system_topology:555] Drawing schematic of Electric Substation Topology using `dot` ...
2024-12-10 12:25:52,559,559.0 - INFO [sira.modelling.system_topology:583] Done!
2024-12-10 12:25:52,559,559.0 - INFO [sira.modelling.system_topology:585] Drawing schematic of Electric Substation Topology using `neato` ...
2024-12-10 12:26:00,202,202.0 - INFO [sira.modelling.system_topology:606] Done!
2024-12-10 12:26:00,203,203.0 - INFO [__main__:264] Initiating model fitting for simulated system fragility data...
2024-12-10 12:26:00,210,210.0 - INFO [__main__:273] Infrastructure type: Substation
2024-12-10 12:26:00,210,210.0 - INFO [__main__:274] System Limit States: ['DS0 None', 'DS1 Minor', 'DS2 Extensive', 'DS3 Complete']
2024-12-10 12:26:00,211,211.0 - INFO [__main__:275] System Limit State Bounds: [0.05, 0.4, 0.7, 1.0]
2024-12-10 12:26:00,212,212.0 - INFO [sira.fit_model:282] Fitting system FRAGILITY data...
2024-12-10 12:26:00,238,238.0 - INFO [sira.fit_model:625] 
Checking for crossover [ THRESHOLD = 0.005 ]
2024-12-09 10:29:56,492,492.0 - INFO [sira.fit_model:326]
2024-12-10 12:26:00,240,240.0 - INFO [sira.fit_model:326]
================================================================================

Set of Fitted Models:
Expand Down Expand Up @@ -105,29 +105,29 @@ Checking for crossover [ THRESHOLD = 0.005 ]

--------------------------------------------------------------------------------

2024-12-09 10:29:58,557,557.0 - INFO [__main__:287] Model fitting complete.
2024-12-09 10:29:58,558,558.0 - INFO [__main__:297] Calculating system loss metrics...
2024-12-09 10:29:58,558,558.0 - INFO [sira.loss_analysis:1806] Initiating : SCENARIO LOSS ANALYSIS
2024-12-10 12:26:02,101,101.0 - INFO [__main__:287] Model fitting complete.
2024-12-10 12:26:02,101,101.0 - INFO [__main__:297] Calculating system loss metrics...
2024-12-10 12:26:02,103,103.0 - INFO [sira.loss_analysis:1806] Initiating : SCENARIO LOSS ANALYSIS

2024-12-09 10:29:58,636,636.0 - INFO [sira.loss_analysis:1941] Running analysis for scenario_header: 0.030
2024-12-10 12:26:02,176,176.0 - INFO [sira.loss_analysis:1941] Running analysis for scenario_header: 0.030

2024-12-09 10:30:00,754,754.0 - WARNING [sira.loss_analysis:770] 
2024-12-10 12:26:03,972,972.0 - WARNING [sira.loss_analysis:770] 
Found nodes without recovery times that are not in uncosted list:
{'BUS_RTX22_SEC-D', 'BUS_RTX22_PRI-B', 'BUS_RTX22_PRI-A', 'CB_RTX108_0', 'LA_RTX207', 'BUS_RTX22_SEC-A', 'DS_RTX110_4', 'CB_RTX103_0', 'DS_RTX104_4', 'CTRL_BLDG', 'DS_RTX103_8', 'DS_RTX108_5', 'CB_RTX102_0', 'DS_RTX206_4', 'VT_RTX104', 'DS_RTX201_4', 'PTX_66-22KV_T1', 'DS_RTX105_5', 'BUS_RTX22_SEC-B', 'CT_RTX102', 'DS_RTX108_4', 'DS_RTX203_4', 'CB_RTX201_0', 'DS_RTX109_4', 'PTX_66-22KV_T3', 'BUS_RTX66_A', 'DS_RTX102_5', 'DS_RTX206_5', 'DS_RTX105_8', 'DS_RTX108_8', 'DS_RTX202_4', 'CT_RTX105', 'DS_RTX103_5', 'BUS_RTX66_B', 'BUS_RTX66_C', 'CTRL_EQP_BATTERY', 'DS_RTX102_4', 'LA_RTX202', 'DS_RTX106_4', 'BUS_RTX22_PRI-C', 'DS_RTX207_4', 'BUS_RTX22_SEC-C', 'VT_RTX110', 'DS_RTX105_4', 'DS_RTX201_5', 'CT_RTX103', 'CTRL_EQP', 'DS_RTX103_4', 'DS_RTX205_4', 'VT_RTX206', 'TX_STN22', 'CB_RTX206_0', 'CT_RTX108', 'VT_RTX201', 'CB_RTX105_0'}
{'CB_RTX201_0', 'BUS_RTX22_SEC-C', 'CTRL_BLDG', 'CT_RTX105', 'DS_RTX202_4', 'DS_RTX207_4', 'DS_RTX103_5', 'DS_RTX105_4', 'LA_RTX202', 'BUS_RTX22_PRI-A', 'CB_RTX105_0', 'CB_RTX103_0', 'CT_RTX108', 'DS_RTX103_8', 'BUS_RTX66_A', 'CTRL_EQP', 'DS_RTX102_5', 'DS_RTX109_4', 'CT_RTX102', 'CT_RTX103', 'BUS_RTX22_SEC-D', 'DS_RTX106_4', 'BUS_RTX66_B', 'DS_RTX206_4', 'PTX_66-22KV_T1', 'PTX_66-22KV_T3', 'DS_RTX103_4', 'DS_RTX110_4', 'CB_RTX102_0', 'DS_RTX102_4', 'DS_RTX104_4', 'DS_RTX105_5', 'DS_RTX205_4', 'DS_RTX108_8', 'BUS_RTX22_SEC-A', 'VT_RTX110', 'DS_RTX108_4', 'VT_RTX201', 'DS_RTX105_8', 'DS_RTX108_5', 'DS_RTX203_4', 'DS_RTX201_5', 'CB_RTX108_0', 'CB_RTX206_0', 'DS_RTX206_5', 'DS_RTX201_4', 'BUS_RTX22_SEC-B', 'BUS_RTX22_PRI-B', 'BUS_RTX22_PRI-C', 'LA_RTX207', 'VT_RTX206', 'TX_STN22', 'VT_RTX104', 'BUS_RTX66_C', 'CTRL_EQP_BATTERY'}

2024-12-09 10:30:00,797,797.0 - INFO [sira.loss_analysis:1941] Running analysis for scenario_header: 0.600
2024-12-10 12:26:04,006,6.0 - INFO [sira.loss_analysis:1941] Running analysis for scenario_header: 0.600

2024-12-09 10:30:02,718,718.0 - WARNING [sira.loss_analysis:770] 
2024-12-10 12:26:06,033,33.0 - WARNING [sira.loss_analysis:770] 
Found nodes without recovery times that are not in uncosted list:
{'VT_RTX104', 'BUS_RTX22_PRI-A', 'BUS_RTX66_B', 'CB_RTX108_0', 'CTRL_BLDG', 'BUS_RTX22_SEC-A', 'BUS_RTX22_SEC-B', 'VT_RTX206', 'BUS_RTX22_PRI-C', 'CB_RTX206_0', 'CB_RTX102_0', 'VT_RTX110', 'CT_RTX108', 'CB_RTX105_0', 'CT_RTX105'}
{'CB_RTX105_0', 'CTRL_BLDG', 'CB_RTX102_0', 'CT_RTX105', 'CT_RTX108', 'CB_RTX108_0', 'CB_RTX206_0', 'BUS_RTX22_SEC-B', 'BUS_RTX22_SEC-A', 'VT_RTX110', 'BUS_RTX22_PRI-C', 'VT_RTX206', 'VT_RTX104', 'BUS_RTX66_B', 'BUS_RTX22_PRI-A'}

2024-12-09 10:30:05,925,925.0 - INFO [sira.loss_analysis:2050] End: SCENARIO LOSS ANALYSIS
2024-12-09 10:30:05,926,926.0 - INFO [__main__:316] RUN COMPLETE.
2024-12-09 10:30:05,926,926.0 - INFO [__main__:322] Config file name : config_ss_66kv.json
2024-12-09 10:30:05,926,926.0 - INFO [__main__:323] Model file name : model_ss_66kv.json
2024-12-09 10:30:05,926,926.0 - INFO [__main__:330] Outputs saved in :
2024-12-10 12:26:09,447,447.0 - INFO [sira.loss_analysis:2050] End: SCENARIO LOSS ANALYSIS
2024-12-10 12:26:09,447,447.0 - INFO [__main__:316] RUN COMPLETE.
2024-12-10 12:26:09,447,447.0 - INFO [__main__:322] Config file name : config_ss_66kv.json
2024-12-10 12:26:09,447,447.0 - INFO [__main__:323] Model file name : model_ss_66kv.json
2024-12-10 12:26:09,447,447.0 - INFO [__main__:330] Outputs saved in :
C:/code/sira/tests/models/substation_66kv/output_array_ssx

2024-12-09 10:30:05,927,927.0 - INFO [__main__:336] Simulation completed at : 2024-12-09 10:30:05
2024-12-09 10:30:05,927,927.0 - INFO [__main__:339] Run time : 0:01:09.566632
2024-12-10 12:26:09,448,448.0 - INFO [__main__:336] Simulation completed at : 2024-12-10 12:26:09
2024-12-10 12:26:09,448,448.0 - INFO [__main__:339] Run time : 0:01:14.817806

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
,Loss,Output,Recovery Time
Mean,0.6724938361566793,0.13727272727272727,148.34710743801654
Std,0.37779681315922825,0.31242532441102355,70.47206429309438
Mean,0.6724938361566793,0.13727272727272727,148.28925619834712
Std,0.37779681315922825,0.3124253244110235,70.20214123236424
Min,0.0,0.0,0.0
Max,1.1206996621926995,1.0,226.0
Max,1.1206996621926995,1.0,225.0
Median,0.7594530365326501,0.0,186.0
Q1,0.34903318294889996,0.0,80.25
Q3,1.0152643416621001,0.0,200.0
Q1,0.2782013495858,0.0,103.0
Q3,1.0168908882865997,0.1,200.0
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"Loss":{"Mean":0.6724938362,"Std":0.3777968132,"Min":0.0,"Max":1.1206996622,"Median":0.7594530365,"Q1":0.3490331829,"Q3":1.0152643417},"Output":{"Mean":0.1372727273,"Std":0.3124253244,"Min":0.0,"Max":1.0,"Median":0.0,"Q1":0.0,"Q3":0.0},"Recovery Time":{"Mean":148.347107438,"Std":70.4720642931,"Min":0.0,"Max":226.0,"Median":186.0,"Q1":80.25,"Q3":200.0}}
{"Loss":{"Mean":0.6724938362,"Std":0.3777968132,"Min":0.0,"Max":1.1206996622,"Median":0.7594530365,"Q1":0.2782013496,"Q3":1.0168908883},"Output":{"Mean":0.1372727273,"Std":0.3124253244,"Min":0.0,"Max":1.0,"Median":0.0,"Q1":0.0,"Q3":0.1},"Recovery Time":{"Mean":148.2892561983,"Std":70.2021412324,"Min":0.0,"Max":225.0,"Median":186.0,"Q1":103.0,"Q3":200.0}}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 14b998d

Please sign in to comment.