Skip to content

Commit

Permalink
When simulation error, stop the simulation without removing fictive a…
Browse files Browse the repository at this point in the history
…reas
  • Loading branch information
PPlessiez committed Nov 23, 2022
1 parent 33a4676 commit 2dbcaec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/runWaterValuesSimulation.R
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 203,7 @@ runWaterValuesSimulation <- function(area,

if(launch_simulations){
if(!dir.exists(paste0(sim_check,"/economy/mc-all"))) {
stop("Simulation Error. Please check simulation log.")
# remove the fictive area
if(launch_simulations){
for (fictive_area in fictive_areas){
Expand All @@ -212,7 213,6 @@ runWaterValuesSimulation <- function(area,
# restore hydrostorage
restoreHydroStorage(area = area, opts = opts)
restorePumpPower(area = area, opts = opts)
stop("Simulation Error. Please check simulation log.")
}
}
}
Expand Down

0 comments on commit 2dbcaec

Please sign in to comment.