Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demand Response Cooling #90

Open
wants to merge 25 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
2d387ff
replaced Gemfiles with the previous ones generated locally with the h…
Zahra-Fallahi Nov 16, 2020
fde4cbd
changed location of the measure in theosw file and it successfully rins.
Zahra-Fallahi Nov 17, 2020
87762b8
weather file is changed to Houston, climate zone 2A, and run period s…
Zahra-Fallahi Nov 17, 2020
6acd56c
some modifications for run period. It does not work.
Zahra-Fallahi Nov 18, 2020
6412b44
defining the run period and timesteps per hour
rawadelkontar Nov 23, 2020
49bb374
measure folder added
Zahra-Fallahi Nov 23, 2020
13ce8de
test with new project and TX location
rawadelkontar Dec 12, 2020
94e545a
time step tests
Zahra-Fallahi Dec 15, 2020
d9e9724
changes for timestep testing
Zahra-Fallahi Dec 15, 2020
fed453c
merged files with conflict. need to add temperature adjusted files later
Zahra-Fallahi Dec 15, 2020
d9351ed
re added the files for the new scenario
Zahra-Fallahi Dec 15, 2020
e01faef
modified gemfiles to resolve errors. gem files taken from project_zf …
Zahra-Fallahi Dec 16, 2020
7f03059
fix configure_project rakefile method to respect existing runner.conf…
kflemin Dec 16, 2020
3c840a2
Merge branch 'DR_cooling' of https://github.com/urbanopt/urbanopt-exa…
kflemin Dec 16, 2020
60303b7
added a measure for adjusting the temperature at 1 time step.
Zahra-Fallahi Jan 14, 2021
560d8b1
added the measure for adjusting the T for one hour
Zahra-Fallahi Jan 14, 2021
393323a
added a measure to adjust the T setpoint for all 24 hours
Zahra-Fallahi Jan 14, 2021
cdf9dab
implemented new measure for adjusting the T setpoint at 24 hour
Zahra-Fallahi Jan 15, 2021
0568e86
fix arguments for measures/adjustment_of_cooling_setpoints_hourlyd_by…
rawadelkontar Jan 15, 2021
f0c2644
updated gemfiles to use openstudio-extension-gem "0.3.X-LTS" branch
rawadelkontar Mar 8, 2021
75d06b4
Merge branch 'develop' into DR_cooling
rawadelkontar Mar 29, 2021
33eeb05
new json for both features and electrical
Zahra-Fallahi Jul 1, 2021
7f5e0dc
added Gemfile from master
Zahra-Fallahi Jul 5, 2021
7bbaf37
created scenario folder for electrical_fixed.json
Zahra-Fallahi Jul 5, 2021
7d42442
added Gemfile from master
Zahra-Fallahi Jul 5, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
138 changes: 57 additions & 81 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,82 +1,58 @@
source 'http://rubygems.org'

ruby '~> 2.5.0'

# Local gems are useful when developing and integrating the various dependencies.
# To favor the use of local gems, set the following environment variable:
# Mac: export FAVOR_LOCAL_GEMS=1
# Windows: set FAVOR_LOCAL_GEMS=1
# Note that if allow_local is true, but the gem is not found locally, then it will
# checkout the latest version (develop) from github.
allow_local = ENV['FAVOR_LOCAL_GEMS']

# Uncomment the extension, core gems if you need to test local development versions. Otherwise
# these are included in the model articulation and urbanopt gems
#
# if allow_local && File.exist?('../OpenStudio-extension-gem')
# gem 'openstudio-extension', path: '../OpenStudio-extension-gem'
# elsif allow_local
# gem 'openstudio-extension', github: 'NREL/openstudio-extension-gem', branch: 'develop'
# end

# if allow_local && File.exist?('../urbanopt-core-gem')
# gem 'urbanopt-core', path: '../urbanopt-core-gem'
# elsif allow_local
# gem 'urbanopt-core', github: 'URBANopt/urbanopt-core-gem', branch: 'develop'
# end

