Skip to content

Commit

Permalink
Add non evacuated energy results deletion (#7)
Browse files Browse the repository at this point in the history
Signed-off-by: Franck LECUYER <franck.lecuyer@rte-france.com>
  • Loading branch information
FranckLecuyer authored Jan 12, 2024
1 parent e3265f5 commit 7deab0c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions constant.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
DYNAMIC_SIMULATION = "DYNAMIC_SIMULATION"
SECURITY_ANALYSIS = "SECURITY_ANALYSIS"
SENSITIVITY_ANALYSIS = "SENSITIVITY_ANALYSIS"
NON_EVACUATED_ENERGY_ANALYSIS = "NON_EVACUATED_ENERGY_ANALYSIS"
SHORTCIRCUIT = "SHORT_CIRCUIT"
VOLTAGE_INIT = "VOLTAGE_INITIALIZATION"

Expand Down
7 changes: 6 additions & 1 deletion delete_computation_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
action="store_true")
parser.add_argument("-ss", "--sensitivity", help="delete all sensitivity analysis results",
action="store_true")
parser.add_argument("-nee", "--nonevacuatedenergy", help="delete all non evacuated energy analysis results",
action="store_true")
parser.add_argument("-sc", "--shortcircuit", help="delete all shortcircuit results",
action="store_true")
parser.add_argument("-vi", "--voltageinit", help="delete all voltage init results",
Expand All @@ -37,10 +39,11 @@
dynamicsimulation = args.dynamicsimulation
security = args.security
sensitivity = args.sensitivity
nonevacuatedenergy = args.nonevacuatedenergy
shortcircuit = args.shortcircuit
voltageinit = args.voltageinit

runAll = not(loadflow or dynamicsimulation or security or sensitivity or shortcircuit or voltageinit)
runAll = not(loadflow or dynamicsimulation or security or sensitivity or nonevacuatedenergy or shortcircuit or voltageinit)

if dry_run:
print("Computation results deletion script will run without deleting anything (test mode)")
Expand All @@ -56,6 +59,8 @@
delete_computation_results(dry_run, constant.SECURITY_ANALYSIS)
if sensitivity or runAll:
delete_computation_results(dry_run, constant.SENSITIVITY_ANALYSIS)
if nonevacuatedenergy or runAll:
delete_computation_results(dry_run, constant.NON_EVACUATED_ENERGY_ANALYSIS)
if shortcircuit or runAll:
delete_computation_results(dry_run, constant.SHORTCIRCUIT)
if voltageinit or runAll:
Expand Down

0 comments on commit 7deab0c

Please sign in to comment.