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

Merge urbanopt/reopt #633

Merged
merged 37 commits into from
Jul 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
6ca9638
update to UO 0.5.2
brianlball Apr 1, 2021
6804b72
Update openstudio_urbanopt_algo_spec.rb
brianlball Apr 2, 2021
cbfce33
Update openstudio_urbanopt_algo_spec.rb
brianlball Apr 2, 2021
8f5942d
add reopt Gem
brianlball Apr 6, 2021
8b959fc
add scenario file override capability
brianlball Apr 7, 2021
a18af5a
add comfort as output variable
brianlball Apr 20, 2021
b105148
add ReOpt process option to UO CLI call
brianlball Apr 27, 2021
12e7e90
add GEM_DEVELOPER_KEY arg
brianlball Apr 27, 2021
e0a3c8a
add standards to lock to 0.2.12
brianlball Apr 28, 2021
4f0c983
add check for reports_file in output_variable
brianlball Apr 28, 2021
7543b08
run_status.json from UO
brianlball May 6, 2021
9ca11ce
.downcase on run_status.json path
brianlball May 10, 2021
3f7b10f
lock execjs and therubyracer versions
brianlball May 10, 2021
18e4e51
check if log files exist and not nil
brianlball May 11, 2021
80c9857
add boundary check print to sobol
brianlball May 19, 2021
55a542e
add check for GEM_DEVELOPER_KEY as ENV or file and set
brianlball May 19, 2021
aa4e63d
remove gem key ENV from Dockerfile
brianlball May 19, 2021
362329d
add reopt output variable
brianlball May 24, 2021
d300faa
remove raise around reopt bc of timeouts/ratelimit
brianlball May 25, 2021
63d74b9
check if key is nil first
brianlball May 25, 2021
d0ea26a
try and catch reopt error and continue with maxfloat
brianlball May 25, 2021
c374977
check if reopt json formatted right (indicated error)
brianlball May 25, 2021
762766d
set to failed_f_value
brianlball May 25, 2021
a19ba4a
typo
brianlball May 25, 2021
0343fdb
update reopt reporting to use @data_point.analysis.scenario_file
brianlball May 26, 2021
5b3da5f
check for null values returned by REopt
brianlball May 28, 2021
5f85d87
add more log info
brianlball May 28, 2021
76bc5e0
check for empty value
brianlball May 29, 2021
d02db7c
check for nil value
brianlball May 29, 2021
f784cfe
fix objective functions for UO
brianlball Jun 8, 2021
7c850f4
update for scenario_optimization.json outputs
brianlball Jun 16, 2021
526d260
update urbanopt test
brianlball Jun 28, 2021
6154442
change rounding in urbanopt test
brianlball Jun 28, 2021
ea6de65
change OSCLI to Oscli so test will pass
brianlball Jun 28, 2021
b8b1d62
change failure to upper case so test fails
brianlball Jun 28, 2021
9134375
Merge remote-tracking branch 'origin/scenario' into merge_uo
brianlball Jun 28, 2021
7c0694d
update local scripts
brianlball Jun 29, 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
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ RUN echo "Running in testing environment - Installing Firefox and Gecko Driver"

COPY /docker/server/run-server-tests.sh /usr/local/bin/run-server-tests
RUN chmod +x /usr/local/bin/run-server-tests