# if allow_local && File.exist?('../openstudio-common-measures-gem')
# gem 'openstudio-common-measures', path: '../openstudio-common-measures-gem'
# elsif allow_local
# gem 'openstudio-common-measures', github: 'NREL/openstudio-common-measures-gem', branch: 'develop'
# else
# gem 'openstudio-common-measures', '~> 0.2.0'
# end

if allow_local && File.exist?('../openstudio-model-articulation-gem')
gem 'openstudio-model-articulation', path: '../openstudio-model-articulation-gem'
elsif allow_local
gem 'openstudio-model-articulation', github: 'NREL/openstudio-model-articulation-gem', branch: 'develop'
else
gem 'openstudio-model-articulation', '~> 0.3.1'
end

if allow_local && File.exist?('../urbanopt-scenario-gem')
gem 'urbanopt-scenario', path: '../urbanopt-scenario-gem'
elsif allow_local
gem 'urbanopt-scenario', github: 'URBANopt/urbanopt-scenario-gem', branch: 'develop'
else
gem 'urbanopt-scenario', '~> 0.5.0'
end

if allow_local && File.exist?('../urbanopt-reporting-gem')
gem 'urbanopt-reporting', path: '../urbanopt-reporting-gem'
elsif allow_local
gem 'urbanopt-reporting', github: 'URBANopt/urbanopt-reporting-gem', branch: 'develop'
else
gem 'urbanopt-reporting', '~> 0.3.2'
end

if allow_local && File.exist?('../urbanopt-geojson-gem')
gem 'urbanopt-geojson', path: '../urbanopt-geojson-gem'
elsif allow_local
gem 'urbanopt-geojson', github: 'URBANopt/urbanopt-geojson-gem', branch: 'develop'
else
gem 'urbanopt-geojson', '~> 0.5.0'
end

if allow_local && File.exist?('../openstudio-load-flexibility-measures-gem')
gem 'openstudio-load-flexibility-measures', path: '../openstudio-load-flexibility-measures-gem'
elsif allow_local
gem 'openstudio-load-flexibility-measures', github: 'NREL/openstudio-load-flexibility-measures-gem', branch: 'master'
else
gem 'openstudio-load-flexibility-measures', '~> 0.2.1'
end

if allow_local && File.exist?('../urbanopt-reopt-gem')
gem 'urbanopt-reopt', path: '../urbanopt-reopt-gem'
elsif allow_local
gem 'urbanopt-reopt', github: 'URBANopt/urbanopt-reopt-gem', branch: 'develop'
else
gem 'urbanopt-reopt', '0.5.0'
source 'http://rubygems.org'

ruby '~> 2.7.0'

# Local gems are useful when developing and integrating the various dependencies.
# To favor the use of local gems, set the following environment variable:
# Mac: export FAVOR_LOCAL_GEMS=1
# Windows: set FAVOR_LOCAL_GEMS=1
# Note that if allow_local is true, but the gem is not found locally, then it will
# checkout the latest version (develop) from github.
allow_local = ENV['FAVOR_LOCAL_GEMS']

# Uncomment the extension, core gems if you need to test local development versions. Otherwise
# these are included in the model articulation and urbanopt gems
#
# if allow_local && File.exist?('../OpenStudio-extension-gem')
# gem 'openstudio-extension', path: '../OpenStudio-extension-gem'
# elsif allow_local
# gem 'openstudio-extension', github: 'NREL/openstudio-extension-gem', branch: 'develop'
# end

# if allow_local && File.exist?('../urbanopt-core-gem')
# gem 'urbanopt-core', path: '../urbanopt-core-gem'
# elsif allow_local
# gem 'urbanopt-core', github: 'URBANopt/urbanopt-core-gem', branch: 'develop'
# end

if allow_local && File.exist?('../urbanopt-scenario-gem')
gem 'urbanopt-scenario', path: '../urbanopt-scenario-gem'
elsif allow_local
gem 'urbanopt-scenario', github: 'URBANopt/urbanopt-scenario-gem', branch: 'develop'
else
gem 'urbanopt-scenario', '~> 0.6.0'
end

