urbanopt-reopt 0.10.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/release.yml +25 -0
- data/.github/workflows/nightly_ci_build.yml +10 -3
- data/CHANGELOG.md +16 -0
- data/Gemfile +1 -1
- data/LICENSE.md +1 -1
- data/RDOC_MAIN.md +19 -19
- data/README.md +20 -20
- data/doc_templates/LICENSE.md +1 -1
- data/doc_templates/copyright_erb.txt +1 -1
- data/docs/README.md +18 -18
- data/docs/package-lock.json +4806 -4836
- data/docs/schemas/reopt-input-schema.md +25 -23
- data/docs/schemas/reopt-output-schema.md +7 -7
- data/index.md +22 -22
- data/lib/urbanopt/reopt/feature_report_adapter.rb +241 -208
- data/lib/urbanopt/reopt/reopt_lite_api.rb +98 -59
- data/lib/urbanopt/reopt/reopt_post_processor.rb +34 -33
- data/lib/urbanopt/reopt/reopt_schema/reopt_input_schema.json +1126 -1106
- data/lib/urbanopt/reopt/reopt_schema/reopt_output_schema.json +449 -524
- data/lib/urbanopt/reopt/scenario/reopt_scenario_csv.rb +7 -7
- data/lib/urbanopt/reopt/scenario_report_adapter.rb +275 -240
- data/lib/urbanopt/reopt/version.rb +1 -1
- data/urbanopt-reopt.gemspec +5 -3
- metadata +35 -8
- data/Jenkinsfile +0 -10
@@ -16,9 +16,9 @@ module URBANopt
|
|
16
16
|
class REoptScenarioCSV < ScenarioCSV
|
17
17
|
##
|
18
18
|
# REoptScenarioCSV is an extension of ScenarioCSV which assigns a Simulation Mapper to each Feature in a FeatureFile using a simple CSV format.
|
19
|
-
# The a \REopt
|
20
|
-
# A REoptScenarioCSV can be instantiated with set of assumptions to use in \REopt
|
21
|
-
# A REoptScenarioCSV is also instantiated with a +reopt_files_dir+ file directory containing all \REopt
|
19
|
+
# The a \REopt enabled CSV file has four columns 1) feature_id, 2) feature_name, 3) mapper_class_name and 4) optional reopt assumptions file name. There is one row for each Feature.
|
20
|
+
# A REoptScenarioCSV can be instantiated with set of assumptions to use in \REopt for an optimization at the aggregated ScenarioReport level.
|
21
|
+
# A REoptScenarioCSV is also instantiated with a +reopt_files_dir+ file directory containing all \REopt assumptions files (required only if the ScenarioReport or its FeatureReports will have specified assumptions).
|
22
22
|
#
|
23
23
|
# [*parameters:*]
|
24
24
|
#
|
@@ -29,8 +29,8 @@ module URBANopt
|
|
29
29
|
# * +mapper_files_dir+ - _String_ - Directory containing all mapper class files containing MapperBase definitions.
|
30
30
|
# * +csv_file+ - _String_ - Path to CSV file assigning a MapperBase class to each feature in feature_file.
|
31
31
|
# * +num_header_rows+ - _String_ - Number of header rows to skip in CSV file.
|
32
|
-
# * +reopt_files_dir+ - _String_ - Path to folder containing default \REopt
|
33
|
-
# * +scenario_reopt_assumptions_file_name+ - _String_ - Name of .json file in the +reopt_files_dir+ location to use in assessing the aggregated ScenarioReport in \REopt
|
32
|
+
# * +reopt_files_dir+ - _String_ - Path to folder containing default \REopt assumptions JSON's.
|
33
|
+
# * +scenario_reopt_assumptions_file_name+ - _String_ - Name of .json file in the +reopt_files_dir+ location to use in assessing the aggregated ScenarioReport in \REopt.
|
34
34
|
##
|
35
35
|
def initialize(name, root_dir, run_dir, feature_file, mapper_files_dir, csv_file, num_header_rows, reopt_files_dir = nil, scenario_reopt_assumptions_file_name = nil)
|
36
36
|
super(name, root_dir, run_dir, feature_file, mapper_files_dir, csv_file, num_header_rows)
|
@@ -66,12 +66,12 @@ module URBANopt
|
|
66
66
|
feature_id = row[0].chomp
|
67
67
|
feature_name = row[1].chomp
|
68
68
|
mapper_class = row[2].chomp
|
69
|
-
# Assume fourth columns, if exists, contains the name of the JSON file in the reopt_files_dir to use when running \REopt
|
69
|
+
# Assume fourth columns, if exists, contains the name of the JSON file in the reopt_files_dir to use when running \REopt for the feature report
|
70
70
|
|
71
71
|
if row.length > 3 && !@reopt_files_dir.nil?
|
72
72
|
@reopt_feature_assumptions[idx - 1] = File.join(@reopt_files_dir, row[3].chomp)
|
73
73
|
end
|
74
|
-
|
74
|
+
|
75
75
|
# gets +features+ from the feature_file.
|
76
76
|
features = []
|
77
77
|
feature = feature_file.get_feature_by_id(feature_id)
|