# Test adding the git repo to the container for coveralls
# The #TEST# will be removed in the travis test script to be run in the test container
#TEST#COPY .git /opt/openstudio/.git
1 change: 1 addition & 0 deletions docker/R/lib/sobol.R
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ for (i in 1:ncol(vars)){
}
if(!all(boundary_check)){
print('SOLUTION SPACE OUT OF BOUNDS, CHECK Grid Jump and Level Values and/or re-run')
print(paste("boundary_check:",boundary_check))
stop(options("show.error.messages"=TRUE),"SOLUTION SPACE OUT OF BOUNDS, CHECK Grid Jump and Level Values and/or re-run")
}
print("bounds are satisfied, continuing...")
Expand Down
4 changes: 4 additions & 0 deletions local_setup_scripts/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ services:
- REDIS_URL=redis://:openstudio@queue:6379
- MONGO_USER=openstudio
- MONGO_PASSWORD=openstudio
- SECRET_KEY_BASE=c4ab6d293e4bf52ee92e8dda6e16dc9b5448d0c5f7908ee40c66736d515f3c29142d905b283d73e5e9cef6b13cd8e38be6fd3b5e25d00f35b259923a86c7c473
volumes:
- osdata:/mnt/openstudio
depends_on:
Expand All @@ -63,6 +64,7 @@ services:
- REDIS_URL=redis://:openstudio@queue:6379
- MONGO_USER=openstudio
- MONGO_PASSWORD=openstudio
- SECRET_KEY_BASE=c4ab6d293e4bf52ee92e8dda6e16dc9b5448d0c5f7908ee40c66736d515f3c29142d905b283d73e5e9cef6b13cd8e38be6fd3b5e25d00f35b259923a86c7c473
volumes:
- osdata:/mnt/openstudio
depends_on:
Expand All @@ -86,6 +88,7 @@ services:
- REDIS_URL=redis://:openstudio@queue:6379
- MONGO_USER=openstudio
- MONGO_PASSWORD=openstudio
- SECRET_KEY_BASE=c4ab6d293e4bf52ee92e8dda6e16dc9b5448d0c5f7908ee40c66736d515f3c29142d905b283d73e5e9cef6b13cd8e38be6fd3b5e25d00f35b259923a86c7c473
volumes:
- /mnt/openstudio
depends_on:
Expand Down Expand Up @@ -120,6 +123,7 @@ services:
- REDIS_URL=redis://:openstudio@queue:6379
- MONGO_USER=openstudio
- MONGO_PASSWORD=openstudio
- SECRET_KEY_BASE=c4ab6d293e4bf52ee92e8dda6e16dc9b5448d0c5f7908ee40c66736d515f3c29142d905b283d73e5e9cef6b13cd8e38be6fd3b5e25d00f35b259923a86c7c473
volumes:
osdata:
external: true
Expand Down
4 changes: 2 additions & 2 deletions local_setup_scripts/rebuild_sr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ while [ $(docker ps -q | wc -l) != 1 ]; do sleep 5; done
sleep 5
docker volume rm -f osdata || true
docker volume rm -f dbdata || true
#docker image rm 127.0.0.1:5000/openstudio-server -f
docker build . -t="127.0.0.1:5000/openstudio-server" --build-arg OPENSTUDIO_VERSION=3.1.0
docker image rm 127.0.0.1:5000/openstudio-server -f
docker build . -t="127.0.0.1:5000/openstudio-server" --build-arg OPENSTUDIO_VERSION=3.2.0
docker push 127.0.0.1:5000/openstudio-server
cd docker/R/
#docker image rm 127.0.0.1:5000/openstudio-rserve -f
Expand Down
4 changes: 4 additions & 0 deletions local_setup_scripts/win64/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ services:
- REDIS_URL=redis://:openstudio@queue:6379
- MONGO_USER=openstudio
- MONGO_PASSWORD=openstudio
- SECRET_KEY_BASE=c4ab6d293e4bf52ee92e8dda6e16dc9b5448d0c5f7908ee40c66736d515f3c29142d905b283d73e5e9cef6b13cd8e38be6fd3b5e25d00f35b259923a86c7c473
volumes:
- osdata:/mnt/openstudio
depends_on:
Expand All @@ -54,6 +55,7 @@ services:
- REDIS_URL=redis://:openstudio@queue:6379
- MONGO_USER=openstudio
- MONGO_PASSWORD=openstudio
- SECRET_KEY_BASE=c4ab6d293e4bf52ee92e8dda6e16dc9b5448d0c5f7908ee40c66736d515f3c29142d905b283d73e5e9cef6b13cd8e38be6fd3b5e25d00f35b259923a86c7c473
volumes:
- osdata:/mnt/openstudio
depends_on:
Expand All @@ -74,6 +76,7 @@ services:
- REDIS_URL=redis://:openstudio@queue:6379
- MONGO_USER=openstudio
- MONGO_PASSWORD=openstudio
- SECRET_KEY_BASE=c4ab6d293e4bf52ee92e8dda6e16dc9b5448d0c5f7908ee40c66736d515f3c29142d905b283d73e5e9cef6b13cd8e38be6fd3b5e25d00f35b259923a86c7c473
volumes:
- /mnt/openstudio
depends_on:
Expand Down Expand Up @@ -102,6 +105,7 @@ services:
- REDIS_URL=redis://:openstudio@queue:6379
- MONGO_USER=openstudio
- MONGO_PASSWORD=openstudio
- SECRET_KEY_BASE=c4ab6d293e4bf52ee92e8dda6e16dc9b5448d0c5f7908ee40c66736d515f3c29142d905b283d73e5e9cef6b13cd8e38be6fd3b5e25d00f35b259923a86c7c473
volumes:
osdata:
external: true
Expand Down
2 changes: 1 addition & 1 deletion local_setup_scripts/win64/rebuild_sr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sleep 5
docker volume rm -f osdata || true
docker volume rm -f dbdata || true
docker image rm 127.0.0.1:5000/openstudio-server -f
docker build . -t="127.0.0.1:5000/openstudio-server" --build-arg OPENSTUDIO_VERSION=3.1.0
docker build . -t="127.0.0.1:5000/openstudio-server" --build-arg OPENSTUDIO_VERSION=3.2.0
docker push 127.0.0.1:5000/openstudio-server
cd docker/R
#docker image rm 127.0.0.1:5000/openstudio-rserve -f
Expand Down
2 changes: 1 addition & 1 deletion local_setup_scripts/win64/rebuild_sr_no_rm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sleep 5
docker volume rm -f osdata || true
docker volume rm -f dbdata || true
#docker image rm 127.0.0.1:5000/openstudio-server -f
docker build . -t="127.0.0.1:5000/openstudio-server" --build-arg OPENSTUDIO_VERSION=3.1.0
docker build . -t="127.0.0.1:5000/openstudio-server" --build-arg OPENSTUDIO_VERSION=3.2.0
docker push 127.0.0.1:5000/openstudio-server
cd docker/R
#docker image rm 127.0.0.1:5000/openstudio-rserve -f
Expand Down
11 changes: 4 additions & 7 deletions server/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,16 @@ gem 'sassc', '~> 2.4.0'
## Commonly update gems for testing and development