if allow_local && File.exist?('../urbanopt-reporting-gem')
gem 'urbanopt-reporting', path: '../urbanopt-reporting-gem'
elsif allow_local
gem 'urbanopt-reporting', github: 'URBANopt/urbanopt-reporting-gem', branch: 'develop'
else
gem 'urbanopt-reporting', '~> 0.4.0'
end

if allow_local && File.exist?('../urbanopt-geojson-gem')
gem 'urbanopt-geojson', path: '../urbanopt-geojson-gem'
elsif allow_local
gem 'urbanopt-geojson', github: 'URBANopt/urbanopt-geojson-gem', branch: 'develop'
else
gem 'urbanopt-geojson', '~> 0.6.1'
end

if allow_local && File.exist?('../urbanopt-reopt-gem')
gem 'urbanopt-reopt', path: '../urbanopt-reopt-gem'
elsif allow_local
gem 'urbanopt-reopt', github: 'URBANopt/urbanopt-reopt-gem', branch: 'develop'
else
gem 'urbanopt-reopt', '0.6.0'
end
60 changes: 60 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,18 @@ def thermal_storage_scenario(json, csv)
return scenario
end

def Tepmerature_Adjusted_scenario(json, csv)
name = 'Temperature Adjusted Scenario'
run_dir = File.join(root_dir, 'run/Tepmerature_Adjusted_scenario/')
feature_file_path = File.join(root_dir, json)
csv_file = File.join(root_dir, csv)
mapper_files_dir = File.join(root_dir, 'mappers/')
num_header_rows = 1
feature_file = URBANopt::GeoJSON::GeoFile.from_file(feature_file_path)
scenario = URBANopt::Scenario::ScenarioCSV.new(name, root_dir, run_dir, feature_file, mapper_files_dir, csv_file, num_header_rows)
return scenario
end

def mixed_scenario(json, csv)
name = 'Mixed Scenario'
run_dir = File.join(root_dir, 'run/mixed_scenario/')
Expand Down Expand Up @@ -374,6 +386,54 @@ task :post_process_thermal_storage, [:json, :csv] do |t, args|
scenario_result.feature_reports.each(&:save_csv_report)
end

### Temperature Adjusted

desc 'Clear Temperature Adjusted Scenario'
task :clear_Temperature_Adjusted, [:json, :csv] do |t, args|
puts 'Clearing Temperature Adjusted Scenario...'

json = args[:json]
csv = args[:csv]
json = 'example_project_combined.json' if json.nil?
csv = 'Temperature_Adjusted_scenario.csv' if csv.nil?

Tepmerature_Adjusted_scenario(json, csv).clear
end

desc 'Run Temperature Adjusted Scenario'
task :run_Temperature_Adjusted, [:json, :csv] do |t, args|
puts 'Running Temperature Adjusted Scenario...'

json = args[:json]
csv = args[:csv]
json = 'example_project_combined.json' if json.nil?
csv = 'Temperature_Adjusted_scenario.csv' if csv.nil?

configure_project

scenario_runner = URBANopt::Scenario::ScenarioRunnerOSW.new
scenario_runner.run(Tepmerature_Adjusted_scenario(json, csv))
end

desc 'Post Process Temperature Adjusted Scenario'
task :post_process_Temperature_Adjusted, [:json, :csv] do |t, args|
puts 'Post Processing Temperature Adjusted Scenario...'

json = args[:json]
csv = args[:csv]
json = 'example_project_combined.json' if json.nil?
csv = 'Temperature_Adjusted_scenario.csv' if csv.nil?

default_post_processor = URBANopt::Scenario::ScenarioDefaultPostProcessor.new(Tepmerature_Adjusted_scenario(json, csv))
scenario_result = default_post_processor.run
# save scenario reports
scenario_result.save
# save feature reports
scenario_result.feature_reports.each(&:save_json_report)
scenario_result.feature_reports.each(&:save_csv_report)
end


### REopt

