urbanopt-rnm-us 0.5.0 → 0.6.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 +47 -0
- data/CHANGELOG.md +13 -0
- data/Gemfile +2 -3
- data/LICENSE.md +16 -12
- data/README.md +5 -3
- data/Rakefile +6 -41
- data/lib/urbanopt/rnm/api_client.rb +2 -37
- data/lib/urbanopt/rnm/capacitor_opendss.rb +2 -37
- data/lib/urbanopt/rnm/carson_eq.rb +2 -37
- data/lib/urbanopt/rnm/consumers.rb +3 -38
- data/lib/urbanopt/rnm/conversion_to_opendss.rb +2 -37
- data/lib/urbanopt/rnm/geojson_input.rb +7 -38
- data/lib/urbanopt/rnm/input_files.rb +2 -37
- data/lib/urbanopt/rnm/logger.rb +2 -37
- data/lib/urbanopt/rnm/oh_ug_rate.rb +2 -37
- data/lib/urbanopt/rnm/post_processor.rb +2 -37
- data/lib/urbanopt/rnm/processor_opendss_catalog.rb +2 -37
- data/lib/urbanopt/rnm/prosumers.rb +2 -37
- data/lib/urbanopt/rnm/rnm_us_catalog_conversion.rb +2 -37
- data/lib/urbanopt/rnm/runner.rb +2 -37
- data/lib/urbanopt/rnm/scenario_report.rb +2 -37
- data/lib/urbanopt/rnm/substation_location.rb +2 -37
- data/lib/urbanopt/rnm/transformer_opendss.rb +2 -37
- data/lib/urbanopt/rnm/validation.rb +3 -38
- data/lib/urbanopt/rnm/version.rb +3 -38
- data/lib/urbanopt/rnm/wires_class.rb +2 -37
- data/lib/urbanopt/rnm/wires_opendss.rb +2 -37
- data/lib/urbanopt/rnm.rb +2 -37
- data/lib/urbanopt-rnm.rb +2 -37
- data/urbanopt-rnm-us-gem.gemspec +5 -2
- metadata +36 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd23559d023948d977d7bf3f915fbf91738b1e61423b8f2eb96e236e4e82ceb6
|
4
|
+
data.tar.gz: 86b716189d9a275481395f23eeb8116c8d1603b1a7703e80003fb04274ad406c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77c359fdea59d7d84e4a511136952280ed379dd7398f0c2de38baa769aa5392f030c4aca8f1247989ecfdefc4cadf818ac271a42890b7f2476c714b450315ac2
|
7
|
+
data.tar.gz: de57f658907d290379408f9ff02c0aa1db12ed2e0dbf36cd21fc8456d639f4f7deec110ca979b4196a59d866ef2f1818c47d137f9d8472c239f62946060579f7
|
@@ -0,0 +1,47 @@
|
|
1
|
+
|
2
|
+
name: nightly_build
|
3
|
+
|
4
|
+
on:
|
5
|
+
# push:
|
6
|
+
schedule:
|
7
|
+
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
|
8
|
+
# 5:23 am UTC (11:23pm MDT the day before) every weekday night in MDT
|
9
|
+
- cron: '23 5 * * 2-6'
|
10
|
+
|
11
|
+
env:
|
12
|
+
# This env var should enforce develop branch of all dependencies
|
13
|
+
FAVOR_LOCAL_GEMS: true
|
14
|
+
GEM_DEVELOPER_KEY: ${{ secrets.GEM_DEVELOPER_KEY }}
|
15
|
+
|
16
|
+
jobs:
|
17
|
+
weeknight-tests:
|
18
|
+
runs-on: ubuntu-latest
|
19
|
+
container:
|
20
|
+
image: docker://nrel/openstudio:3.6.1
|
21
|
+
steps:
|
22
|
+
- uses: actions/checkout@v3
|
23
|
+
- name: Update gems
|
24
|
+
run: |
|
25
|
+
ruby --version
|
26
|
+
bundle update
|
27
|
+
bundle exec certified-update
|
28
|
+
- name: Run Rspec
|
29
|
+
continue-on-error: true
|
30
|
+
# Continue to upload step even if a test fails, so we can troubleshoot
|
31
|
+
run: bundle exec rspec
|
32
|
+
- name: Upload artifacts
|
33
|
+
uses: actions/upload-artifact@v3
|
34
|
+
# Only upload if rspec fails
|
35
|
+
if: ${{ failure() }}
|
36
|
+
with:
|
37
|
+
name: rspec_results
|
38
|
+
path: |
|
39
|
+
spec/test*/**
|
40
|
+
# coverage/
|
41
|
+
retention-days: 7 # save for 1 week before deleting
|
42
|
+
# coveralls action docs: https://github.com/marketplace/actions/coveralls-github-action
|
43
|
+
- name: Coveralls GitHub Action
|
44
|
+
uses: coverallsapp/github-action@v2
|
45
|
+
with:
|
46
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
47
|
+
path-to-lcov: "./coverage/lcov/urbanopt-rnm-us-gem.lcov"
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## Version 0.6.0
|
4
|
+
Date Range: 6/7/23 - 6/30/23
|
5
|
+
|
6
|
+
- Update dependencies & CI for OpenStudio 3.6.1
|
7
|
+
- Update license and references to the license file
|
8
|
+
- Remove unnecessary dev dependency on rubocop as rubocop comes in from other dependencies
|
9
|
+
- Reactivate GitHub Actions for CI
|
10
|
+
|
11
|
+
## Version 0.5.1
|
12
|
+
Date Range 12/9/22 - 6/7/23
|
13
|
+
|
14
|
+
- Fix to handle buildings with courtyard without creating additional erroneous buildings
|
15
|
+
|
3
16
|
## Version 0.5.0
|
4
17
|
Date Range 9/30/22 - 12/8/22
|
5
18
|
|
data/Gemfile
CHANGED
@@ -12,6 +12,5 @@ allow_local = ENV['FAVOR_LOCAL_GEMS']
|
|
12
12
|
# if allow_local && File.exists?('../urbanopt-geojson-gem')
|
13
13
|
# gem 'urbanopt-geojson', path: '../urbanopt-geojson-gem'
|
14
14
|
# elsif allow_local
|
15
|
-
#
|
16
|
-
# end
|
17
|
-
|
15
|
+
# gem 'urbanopt-geojson', github: 'URBANopt/urbanopt-geojson-gem', branch: 'os361'
|
16
|
+
# end
|
data/LICENSE.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
URBANopt (tm), Copyright (c) 2019-
|
1
|
+
URBANopt (tm), Copyright (c) 2019-2023, Alliance for Sustainable Energy, LLC, and other
|
2
2
|
contributors. All rights reserved.
|
3
3
|
|
4
4
|
Redistribution and use in source and binary forms, with or without modification,
|
@@ -25,14 +25,18 @@ refer to any modified version of this software or any modified version of the
|
|
25
25
|
underlying software originally provided by Alliance without the prior written
|
26
26
|
consent of Alliance.
|
27
27
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
OF
|
38
|
-
|
28
|
+
The name of the copyright holder(s), any contributors, the United States Government,
|
29
|
+
the United States Department of Energy, or any of their employees may not be used to
|
30
|
+
endorse or promote products derived from this software without specific prior written
|
31
|
+
permission from the respective party.
|
32
|
+
|
33
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS "AS IS" AND
|
34
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
35
|
+
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
36
|
+
THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE UNITED STATES GOVERNMENT, OR THE UNITED
|
37
|
+
STATES DEPARTMENT OF ENERGY, NOR ANY OF THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT,
|
38
|
+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
39
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
40
|
+
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
41
|
+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
|
42
|
+
WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
+
[![Coverage Status](https://coveralls.io/repos/github/urbanopt/urbanopt-rnm-us-gem/badge.svg?branch=develop)](https://coveralls.io/github/urbanopt/urbanopt-rnm-us-gem?branch=develop)
|
2
|
+
|
1
3
|
# URBANopt RNM-US Gem
|
2
4
|
|
3
|
-
The URBANopt<sup>™</sup> RNM-US Gem includes functionalities to interface the URBANopt SDK to the RNM-US Gem for the development of a synthetic optimum distribution network in the considered district, given data related to the buildings energy consumption/DER energy generation and location, modeled by the other URBANopt modules.
|
5
|
+
The URBANopt<sup>™</sup> RNM-US Gem includes functionalities to interface the URBANopt SDK to the RNM-US Gem for the development of a synthetic optimum distribution network in the considered district, given data related to the buildings energy consumption/DER energy generation and location, modeled by the other URBANopt modules.
|
4
6
|
The RNM-US Gem is used to collect required data for the execution of RNM-US, which has been modeled in the other URBANopt modules, translating information provided
|
5
7
|
in .json and .csv format into .txt files
|
6
8
|
|
@@ -15,7 +17,7 @@ The OpenDSS format presents results for power system analysis and simulations.
|
|
15
17
|
The current functionalities of the RNM-US Gem include the creation of a streetmap text file, the substation txt file and multiple txt files related to the consumers peak loads and profiles and DERs peak generation and profiles.
|
16
18
|
The streetmap text file is developed from coordinates information provided by geoJSON feature file input. The customers and generators text files, which define all the network consumers and DG included in the project, are created from their peak electricity demand/generation, and building location, provided by csv and json feature_report files modeled by the URBANopt Scenario Gem.
|
17
19
|
The profiles txt files are divided among the consumers hourly profiles of active and reactive power and the DG hourly profiles of active and reactive power for the 2 most "extreme" days of maximum net demand and maximum net generation for the district .
|
18
|
-
Finally, the extended profiles txt files provide the active and reactive profiles for each consumer/DG for the whole year.
|
20
|
+
Finally, the extended profiles txt files provide the active and reactive profiles for each consumer/DG for the whole year.
|
19
21
|
|
20
22
|
|
21
23
|
## Generate input files
|
@@ -67,4 +69,4 @@ The validation and results visualization functionality is written in python. Fol
|
|
67
69
|
|
68
70
|
```bash
|
69
71
|
bundle exec rspec
|
70
|
-
```
|
72
|
+
```
|
data/Rakefile
CHANGED
@@ -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™, Copyright © Alliance for Sustainable Energy, LLC.
|
3
|
+
# See also https://github.com/urbanopt/urbanopt-rnm-us-gem/blob/develop/LICENSE.md
|
39
4
|
# *********************************************************************************
|
40
5
|
|
41
6
|
require 'bundler/gem_tasks'
|
@@ -195,9 +160,9 @@ desc 'Run Validation'
|
|
195
160
|
task :run_validation, [:scenario_csv_path, :use_numeric_ids] do |t, args|
|
196
161
|
#Exammple to run validation
|
197
162
|
#bundle exec rake run_validation[D:/.../urbanopt-rnm-us-gem/spec/files/example_project/baseline_scenario.csv,true]
|
198
|
-
|
163
|
+
|
199
164
|
puts 'Running OpenDSS validation'
|
200
|
-
|
165
|
+
|
201
166
|
# if no path passed in, use default:
|
202
167
|
scenario_csv = args[:scenario_csv_path] || 'spec/test/example_project/run/baseline_scenario'
|
203
168
|
root_dir, scenario_file_name = File.split(File.expand_path(scenario_csv))
|
@@ -207,8 +172,8 @@ task :run_validation, [:scenario_csv_path, :use_numeric_ids] do |t, args|
|
|
207
172
|
|
208
173
|
#Use numeric ids (for the hierarchical plot of the network)
|
209
174
|
use_numeric_ids = args[:use_numeric_ids] || false
|
210
|
-
use_numeric_ids = use_numeric_ids == 'true'
|
211
|
-
|
175
|
+
use_numeric_ids = use_numeric_ids == 'true'
|
176
|
+
|
212
177
|
if !File.exist?(rnm_dir)
|
213
178
|
puts rnm_dir
|
214
179
|
raise 'No rnm-us directory found for this scenario...run the create_inputs rake task first.'
|
@@ -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™, Copyright © Alliance for Sustainable Energy, LLC.
|
3
|
+
# See also https://github.com/urbanopt/urbanopt-rnm-us-gem/blob/develop/LICENSE.md
|
39
4
|
# *********************************************************************************
|
40
5
|
|
41
6
|
require 'faraday'
|
@@ -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™, Copyright © Alliance for Sustainable Energy, LLC.
|
3
|
+
# See also https://github.com/urbanopt/urbanopt-rnm-us-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™, Copyright © Alliance for Sustainable Energy, LLC.
|
3
|
+
# See also https://github.com/urbanopt/urbanopt-rnm-us-gem/blob/develop/LICENSE.md
|
39
4
|
# *********************************************************************************
|
40
5
|
|
41
6
|
require 'urbanopt/rnm/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™, Copyright © Alliance for Sustainable Energy, LLC.
|
3
|
+
# See also https://github.com/urbanopt/urbanopt-rnm-us-gem/blob/develop/LICENSE.md
|
39
4
|
# *********************************************************************************
|
40
5
|
|
41
6
|
# creating a class that creates the consumers input required by the RNM-US model,
|
@@ -110,7 +75,7 @@ module URBANopt
|
|
110
75
|
else
|
111
76
|
voltage_default, phases = voltage_values(peak_active_power_cons / @power_factor)
|
112
77
|
end
|
113
|
-
|
78
|
+
|
114
79
|
for k in 0..profiles[:planning_profile_cust_active].length - 1
|
115
80
|
planning_date_time[k]=profiles[:planning_date_time][k]
|
116
81
|
planning_profile_node_active[k] = ((profiles[:planning_profile_cust_active][k]) / nodes_per_bldg).round(2)
|
@@ -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™, Copyright © Alliance for Sustainable Energy, LLC.
|
3
|
+
# See also https://github.com/urbanopt/urbanopt-rnm-us-gem/blob/develop/LICENSE.md
|
39
4
|
# *********************************************************************************
|
40
5
|
|
41
6
|
require 'json'
|
@@ -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™, Copyright © Alliance for Sustainable Energy, LLC.
|
3
|
+
# See also https://github.com/urbanopt/urbanopt-rnm-us-gem/blob/develop/LICENSE.md
|
39
4
|
# *********************************************************************************
|
40
5
|
|
41
6
|
require 'geoutm'
|
@@ -210,7 +175,11 @@ module URBANopt
|
|
210
175
|
street_coordinates[street_number] = each_street
|
211
176
|
street_number += 1
|
212
177
|
elsif street['geometry']['type'] == 'Polygon' && street['properties']['type'] == 'Building' && scenario_features.include?(street['properties']['id'])
|
213
|
-
|
178
|
+
puts "------ processing Building #{ street['properties']['name']} --------"
|
179
|
+
# this loop goes through each polygon and assign it a building and is not correct for buildings with
|
180
|
+
# inner courtyards (it would create 2 buildings)
|
181
|
+
# This assumes the outward footprint is the first polygon -- we only process the first one here
|
182
|
+
for k in 0..0
|
214
183
|
h = 0 # index representing number of nodes for each single building
|
215
184
|
building = [] # array containing every building node coordinates and id of 1 building
|
216
185
|
for j in 0..street['geometry']['coordinates'][k].length - 1
|
@@ -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™, Copyright © Alliance for Sustainable Energy, LLC.
|
3
|
+
# See also https://github.com/urbanopt/urbanopt-rnm-us-gem/blob/develop/LICENSE.md
|
39
4
|
# *********************************************************************************
|
40
5
|
|
41
6
|
require 'csv'
|
data/lib/urbanopt/rnm/logger.rb
CHANGED
@@ -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™, Copyright © Alliance for Sustainable Energy, LLC.
|
3
|
+
# See also https://github.com/urbanopt/urbanopt-rnm-us-gem/blob/develop/LICENSE.md
|
39
4
|
# *********************************************************************************
|
40
5
|
|
41
6
|
require 'logger'
|