gem 'openstudio-workflow', '= 2.2.0'

#gem 'openstudio-analysis', :github => 'NREL/OpenStudio-analysis-gem', :ref => '270'
gem 'openstudio-analysis', '= 1.2.0'

gem 'urbanopt-cli', '= 0.6.0'
gem 'urbanopt-reporting', '= 0.4.0'

gem 'urbanopt-reopt', '= 0.6.0'

## End commonly updated gems

gem 'openstudio-aws'


# libxml 3.2.0 failing on windows
gem 'bson', '~> 4.12.0' # bson 4.6.0 requires ruby >= 2.3.0
#gem 'libxml-ruby'
Expand All @@ -93,9 +90,9 @@ gem 'rubyXL', '~> 3.4.17'

# linux based js runtime libraries
if RUBY_PLATFORM =~ /linux/
gem 'execjs'
gem 'libv8'
gem 'therubyracer'
gem 'execjs', '=2.7.0'
gem 'libv8', '=3.16.14.19'
gem 'therubyracer', '=0.12.3'
elsif RUBY_PLATFORM =~ /darwin/
gem 'execjs', github: 'NREL/execjs'
end
Expand Down
12 changes: 9 additions & 3 deletions server/app/jobs/dj_jobs/run_simulate_data_point.rb
Original file line number Diff line number Diff line change
Expand Up @@ -254,14 +254,20 @@ def perform
@sim_logger.error "Workflow #{osw_path} failed with error #{e}"
run_result = :errored
ensure
if uo_simulation_log
if (!uo_simulation_log.nil? && File.exist?(uo_simulation_log))
@sim_logger.info "UrbanOpt simulation output: #{File.read(uo_simulation_log)}"
else
@sim_logger.warn "UrbanOpt simulation output: #{uo_simulation_log} does not exist"
end
if uo_process_log
if (!uo_process_log.nil? && File.exist?(uo_process_log))
@sim_logger.info "UrbanOpt process output: #{File.read(uo_process_log)}"
else
@sim_logger.warn "UrbanOpt process output: #{uo_process_log} does not exist"
end
if process_log
if (!process_log.nil? && File.exist?(process_log))
@sim_logger.info "Oscli output: #{File.read(process_log)}"
else
@sim_logger.warn "OSCLI output: #{process_log} does not exist"
end
#docker_log = File.join(APP_CONFIG['rails_log_path'], 'docker.log')
#if File.exist? docker_log
Expand Down
Loading