desc 'Clear REopt Scenario'
Expand Down
163 changes: 81 additions & 82 deletions example_project/Gemfile
Original file line number Diff line number Diff line change
@@ -1,83 +1,82 @@
source 'http://rubygems.org'

ruby '~> 2.5.0'

# Local gems are useful when developing and integrating the various dependencies.
# To favor the use of local gems, set the following environment variable:
# Mac: export FAVOR_LOCAL_GEMS=1
# Windows: set FAVOR_LOCAL_GEMS=1
# Note that if allow_local is true, but the gem is not found locally, then it will
# checkout the latest version (develop) from github.
allow_local = ENV['FAVOR_LOCAL_GEMS']

# Uncomment the extension, core gems if you need to test local development versions. Otherwise
# these are included in the model articulation and urbanopt gems
#
# if allow_local && File.exist?('../OpenStudio-extension-gem')
# gem 'openstudio-extension', path: '../OpenStudio-extension-gem'
# elsif allow_local
# gem 'openstudio-extension', github: 'NREL/openstudio-extension-gem', branch: 'develop'
# end

# if allow_local && File.exist?('../urbanopt-core-gem')
# gem 'urbanopt-core', path: '../urbanopt-core-gem'
# elsif allow_local
# gem 'urbanopt-core', github: 'URBANopt/urbanopt-core-gem', branch: 'develop'
# end
#

if allow_local && File.exist?('../openstudio-common-measures-gem')
gem 'openstudio-common-measures', path: '../openstudio-common-measures-gem'
elsif allow_local
gem 'openstudio-common-measures', github: 'NREL/openstudio-common-measures-gem', branch: 'develop'
else
gem 'openstudio-common-measures', '~> 0.3.2'
end

if allow_local && File.exist?('../openstudio-model-articulation-gem')
gem 'openstudio-model-articulation', path: '../openstudio-model-articulation-gem'
elsif allow_local
gem 'openstudio-model-articulation', github: 'NREL/openstudio-model-articulation-gem', branch: 'develop'
else
gem 'openstudio-model-articulation', '~> 0.3.1'
end

if allow_local && File.exist?('../openstudio-load-flexibility-measures-gem')
gem 'openstudio-load-flexibility-measures', path: '../openstudio-load-flexibility-measures-gem'
elsif allow_local
gem 'openstudio-load-flexibility-measures', github: 'NREL/openstudio-load-flexibility-measures-gem', branch: 'master'
else
gem 'openstudio-load-flexibility-measures', '~> 0.2.1'
end

if allow_local && File.exist?('../openstudio-ee-gem')
gem 'openstudio-ee', path: '../openstudio-ee-gem'
elsif allow_local
gem 'openstudio-ee', github: 'NREL/openstudio-ee-gem', branch: 'develop'
else
gem 'openstudio-ee', '~> 0.3.2'
end

if allow_local && File.exist?('../openstudio-calibration-gem')
gem 'openstudio-calibration', path: '../openstudio-calibration-gem'
elsif allow_local
gem 'openstudio-calibration', github: 'NREL/openstudio-calibration-gem', branch: 'develop'
else
gem 'openstudio-calibration', '~> 0.3.1'
end

if allow_local && File.exists?('../urbanopt-geojson-gem')
gem 'urbanopt-geojson', path: '../urbanopt-geojson-gem'
elsif allow_local
gem 'urbanopt-geojson', github: 'URBANopt/urbanopt-geojson-gem', branch: 'develop'
else
gem 'urbanopt-geojson', '~> 0.5.0'
end

if allow_local && File.exists?('../urbanopt-reporting-gem')
gem 'urbanopt-reporting', path: '../urbanopt-reporting-gem'
elsif allow_local
gem 'urbanopt-reporting', github: 'URBANopt/urbanopt-reporting-gem', branch: 'develop'
else
gem 'urbanopt-reporting', '~> 0.3.2'
source 'http://rubygems.org'

ruby '~> 2.7.0'

