-
Notifications
You must be signed in to change notification settings - Fork 14
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
ResStock-HPXML: convert UpgradeCosts measure to ModelMeasure, try 2 #458
Changes from 29 commits
171f148
42a346b
052961e
e0e3021
fa7d6b9
b1b76ec
b1f3e0d
fa581a2
2935e98
e994499
e484d10
166ab1a
217b626
de148d0
9753fae
65dad06
7452c8e
4dc7ba1
48613c3
c19d068
3489e6b
2e00ee2
d17be06
b6f0044
c313dd9
8a20cac
30b8ac2
52c7610
dd0f7e7
83deb33
7d16c41
12ebb77
bef335d
cc152d2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,169 @@ | ||
schema_version: enum('0.4') | ||
buildstock_directory: str() | ||
project_directory: str(required=True) | ||
weather_files_path: str(required=False) | ||
weather_files_url: str(required=False) | ||
sampler: include('sampler-spec', required=True) | ||
workflow_generator: include('workflow-generator-spec', required=True) | ||
eagle: include('hpc-spec', required=False) | ||
kestrel: include('hpc-spec', required=False) | ||
gcp: include('gcp-spec', required=False) | ||
aws: include('aws-spec', required=False) | ||
output_directory: regex('^(.*\/)?[a-z][a-z0-9_]*\/?$', required=True) | ||
sys_image_dir: str(required=False) | ||
baseline: include('sim-spec', required=True) | ||
os_version: str(required=True) | ||
os_sha: str(required=True) | ||
max_minutes_per_sim: int(max=1440, required=False) | ||
upgrades: list(include('upgrade-spec'), required=False) | ||
postprocessing: include('postprocessing-spec', required=False) | ||
references: map(required=False) | ||
--- | ||
gcp-spec: | ||
# The GCP job ID (for Batch and Cloud Run) pattern is `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. | ||
# For postprocessing job id, we append 3 characters ("-pp"), so this can be up to 60 chars. | ||
job_identifier: regex('^[a-z]([a-z0-9-]{0,58}[a-z0-9])?$', required=True) | ||
project: str(required=True) | ||
region: str(required=True) | ||
service_account: str(required=False) | ||
artifact_registry: include('gcp-ar-spec', required=True) | ||
batch_array_size: num(min=1, max=10000, required=True) | ||
parallelism: num(min=1, max=10000, required=False) | ||
gcs: include('gcs-spec', required=True) | ||
job_environment: include('gcp-job-environment-spec', required=False) | ||
postprocessing_environment: include('gcp-postprocessing_environment-spec', required=False) | ||
|
||
gcs-spec: | ||
bucket: str(required=True) | ||
prefix: str(required=True) | ||
upload_chunk_size_mib: num(min=5, max=5000, required=False) | ||
|
||
gcp-ar-spec: | ||
repository: str(required=True) | ||
|
||
gcp-job-environment-spec: | ||
vcpus: int(min=1, max=224, required=False) | ||
memory_mib: int(min=512, required=False) | ||
boot_disk_mib: int(required=False) | ||
machine_type: str(required=False) | ||
use_spot: bool(required=False) | ||
minutes_per_sim: num(min=0.05, max=480, required=False) | ||
|
||
gcp-postprocessing_environment-spec: | ||
# Limits documented at | ||
# https://cloud.google.com/run/docs/configuring/services/memory-limits | ||
# https://cloud.google.com/run/docs/configuring/services/cpu | ||
cpus: int(min=1, max=8, required=False) | ||
memory_mib: int(min=512, max=32768, required=False) | ||
|
||
aws-spec: | ||
job_identifier: regex('^[a-zA-Z]\w{,9}$', required=True) | ||
s3: include('s3-aws-postprocessing-spec', required=True) | ||
region: str(required=True) | ||
use_spot: bool(required=False) | ||
spot_bid_percent: num(min=1, max=100, required=False) | ||
batch_array_size: num(min=1, max=10000, required=True) | ||
notifications_email: regex('^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$', name='email', required=True) | ||
dask: include('aws-dask-spec', required=True) | ||
job_environment: include('aws-job-environment', required=False) | ||
tags: map(str(), str(), required=False) | ||
|
||
aws-job-environment: | ||
vcpus: int(min=1, max=36, required=False) | ||
memory: int(min=1024, required=False) | ||
|
||
aws-dask-spec: | ||
scheduler_cpu: enum(1024, 2048, 4096, 8192, 16384, required=False) | ||
scheduler_memory: int(min=1024, required=False) | ||
worker_cpu: enum(1024, 2048, 4096, 8192, 16384, required=False) | ||
worker_memory: int(min=1024, required=False) | ||
n_workers: int(min=1, required=True) | ||
|
||
hpc-spec: | ||
account: str(required=True) | ||
minutes_per_sim: num(min=0.05, max=480, required=True) | ||
n_jobs: int(required=False) | ||
postprocessing: include('hpc-postprocessing-spec', required=False) | ||
sampling: include('sampling-spec', required=False) | ||
|
||
hpc-postprocessing-spec: | ||
time: int(required=True) | ||
n_workers: int(min=1, max=32, required=False) | ||
node_memory_mb: int(min=85248, max=751616, required=False) | ||
n_procs: int(min=1, max=36, required=False) | ||
parquet_memory_mb: int(min=100, max=4096, required=False) | ||
|
||
|
||
sampler-spec: | ||
type: str(required=True) | ||
args: map(key=regex(r'^[a-zA-Z_]\w*$', name='valid variable name'), required=False) | ||
|
||
workflow-generator-spec: | ||
type: enum('residential_hpxml', 'commercial_default', required=True) | ||
version: str(required=True) | ||
args: map(key=regex(r'^[a-zA-Z_]\w*$', name='valid variable name'), required=False) | ||
|
||
sampling-spec: | ||
time: int(required=True) | ||
|
||
sim-spec: | ||
n_buildings_represented: int(required=True) | ||
skip_sims: bool(required=False) | ||
custom_gems: bool(required=False) | ||
|
||
upgrade-spec: | ||
upgrade_name: str(required=True) | ||
options: list(include('option-spec'), required=True) | ||
package_apply_logic: include('apply-logic-spec', required=False) | ||
reference_scenario: str(required=False) | ||
|
||
option-spec: | ||
option: include('param_option-spec', required=True) | ||
apply_logic: include('apply-logic-spec', required=False) | ||
costs: list(include('cost-spec'), required=False) | ||
lifetime: num(required=False) | ||
|
||
param_option-spec: str(exclude=':(){}[]') | ||
|
||
apply-logic-spec: > | ||
any( | ||
list( | ||
include('and-spec'), | ||
include('or-spec'), | ||
include('not-spec'), | ||
include('param_option-spec'), | ||
), | ||
include('and-spec'), | ||
include('or-spec'), | ||
include('not-spec'), | ||
include('param_option-spec') | ||
) | ||
or-spec: | ||
or: list(include('apply-logic-spec')) | ||
and-spec: | ||
and: list(include('apply-logic-spec')) | ||
not-spec: | ||
not: any(include('apply-logic-spec'), list(include('apply-logic-spec'))) | ||
|
||
cost-spec: | ||
value: num(required=True) | ||
multiplier: str(required=True) | ||
|
||
postprocessing-spec: | ||
partition_columns: list(str(), required=False) | ||
aws: include('aws-postprocessing-spec', required=False) | ||
keep_individual_timeseries: bool(required=False) | ||
|
||
aws-postprocessing-spec: | ||
region_name: str(required=False) | ||
s3: include('s3-aws-postprocessing-spec', required=True) | ||
athena: include('athena-aws-postprocessing-spec', required=False) | ||
|
||
s3-aws-postprocessing-spec: | ||
bucket: str(required=True) | ||
prefix: str(required=True) | ||
|
||
athena-aws-postprocessing-spec: | ||
glue_service_role: str(required=False) | ||
database_name: regex('^[a-z][a-z0-9_]*$', required=True) | ||
max_crawling_time: num(requried=False) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
# frozen_string_literal: true | ||
class Version | ||
ResStock_Version = '3.1.0' # Version of ResStock | ||
ResStock_Version = '2000.1.0' # Version of ResStock | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Test against the new There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, I forget why I made this change. ResStock_Version doesn't really matter for BuildStockBatch. We only care about "WorkflowGenerator_Version". I will address this. |
||
BuildStockBatch_Version = '2023.5.0' # Minimum required version of BuildStockBatch | ||
|
||
def self.check_buildstockbatch_version | ||
if ENV.keys.include?('BUILDSTOCKBATCH_VERSION') # buildstockbatch is installed | ||
bsb_version = ENV['BUILDSTOCKBATCH_VERSION'] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
schema_version: '0.4' | ||
buildstock_directory: test_openstudio_buildstock | ||
project_directory: project_singlefamilydetached | ||
weather_files_url: https://fake-url | ||
baseline: | ||
n_buildings_represented: 81221016 | ||
|
||
sampler: | ||
type: residential_quota | ||
args: | ||
n_datapoints: 30 | ||
|
||
workflow_generator: | ||
type: residential_hpxml | ||
version: "vNotARealVersion" | ||
args: | ||
build_existing_model: | ||
simulation_control_timestep: 60 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before merge, need to switch this and down below back to develop (and make sure tests are still passing).