urbanopt-scenario 0.9.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/nightly_ci_build.yml +36 -0
- data/CHANGELOG.md +19 -0
- data/Gemfile +3 -3
- data/LICENSE.md +16 -11
- data/README.md +6 -2
- data/Rakefile +3 -38
- data/doc_templates/LICENSE.md +16 -11
- data/doc_templates/copyright_erb.txt +45 -39
- data/doc_templates/copyright_js.txt +2 -2
- data/doc_templates/copyright_ruby.txt +2 -37
- data/docs/package-lock.json +4405 -4750
- data/lib/urbanopt/scenario/default_reports.rb +2 -37
- data/lib/urbanopt/scenario/extension.rb +2 -37
- data/lib/urbanopt/scenario/logger.rb +2 -37
- data/lib/urbanopt/scenario/scenario_base.rb +2 -37
- data/lib/urbanopt/scenario/scenario_csv.rb +2 -37
- data/lib/urbanopt/scenario/scenario_datapoint_base.rb +2 -37
- data/lib/urbanopt/scenario/scenario_post_processor_base.rb +2 -37
- data/lib/urbanopt/scenario/scenario_post_processor_default.rb +2 -37
- data/lib/urbanopt/scenario/scenario_post_processor_disco.rb +101 -145
- data/lib/urbanopt/scenario/scenario_post_processor_opendss.rb +28 -51
- data/lib/urbanopt/scenario/scenario_runner_base.rb +2 -37
- data/lib/urbanopt/scenario/scenario_runner_osw.rb +2 -37
- data/lib/urbanopt/scenario/scenario_visualization.rb +2 -37
- data/lib/urbanopt/scenario/simulation_dir_base.rb +2 -37
- data/lib/urbanopt/scenario/simulation_dir_osw.rb +2 -37
- data/lib/urbanopt/scenario/simulation_mapper_base.rb +2 -37
- data/lib/urbanopt/scenario/version.rb +3 -38
- data/lib/urbanopt/scenario.rb +2 -37
- data/lib/urbanopt-scenario.rb +2 -37
- data/urbanopt-scenario-gem.gemspec +5 -9
- metadata +14 -43
- data/.github/workflows/nightly_build.yml +0 -40
- data/Jenkinsfile +0 -10
@@ -1,41 +1,6 @@
|
|
1
1
|
# *********************************************************************************
|
2
|
-
# URBANopt
|
3
|
-
#
|
4
|
-
|
5
|
-
# Redistribution and use in source and binary forms, with or without modification,
|
6
|
-
# are permitted provided that the following conditions are met:
|
7
|
-
|
8
|
-
# Redistributions of source code must retain the above copyright notice, this list
|
9
|
-
# of conditions and the following disclaimer.
|
10
|
-
|
11
|
-
# Redistributions in binary form must reproduce the above copyright notice, this
|
12
|
-
# list of conditions and the following disclaimer in the documentation and/or other
|
13
|
-
# materials provided with the distribution.
|
14
|
-
|
15
|
-
# Neither the name of the copyright holder nor the names of its contributors may be
|
16
|
-
# used to endorse or promote products derived from this software without specific
|
17
|
-
# prior written permission.
|
18
|
-
|
19
|
-
# Redistribution of this software, without modification, must refer to the software
|
20
|
-
# by the same designation. Redistribution of a modified version of this software
|
21
|
-
# (i) may not refer to the modified version by the same designation, or by any
|
22
|
-
# confusingly similar designation, and (ii) must refer to the underlying software
|
23
|
-
# originally provided by Alliance as “URBANopt”. Except to comply with the foregoing,
|
24
|
-
# the term “URBANopt”, or any confusingly similar designation may not be used to
|
25
|
-
# refer to any modified version of this software or any modified version of the
|
26
|
-
# underlying software originally provided by Alliance without the prior written
|
27
|
-
# consent of Alliance.
|
28
|
-
|
29
|
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
30
|
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
31
|
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
32
|
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
33
|
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
34
|
-
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
35
|
-
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
36
|
-
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
37
|
-
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
38
|
-
# OF THE POSSIBILITY OF SUCH DAMAGE.
|
2
|
+
# URBANopt (tm), Copyright (c) Alliance for Sustainable Energy, LLC.
|
3
|
+
# See also https://github.com/urbanopt/urbanopt-scenario-gem/blob/develop/LICENSE.md
|
39
4
|
# *********************************************************************************
|
40
5
|
|
41
6
|
##
|
@@ -1,41 +1,6 @@
|
|
1
1
|
# *********************************************************************************
|
2
|
-
# URBANopt
|
3
|
-
#
|
4
|
-
|
5
|
-
# Redistribution and use in source and binary forms, with or without modification,
|
6
|
-
# are permitted provided that the following conditions are met:
|
7
|
-
|
8
|
-
# Redistributions of source code must retain the above copyright notice, this list
|
9
|
-
# of conditions and the following disclaimer.
|
10
|
-
|
11
|
-
# Redistributions in binary form must reproduce the above copyright notice, this
|
12
|
-
# list of conditions and the following disclaimer in the documentation and/or other
|
13
|
-
# materials provided with the distribution.
|
14
|
-
|
15
|
-
# Neither the name of the copyright holder nor the names of its contributors may be
|
16
|
-
# used to endorse or promote products derived from this software without specific
|
17
|
-
# prior written permission.
|
18
|
-
|
19
|
-
# Redistribution of this software, without modification, must refer to the software
|
20
|
-
# by the same designation. Redistribution of a modified version of this software
|
21
|
-
# (i) may not refer to the modified version by the same designation, or by any
|
22
|
-
# confusingly similar designation, and (ii) must refer to the underlying software
|
23
|
-
# originally provided by Alliance as “URBANopt”. Except to comply with the foregoing,
|
24
|
-
# the term “URBANopt”, or any confusingly similar designation may not be used to
|
25
|
-
# refer to any modified version of this software or any modified version of the
|
26
|
-
# underlying software originally provided by Alliance without the prior written
|
27
|
-
# consent of Alliance.
|
28
|
-
|
29
|
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
30
|
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
31
|
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
32
|
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
33
|
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
34
|
-
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
35
|
-
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
36
|
-
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
37
|
-
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
38
|
-
# OF THE POSSIBILITY OF SUCH DAMAGE.
|
2
|
+
# URBANopt (tm), Copyright (c) Alliance for Sustainable Energy, LLC.
|
3
|
+
# See also https://github.com/urbanopt/urbanopt-scenario-gem/blob/develop/LICENSE.md
|
39
4
|
# *********************************************************************************
|
40
5
|
|
41
6
|
require 'openstudio/extension'
|
@@ -1,41 +1,6 @@
|
|
1
1
|
# *********************************************************************************
|
2
|
-
# URBANopt
|
3
|
-
#
|
4
|
-
|
5
|
-
# Redistribution and use in source and binary forms, with or without modification,
|
6
|
-
# are permitted provided that the following conditions are met:
|
7
|
-
|
8
|
-
# Redistributions of source code must retain the above copyright notice, this list
|
9
|
-
# of conditions and the following disclaimer.
|
10
|
-
|
11
|
-
# Redistributions in binary form must reproduce the above copyright notice, this
|
12
|
-
# list of conditions and the following disclaimer in the documentation and/or other
|
13
|
-
# materials provided with the distribution.
|
14
|
-
|
15
|
-
# Neither the name of the copyright holder nor the names of its contributors may be
|
16
|
-
# used to endorse or promote products derived from this software without specific
|
17
|
-
# prior written permission.
|
18
|
-
|
19
|
-
# Redistribution of this software, without modification, must refer to the software
|
20
|
-
# by the same designation. Redistribution of a modified version of this software
|
21
|
-
# (i) may not refer to the modified version by the same designation, or by any
|
22
|
-
# confusingly similar designation, and (ii) must refer to the underlying software
|
23
|
-
# originally provided by Alliance as “URBANopt”. Except to comply with the foregoing,
|
24
|
-
# the term “URBANopt”, or any confusingly similar designation may not be used to
|
25
|
-
# refer to any modified version of this software or any modified version of the
|
26
|
-
# underlying software originally provided by Alliance without the prior written
|
27
|
-
# consent of Alliance.
|
28
|
-
|
29
|
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
30
|
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
31
|
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
32
|
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
33
|
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
34
|
-
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
35
|
-
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
36
|
-
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
37
|
-
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
38
|
-
# OF THE POSSIBILITY OF SUCH DAMAGE.
|
2
|
+
# URBANopt (tm), Copyright (c) Alliance for Sustainable Energy, LLC.
|
3
|
+
# See also https://github.com/urbanopt/urbanopt-scenario-gem/blob/develop/LICENSE.md
|
39
4
|
# *********************************************************************************
|
40
5
|
|
41
6
|
require 'logger'
|
@@ -1,41 +1,6 @@
|
|
1
1
|
# *********************************************************************************
|
2
|
-
# URBANopt
|
3
|
-
#
|
4
|
-
|
5
|
-
# Redistribution and use in source and binary forms, with or without modification,
|
6
|
-
# are permitted provided that the following conditions are met:
|
7
|
-
|
8
|
-
# Redistributions of source code must retain the above copyright notice, this list
|
9
|
-
# of conditions and the following disclaimer.
|
10
|
-
|
11
|
-
# Redistributions in binary form must reproduce the above copyright notice, this
|
12
|
-
# list of conditions and the following disclaimer in the documentation and/or other
|
13
|
-
# materials provided with the distribution.
|
14
|
-
|
15
|
-
# Neither the name of the copyright holder nor the names of its contributors may be
|
16
|
-
# used to endorse or promote products derived from this software without specific
|
17
|
-
# prior written permission.
|
18
|
-
|
19
|
-
# Redistribution of this software, without modification, must refer to the software
|
20
|
-
# by the same designation. Redistribution of a modified version of this software
|
21
|
-
# (i) may not refer to the modified version by the same designation, or by any
|
22
|
-
# confusingly similar designation, and (ii) must refer to the underlying software
|
23
|
-
# originally provided by Alliance as “URBANopt”. Except to comply with the foregoing,
|
24
|
-
# the term “URBANopt”, or any confusingly similar designation may not be used to
|
25
|
-
# refer to any modified version of this software or any modified version of the
|
26
|
-
# underlying software originally provided by Alliance without the prior written
|
27
|
-
# consent of Alliance.
|
28
|
-
|
29
|
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
30
|
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
31
|
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
32
|
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
33
|
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
34
|
-
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
35
|
-
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
36
|
-
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
37
|
-
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
38
|
-
# OF THE POSSIBILITY OF SUCH DAMAGE.
|
2
|
+
# URBANopt (tm), Copyright (c) Alliance for Sustainable Energy, LLC.
|
3
|
+
# See also https://github.com/urbanopt/urbanopt-scenario-gem/blob/develop/LICENSE.md
|
39
4
|
# *********************************************************************************
|
40
5
|
|
41
6
|
module URBANopt
|
@@ -1,41 +1,6 @@
|
|
1
1
|
# *********************************************************************************
|
2
|
-
# URBANopt
|
3
|
-
#
|
4
|
-
|
5
|
-
# Redistribution and use in source and binary forms, with or without modification,
|
6
|
-
# are permitted provided that the following conditions are met:
|
7
|
-
|
8
|
-
# Redistributions of source code must retain the above copyright notice, this list
|
9
|
-
# of conditions and the following disclaimer.
|
10
|
-
|
11
|
-
# Redistributions in binary form must reproduce the above copyright notice, this
|
12
|
-
# list of conditions and the following disclaimer in the documentation and/or other
|
13
|
-
# materials provided with the distribution.
|
14
|
-
|
15
|
-
# Neither the name of the copyright holder nor the names of its contributors may be
|
16
|
-
# used to endorse or promote products derived from this software without specific
|
17
|
-
# prior written permission.
|
18
|
-
|
19
|
-
# Redistribution of this software, without modification, must refer to the software
|
20
|
-
# by the same designation. Redistribution of a modified version of this software
|
21
|
-
# (i) may not refer to the modified version by the same designation, or by any
|
22
|
-
# confusingly similar designation, and (ii) must refer to the underlying software
|
23
|
-
# originally provided by Alliance as “URBANopt”. Except to comply with the foregoing,
|
24
|
-
# the term “URBANopt”, or any confusingly similar designation may not be used to
|
25
|
-
# refer to any modified version of this software or any modified version of the
|
26
|
-
# underlying software originally provided by Alliance without the prior written
|
27
|
-
# consent of Alliance.
|
28
|
-
|
29
|
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
30
|
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
31
|
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
32
|
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
33
|
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
34
|
-
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
35
|
-
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
36
|
-
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
37
|
-
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
38
|
-
# OF THE POSSIBILITY OF SUCH DAMAGE.
|
2
|
+
# URBANopt (tm), Copyright (c) Alliance for Sustainable Energy, LLC.
|
3
|
+
# See also https://github.com/urbanopt/urbanopt-scenario-gem/blob/develop/LICENSE.md
|
39
4
|
# *********************************************************************************
|
40
5
|
|
41
6
|
require 'urbanopt/scenario/scenario_base'
|
@@ -1,41 +1,6 @@
|
|
1
1
|
# *********************************************************************************
|
2
|
-
# URBANopt
|
3
|
-
#
|
4
|
-
|
5
|
-
# Redistribution and use in source and binary forms, with or without modification,
|
6
|
-
# are permitted provided that the following conditions are met:
|
7
|
-
|
8
|
-
# Redistributions of source code must retain the above copyright notice, this list
|
9
|
-
# of conditions and the following disclaimer.
|
10
|
-
|
11
|
-
# Redistributions in binary form must reproduce the above copyright notice, this
|
12
|
-
# list of conditions and the following disclaimer in the documentation and/or other
|
13
|
-
# materials provided with the distribution.
|
14
|
-
|
15
|
-
# Neither the name of the copyright holder nor the names of its contributors may be
|
16
|
-
# used to endorse or promote products derived from this software without specific
|
17
|
-
# prior written permission.
|
18
|
-
|
19
|
-
# Redistribution of this software, without modification, must refer to the software
|
20
|
-
# by the same designation. Redistribution of a modified version of this software
|
21
|
-
# (i) may not refer to the modified version by the same designation, or by any
|
22
|
-
# confusingly similar designation, and (ii) must refer to the underlying software
|
23
|
-
# originally provided by Alliance as “URBANopt”. Except to comply with the foregoing,
|
24
|
-
# the term “URBANopt”, or any confusingly similar designation may not be used to
|
25
|
-
# refer to any modified version of this software or any modified version of the
|
26
|
-
# underlying software originally provided by Alliance without the prior written
|
27
|
-
# consent of Alliance.
|
28
|
-
|
29
|
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
30
|
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
31
|
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
32
|
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
33
|
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
34
|
-
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
35
|
-
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
36
|
-
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
37
|
-
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
38
|
-
# OF THE POSSIBILITY OF SUCH DAMAGE.
|
2
|
+
# URBANopt (tm), Copyright (c) Alliance for Sustainable Energy, LLC.
|
3
|
+
# See also https://github.com/urbanopt/urbanopt-scenario-gem/blob/develop/LICENSE.md
|
39
4
|
# *********************************************************************************
|
40
5
|
|
41
6
|
module URBANopt
|
@@ -1,41 +1,6 @@
|
|
1
1
|
# *********************************************************************************
|
2
|
-
# URBANopt
|
3
|
-
#
|
4
|
-
|
5
|
-
# Redistribution and use in source and binary forms, with or without modification,
|
6
|
-
# are permitted provided that the following conditions are met:
|
7
|
-
|
8
|
-
# Redistributions of source code must retain the above copyright notice, this list
|
9
|
-
# of conditions and the following disclaimer.
|
10
|
-
|
11
|
-
# Redistributions in binary form must reproduce the above copyright notice, this
|
12
|
-
# list of conditions and the following disclaimer in the documentation and/or other
|
13
|
-
# materials provided with the distribution.
|
14
|
-
|
15
|
-
# Neither the name of the copyright holder nor the names of its contributors may be
|
16
|
-
# used to endorse or promote products derived from this software without specific
|
17
|
-
# prior written permission.
|
18
|
-
|
19
|
-
# Redistribution of this software, without modification, must refer to the software
|
20
|
-
# by the same designation. Redistribution of a modified version of this software
|
21
|
-
# (i) may not refer to the modified version by the same designation, or by any
|
22
|
-
# confusingly similar designation, and (ii) must refer to the underlying software
|
23
|
-
# originally provided by Alliance as “URBANopt”. Except to comply with the foregoing,
|
24
|
-
# the term “URBANopt”, or any confusingly similar designation may not be used to
|
25
|
-
# refer to any modified version of this software or any modified version of the
|
26
|
-
# underlying software originally provided by Alliance without the prior written
|
27
|
-
# consent of Alliance.
|
28
|
-
|
29
|
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
30
|
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
31
|
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
32
|
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
33
|
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
34
|
-
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
35
|
-
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
36
|
-
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
37
|
-
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
38
|
-
# OF THE POSSIBILITY OF SUCH DAMAGE.
|
2
|
+
# URBANopt (tm), Copyright (c) Alliance for Sustainable Energy, LLC.
|
3
|
+
# See also https://github.com/urbanopt/urbanopt-scenario-gem/blob/develop/LICENSE.md
|
39
4
|
# *********************************************************************************
|
40
5
|
|
41
6
|
module URBANopt
|
@@ -1,41 +1,6 @@
|
|
1
1
|
# *********************************************************************************
|
2
|
-
# URBANopt
|
3
|
-
#
|
4
|
-
|
5
|
-
# Redistribution and use in source and binary forms, with or without modification,
|
6
|
-
# are permitted provided that the following conditions are met:
|
7
|
-
|
8
|
-
# Redistributions of source code must retain the above copyright notice, this list
|
9
|
-
# of conditions and the following disclaimer.
|
10
|
-
|
11
|
-
# Redistributions in binary form must reproduce the above copyright notice, this
|
12
|
-
# list of conditions and the following disclaimer in the documentation and/or other
|
13
|
-
# materials provided with the distribution.
|
14
|
-
|
15
|
-
# Neither the name of the copyright holder nor the names of its contributors may be
|
16
|
-
# used to endorse or promote products derived from this software without specific
|
17
|
-
# prior written permission.
|
18
|
-
|
19
|
-
# Redistribution of this software, without modification, must refer to the software
|
20
|
-
# by the same designation. Redistribution of a modified version of this software
|
21
|
-
# (i) may not refer to the modified version by the same designation, or by any
|
22
|
-
# confusingly similar designation, and (ii) must refer to the underlying software
|
23
|
-
# originally provided by Alliance as “URBANopt”. Except to comply with the foregoing,
|
24
|
-
# the term “URBANopt”, or any confusingly similar designation may not be used to
|
25
|
-
# refer to any modified version of this software or any modified version of the
|
26
|
-
# underlying software originally provided by Alliance without the prior written
|
27
|
-
# consent of Alliance.
|
28
|
-
|
29
|
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
30
|
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
31
|
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
32
|
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
33
|
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
34
|
-
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
35
|
-
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
36
|
-
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
37
|
-
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
38
|
-
# OF THE POSSIBILITY OF SUCH DAMAGE.
|
2
|
+
# URBANopt (tm), Copyright (c) Alliance for Sustainable Energy, LLC.
|
3
|
+
# See also https://github.com/urbanopt/urbanopt-scenario-gem/blob/develop/LICENSE.md
|
39
4
|
# *********************************************************************************
|
40
5
|
|
41
6
|
require 'urbanopt/scenario/scenario_post_processor_base'
|
@@ -1,41 +1,6 @@
|
|
1
1
|
# *********************************************************************************
|
2
|
-
# URBANopt
|
3
|
-
#
|
4
|
-
|
5
|
-
# Redistribution and use in source and binary forms, with or without modification,
|
6
|
-
# are permitted provided that the following conditions are met:
|
7
|
-
|
8
|
-
# Redistributions of source code must retain the above copyright notice, this list
|
9
|
-
# of conditions and the following disclaimer.
|
10
|
-
|
11
|
-
# Redistributions in binary form must reproduce the above copyright notice, this
|
12
|
-
# list of conditions and the following disclaimer in the documentation and/or other
|
13
|
-
# materials provided with the distribution.
|
14
|
-
|
15
|
-
# Neither the name of the copyright holder nor the names of its contributors may be
|
16
|
-
# used to endorse or promote products derived from this software without specific
|
17
|
-
# prior written permission.
|
18
|
-
|
19
|
-
# Redistribution of this software, without modification, must refer to the software
|
20
|
-
# by the same designation. Redistribution of a modified version of this software
|
21
|
-
# (i) may not refer to the modified version by the same designation, or by any
|
22
|
-
# confusingly similar designation, and (ii) must refer to the underlying software
|
23
|
-
# originally provided by Alliance as “URBANopt”. Except to comply with the foregoing,
|
24
|
-
# the term “URBANopt”, or any confusingly similar designation may not be used to
|
25
|
-
# refer to any modified version of this software or any modified version of the
|
26
|
-
# underlying software originally provided by Alliance without the prior written
|
27
|
-
# consent of Alliance.
|
28
|
-
|
29
|
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
30
|
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
31
|
-
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
32
|
-
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
33
|
-
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
34
|
-
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
35
|
-
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
36
|
-
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
37
|
-
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
38
|
-
# OF THE POSSIBILITY OF SUCH DAMAGE.
|
2
|
+
# URBANopt (tm), Copyright (c) Alliance for Sustainable Energy, LLC.
|
3
|
+
# See also https://github.com/urbanopt/urbanopt-scenario-gem/blob/develop/LICENSE.md
|
39
4
|
# *********************************************************************************
|
40
5
|
|
41
6
|
require 'urbanopt/reporting/default_reports'
|
@@ -45,115 +10,106 @@ require 'json'
|
|
45
10
|
require 'fileutils'
|
46
11
|
|
47
12
|
module URBANopt
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
# initialize logger
|
72
|
-
@@logger ||= URBANopt::Reporting::DefaultReports.logger
|
73
|
-
end
|
74
|
-
|
75
|
-
# load disco data (if exists)
|
76
|
-
def load_disco_data
|
77
|
-
|
78
|
-
# load disco upgrade summary
|
79
|
-
disco_json_filename = File.join(@disco_results_dir, 'upgrade_summary.json')
|
80
|
-
if File.exist?(disco_json_filename)
|
81
|
-
@disco_json_results = JSON.parse(File.read(disco_json_filename))
|
82
|
-
end
|
83
|
-
|
84
|
-
end
|
85
|
-
|
86
|
-
# load disco data
|
87
|
-
def load_data
|
88
|
-
# load selected disco data
|
89
|
-
load_disco_data
|
90
|
-
end
|
91
|
-
|
92
|
-
|
93
|
-
##
|
94
|
-
# save disco scenario fields
|
95
|
-
##
|
96
|
-
def save_disco_scenario
|
97
|
-
@scenario_report.scenario_power_distribution_cost = URBANopt::Reporting::DefaultReports::ScenarioPowerDistributionCost.new
|
98
|
-
|
99
|
-
# RESULTS
|
100
|
-
|
101
|
-
res = []
|
102
|
-
# read result from JSON report
|
103
|
-
res = @disco_json_results['results']
|
104
|
-
@scenario_report.scenario_power_distribution_cost.results = res
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
# OUTPUTS
|
109
|
-
|
110
|
-
out = {}
|
111
|
-
# read result from JSON report
|
112
|
-
out[:log_file] = @disco_json_results['outputs']['log_file']
|
113
|
-
out[:jobs] = []
|
114
|
-
@disco_json_results['outputs']['jobs'].each do |job|
|
115
|
-
out[:jobs] << job
|
116
|
-
end
|
117
|
-
@scenario_report.scenario_power_distribution_cost.outputs = out
|
118
|
-
|
119
|
-
# VIOLATION SUMMARY
|
120
|
-
|
121
|
-
vio = []
|
122
|
-
# read result from JSON report
|
123
|
-
vio = @disco_json_results['violation_summary']
|
124
|
-
@scenario_report.scenario_power_distribution_cost.violation_summary = vio
|
125
|
-
|
126
|
-
# COSTS PER EQUIPMENT
|
127
|
-
cos = []
|
128
|
-
# read result from JSON report
|
129
|
-
cos = @disco_json_results['costs_per_equipment']
|
130
|
-
@scenario_report.scenario_power_distribution_cost.costs_per_equipment = cos
|
131
|
-
|
132
|
-
# EQUIPMENT
|
133
|
-
equ = []
|
134
|
-
# read result from JSON report
|
135
|
-
equ = @disco_json_results['equipment']
|
136
|
-
@scenario_report.scenario_power_distribution_cost.equipment = equ
|
137
|
-
|
138
|
-
end
|
139
|
-
|
140
|
-
##
|
141
|
-
# run disco post_processor
|
142
|
-
##
|
143
|
-
def run
|
144
|
-
|
145
|
-
# load data
|
146
|
-
load_data
|
147
|
-
|
148
|
-
# save additional global disco fields
|
149
|
-
save_disco_scenario
|
150
|
-
|
151
|
-
# save the updated scenario reports
|
152
|
-
# set save_feature_reports to false since only the scenario reports should be saved
|
153
|
-
# now, set save csv reports to false
|
154
|
-
@scenario_report.save(file_name = 'scenario_report_disco', save_feature_reports = false, save_csv_reports = false)
|
155
|
-
end
|
13
|
+
module Scenario
|
14
|
+
class DISCOPostProcessor
|
15
|
+
##
|
16
|
+
# DISCOPostProcessor post-processes DISCO results to selected DISCO results and
|
17
|
+
# integrate them in scenario and feature reports.
|
18
|
+
##
|
19
|
+
# [parameters:]
|
20
|
+
# * +scenaro_report+ - _ScenarioBase_ - An object of Scenario_report class.
|
21
|
+
# * +disco_results_dir_name+ - _directory name of disco results
|
22
|
+
def initialize(scenario_report, disco_results_dir_name = 'disco')
|
23
|
+
if !scenario_report.nil?
|
24
|
+
@scenario_report = scenario_report
|
25
|
+
@disco_results_dir = File.join(@scenario_report.directory_name, disco_results_dir_name)
|
26
|
+
else
|
27
|
+
raise 'scenario_report is not valid'
|
28
|
+
end
|
29
|
+
|
30
|
+
# initialize disco data
|
31
|
+
@disco_data = {}
|
32
|
+
|
33
|
+
# initialize disco json results
|
34
|
+
@disco_json_results = {}
|
156
35
|
|
36
|
+
# initialize logger
|
37
|
+
@@logger ||= URBANopt::Reporting::DefaultReports.logger
|
38
|
+
end
|
39
|
+
|
40
|
+
# load disco data (if exists)
|
41
|
+
def load_disco_data
|
42
|
+
# load disco upgrade summary
|
43
|
+
disco_json_filename = File.join(@disco_results_dir, 'upgrade_summary.json')
|
44
|
+
if File.exist?(disco_json_filename)
|
45
|
+
@disco_json_results = JSON.parse(File.read(disco_json_filename))
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
# load disco data
|
50
|
+
def load_data
|
51
|
+
# load selected disco data
|
52
|
+
load_disco_data
|
53
|
+
end
|
54
|
+
|
55
|
+
##
|
56
|
+
# save disco scenario fields
|
57
|
+
##
|
58
|
+
def save_disco_scenario
|
59
|
+
@scenario_report.scenario_power_distribution_cost = URBANopt::Reporting::DefaultReports::ScenarioPowerDistributionCost.new
|
60
|
+
|
61
|
+
# RESULTS
|
62
|
+
|
63
|
+
res = []
|
64
|
+
# read result from JSON report
|
65
|
+
res = @disco_json_results['results']
|
66
|
+
@scenario_report.scenario_power_distribution_cost.results = res
|
67
|
+
|
68
|
+
# OUTPUTS
|
69
|
+
|
70
|
+
out = {}
|
71
|
+
# read result from JSON report
|
72
|
+
out[:log_file] = @disco_json_results['outputs']['log_file']
|
73
|
+
out[:jobs] = []
|
74
|
+
@disco_json_results['outputs']['jobs'].each do |job|
|
75
|
+
out[:jobs] << job
|
157
76
|
end
|
77
|
+
@scenario_report.scenario_power_distribution_cost.outputs = out
|
78
|
+
|
79
|
+
# VIOLATION SUMMARY
|
80
|
+
|
81
|
+
vio = []
|
82
|
+
# read result from JSON report
|
83
|
+
vio = @disco_json_results['violation_summary']
|
84
|
+
@scenario_report.scenario_power_distribution_cost.violation_summary = vio
|
85
|
+
|
86
|
+
# COSTS PER EQUIPMENT
|
87
|
+
cos = []
|
88
|
+
# read result from JSON report
|
89
|
+
cos = @disco_json_results['costs_per_equipment']
|
90
|
+
@scenario_report.scenario_power_distribution_cost.costs_per_equipment = cos
|
91
|
+
|
92
|
+
# EQUIPMENT
|
93
|
+
equ = []
|
94
|
+
# read result from JSON report
|
95
|
+
equ = @disco_json_results['equipment']
|
96
|
+
@scenario_report.scenario_power_distribution_cost.equipment = equ
|
97
|
+
end
|
98
|
+
|
99
|
+
##
|
100
|
+
# run disco post_processor
|
101
|
+
##
|
102
|
+
def run
|
103
|
+
# load data
|
104
|
+
load_data
|
105
|
+
# save additional global disco fields
|
106
|
+
save_disco_scenario
|
107
|
+
|
108
|
+
# save the updated scenario reports
|
109
|
+
# set save_feature_reports to false since only the scenario reports should be saved
|
110
|
+
# now, set save csv reports to false
|
111
|
+
@scenario_report.save(file_name = 'scenario_report_disco', save_feature_reports = false, save_csv_reports = false)
|
112
|
+
end
|
158
113
|
end
|
114
|
+
end
|
159
115
|
end
|