# Local gems are useful when developing and integrating the various dependencies.
# To favor the use of local gems, set the following environment variable:
# Mac: export FAVOR_LOCAL_GEMS=1
# Windows: set FAVOR_LOCAL_GEMS=1
# Note that if allow_local is true, but the gem is not found locally, then it will
# checkout the latest version (develop) from github.
allow_local = ENV['FAVOR_LOCAL_GEMS']

# Uncomment the extension, core gems if you need to test local development versions. Otherwise
# these are included in the model articulation and urbanopt gems
#
# if allow_local && File.exist?('../OpenStudio-extension-gem')
# gem 'openstudio-extension', path: '../OpenStudio-extension-gem'
# elsif allow_local
# gem 'openstudio-extension', github: 'NREL/openstudio-extension-gem', branch: 'develop'
# end

# if allow_local && File.exist?('../urbanopt-core-gem')
# gem 'urbanopt-core', path: '../urbanopt-core-gem'
# elsif allow_local
# gem 'urbanopt-core', github: 'URBANopt/urbanopt-core-gem', branch: 'develop'
# end

if allow_local && File.exist?('../openstudio-common-measures-gem')
gem 'openstudio-common-measures', path: '../openstudio-common-measures-gem'
elsif allow_local
gem 'openstudio-common-measures', github: 'NREL/openstudio-common-measures-gem', branch: 'develop'
else
gem 'openstudio-common-measures', '~> 0.4.0'
end

if allow_local && File.exist?('../openstudio-model-articulation-gem')
gem 'openstudio-model-articulation', path: '../openstudio-model-articulation-gem'
elsif allow_local
gem 'openstudio-model-articulation', github: 'NREL/openstudio-model-articulation-gem', branch: 'develop'
else
gem 'openstudio-model-articulation', '~> 0.4.0'
end

if allow_local && File.exist?('../openstudio-load-flexibility-measures-gem')
gem 'openstudio-load-flexibility-measures', path: '../openstudio-load-flexibility-measures-gem'
elsif allow_local
gem 'openstudio-load-flexibility-measures', github: 'NREL/openstudio-load-flexibility-measures-gem', branch: 'master'
else
gem 'openstudio-load-flexibility-measures', '~> 0.3.1'
end

if allow_local && File.exist?('../openstudio-ee-gem')
gem 'openstudio-ee', path: '../openstudio-ee-gem'
elsif allow_local
gem 'openstudio-ee', github: 'NREL/openstudio-ee-gem', branch: 'develop'
else
gem 'openstudio-ee', '~> 0.4.0'
end

if allow_local && File.exist?('../openstudio-calibration-gem')
gem 'openstudio-calibration', path: '../openstudio-calibration-gem'
elsif allow_local
gem 'openstudio-calibration', github: 'NREL/openstudio-calibration-gem', branch: 'develop'
else
gem 'openstudio-calibration', '~> 0.4.0'
end

if allow_local && File.exists?('../urbanopt-geojson-gem')
gem 'urbanopt-geojson', path: '../urbanopt-geojson-gem'
elsif allow_local
gem 'urbanopt-geojson', github: 'URBANopt/urbanopt-geojson-gem', branch: 'develop'
else
gem 'urbanopt-geojson', '~> 0.6.1'
end

if allow_local && File.exists?('../urbanopt-reporting-gem')
gem 'urbanopt-reporting', path: '../urbanopt-reporting-gem'
elsif allow_local
gem 'urbanopt-reporting', github: 'URBANopt/urbanopt-reporting-gem', branch: 'develop'
else
gem 'urbanopt-reporting', '~> 0.4.0'
end
4 changes: 4 additions & 0 deletions example_project/Temperature_Adjusted_scenario.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Feature Id,Feature Name,Mapper Class
43b5f98b-89a3-41a6-95e8-0786f1fa883f,office_1,URBANopt::Scenario::TemperatureAdjusted
daaf69fe-f96d-43c4-a172-8592446f7281,office_2,URBANopt::Scenario::TemperatureAdjusted
1ac3a7c5-f3a4-4f81-8d4c-96d839dcd8df,res_143,URBANopt::Scenario::TemperatureAdjusted
Loading