Skip to content

Commit 7103742

Browse files
committed
merge small bugs from sapp
1 parent 1c34d09 commit 7103742

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

epm/epm.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
import json
5555
import argparse
5656

57-
from postprocessing.utils import postprocess_output
57+
from postprocessing.utils import postprocess_output, path_to_extract_results
5858
import re
5959
from pathlib import Path
6060
import sys
@@ -1160,7 +1160,7 @@ def main(test_args=None):
11601160

11611161
parser.add_argument(
11621162
"--reduced_output",
1163-
action="store_false",
1163+
action="store_true",
11641164
help="Enable reduced output (default: False)"
11651165
)
11661166

@@ -1295,12 +1295,14 @@ def main(test_args=None):
12951295
folder = args.postprocess
12961296

12971297

1298-
postprocess_output(folder, reduced_output=False, folder='postprocessing',
1298+
postprocess_output(folder, reduced_output=args.reduced_output, folder='postprocessing',
12991299
selected_scenario=args.plot_selected_scenarios, plot_dispatch=args.plot_dispatch,
13001300
graphs_folder=args.graphs_folder, montecarlo=args.montecarlo, reduce_definition_csv=True)
13011301

13021302
# Zip the folder if it exists
1303+
folder = path_to_extract_results(folder)
13031304
if args.output_zip and folder and os.path.exists(folder):
1305+
print(f"Compressing results folder {folder}")
13041306
zip_path = folder + '.zip'
13051307
shutil.make_archive(folder, 'zip', folder)
13061308
shutil.rmtree(folder) # Remove the original folder

epm/generate_report.gms

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -928,6 +928,7 @@ pZonesperCountry(c) = sum(zcmap(z,c), 1);
928928
MaxZonesperCountry = smax(c,pZonesperCountry(c));
929929

930930
$if not set OUTPUT_DIR $set OUTPUT_DIR output_csv
931+
* create output directory
931932

932933
*$call /bin/sh -c "mkdir -p '%OUTPUT_DIR%'"
933934

@@ -960,9 +961,11 @@ embeddedCode Connect:
960961
"pEnergyByFuelCountry",
961962
"pEnergyMix",
962963
"pDemandSupply",
964+
"pDemandSupplySeason",
963965
"pInterchange",
964966
"pInterconUtilization",
965967
"pInterchangeCountry",
968+
"pCongested",
966969
"pCapacityPlan",
967970
"pCapacityByFuel",
968971
"pCapacityByFuelCountry",

0 commit comments

Comments
 (0)