Skip to content
Snippets Groups Projects
Commit 4d8db17e authored by David Klein's avatar David Klein
Browse files

Bugfixes:

* Enable prepare_and_run.R to restart fixed runs (https://github.com/remindmodel/remind/issues/112)
* Enable start.R to restart non-optimal runs
parent 4492f09d
No related branches found
No related tags found
1 merge request!136Fix bugs in start scripts
......@@ -597,6 +597,18 @@ run <- function(start_subsequent_runs = TRUE) {
# Save start time
timeGAMSStart <- Sys.time()
# De-compress finxing files if they have already been zipped (only valid if run is restarted)
if (cfg$gms$cm_startyear > 2005) {
if (file.exists("levs.gms.gz")) {
cat("Unzip fixing files\n")
system("gzip -d -f levs.gms.gz margs.gms.gz fixings.gms.gz")
} else if (file.exists("levs.gms")) {
cat("Found unzipped fixing files. Using them.\n")
} else {
stop("cm_startyear > 2005 but no fixing files found, neither zipped or unzipped.")
}
}
# Print message
cat("\nStarting REMIND...\n")
......
......@@ -44,10 +44,10 @@ get_line <- function(){
choose_folder <- function(folder,title="Please choose a folder") {
dirs <- NULL
# Detect all output folders containing fulldata.gdx
# Detect all output folders containing fulldata.gdx or non_optimal.gdx
# For coupled runs please use the outcommented text block below
dirs <- sub("/fulldata.gdx","",sub("./output/","",Sys.glob(file.path(folder,"*","fulldata.gdx"))))
dirs <- sub("/(non_optimal|fulldata).gdx","",sub("./output/","",Sys.glob(c(file.path(folder,"*","non_optimal.gdx"),file.path(folder,"*","fulldata.gdx")))))
# DK: The following outcommented lines are specially made for listing results of coupled runs
#runs <- findCoupledruns(folder)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment