From f68d3da3ad29eb9148ea51196445c95099d28709 Mon Sep 17 00:00:00 2001 From: bill-becker Date: Wed, 27 Mar 2024 21:13:35 -0600 Subject: [PATCH 001/142] Use REopt.jl develop branch with Big M for HiGHS --- julia_src/Manifest.toml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index a96b8f997..eac073bb6 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -841,9 +841,11 @@ uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.REopt]] deps = ["ArchGDAL", "CSV", "CoolProp", "DataFrames", "Dates", "DelimitedFiles", "HTTP", "JLD", "JSON", "JuMP", "LinDistFlow", "LinearAlgebra", "Logging", "MathOptInterface", "Requires", "Roots", "Statistics", "TestEnv"] -git-tree-sha1 = "81145461bcc15162ef468858d62b41357bb13684" +git-tree-sha1 = "d9e803dcbcee06ac76570e184f90f85eb2495cdd" +repo-rev = "develop" +repo-url = "https://github.com/NREL/REopt.jl.git" uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6" -version = "0.41.0" +version = "0.43.0" [[deps.Random]] deps = ["SHA", "Serialization"] From 2bdb08a2c4a824dca39ae1b93261bd2c2e3c770c Mon Sep 17 00:00:00 2001 From: bill-becker Date: Wed, 27 Mar 2024 21:14:06 -0600 Subject: [PATCH 002/142] Pass Settings.solver_name to REopt for avoiding indicators with HiGHS --- julia_src/http.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/julia_src/http.jl b/julia_src/http.jl index 147a024b5..8d3a38eaa 100644 --- a/julia_src/http.jl +++ b/julia_src/http.jl @@ -29,11 +29,11 @@ function reopt(req::HTTP.Request) ENV["NREL_DEVELOPER_API_KEY"] = test_nrel_developer_api_key delete!(d, "api_key") end - solver_name = pop!(settings, "solver_name") + solver_name = get(settings, "solver_name", "HiGHS") if solver_name == "Xpress" && !(xpress_installed=="True") solver_name = "HiGHS" - @warn "Changing solver_choice from Xpress to $solver_name because Xpress is not installed. Next time - Specify Settings.solver_choice = 'HiGHS' or 'Cbc' or 'SCIP'" + @warn "Changing solver_name from Xpress to $solver_name because Xpress is not installed. Next time + Specify Settings.solver_name = 'HiGHS' or 'Cbc' or 'SCIP'" end timeout_seconds = pop!(settings, "timeout_seconds") optimality_tolerance = pop!(settings, "optimality_tolerance") From 8816074d7fdd183a84e36fb622289656ce615225 Mon Sep 17 00:00:00 2001 From: bill-becker Date: Wed, 27 Mar 2024 21:15:18 -0600 Subject: [PATCH 003/142] Change default solver to HiGHS, increase default and max timeout and max tolerance --- ..._settings_optimality_tolerance_and_more.py | 29 +++++++++++++++++++ reoptjl/models.py | 8 ++--- 2 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 reoptjl/migrations/0055_alter_settings_optimality_tolerance_and_more.py diff --git a/reoptjl/migrations/0055_alter_settings_optimality_tolerance_and_more.py b/reoptjl/migrations/0055_alter_settings_optimality_tolerance_and_more.py new file mode 100644 index 000000000..d1e7d70bf --- /dev/null +++ b/reoptjl/migrations/0055_alter_settings_optimality_tolerance_and_more.py @@ -0,0 +1,29 @@ +# Generated by Django 4.0.7 on 2024-03-28 03:12 + +import django.core.validators +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('reoptjl', '0054_rename_distance_to_emissions_region_meters_electricutilityoutputs_distance_to_avert_emissions_region'), + ] + + operations = [ + migrations.AlterField( + model_name='settings', + name='optimality_tolerance', + field=models.FloatField(default=0.001, help_text="The threshold for the difference between the solution's objective value and the best possible value at which the solver terminates", validators=[django.core.validators.MinValueValidator(5e-06), django.core.validators.MaxValueValidator(0.2)]), + ), + migrations.AlterField( + model_name='settings', + name='solver_name', + field=models.TextField(blank=True, choices=[('HiGHS', 'Highs'), ('Cbc', 'Cbc'), ('SCIP', 'Scip'), ('Xpress', 'Xpress')], default='HiGHS', help_text='Solver used for REopt.jl. Options include HiGHS, Cbc, SCIP, and Xpress'), + ), + migrations.AlterField( + model_name='settings', + name='timeout_seconds', + field=models.IntegerField(default=600, help_text='The number of seconds allowed before the optimization times out.', validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(1200)]), + ), + ] diff --git a/reoptjl/models.py b/reoptjl/models.py index 19bdfba26..846cece18 100644 --- a/reoptjl/models.py +++ b/reoptjl/models.py @@ -233,10 +233,10 @@ class TIME_STEP_CHOICES(models.IntegerChoices): FOUR = 4 timeout_seconds = models.IntegerField( - default=420, + default=600, validators=[ MinValueValidator(1), - MaxValueValidator(420) + MaxValueValidator(1200) ], help_text="The number of seconds allowed before the optimization times out." ) @@ -251,7 +251,7 @@ class TIME_STEP_CHOICES(models.IntegerChoices): default=0.001, validators=[ MinValueValidator(5.0e-6), - MaxValueValidator(0.05) + MaxValueValidator(0.20) ], help_text=("The threshold for the difference between the solution's objective value and the best possible " "value at which the solver terminates") @@ -296,7 +296,7 @@ class SOLVERS(models.TextChoices): solver_name = models.TextField( blank=True, - default=SOLVERS.XPRESS, + default=SOLVERS.HIGHS, choices=SOLVERS.choices, help_text=("Solver used for REopt.jl. Options include HiGHS, Cbc, SCIP, and Xpress") ) From b56e6bec18c698bdcc663e822190c287a95a9ed5 Mon Sep 17 00:00:00 2001 From: bill-becker Date: Wed, 27 Mar 2024 21:37:51 -0600 Subject: [PATCH 004/142] Stop installing Xpress solver for internal deployments --- Jenkinsfile | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1f08e9a4f..9fca0c4e4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -66,21 +66,21 @@ pipeline { WERF_SYNCHRONIZATION = ":local" XPRESS_LICENSE_HOST = credentials("reopt-api-xpress-license-host") LICENSESERVER_URL = credentials("reopt-api-xpress-licenseserver-url") - XPRESS_INSTALLED = "True" + XPRESS_INSTALLED = "False" NREL_ROOT_CERT_URL_ROOT = credentials("reopt-api-nrel-root-cert-url-root") } stages { stage("deploy") { stages { - stage("solver setup") { - steps { - dir("julia_src/licenseserver") { - git url: env.LICENSESERVER_URL - } - sh "cp julia_src/licenseserver/Dockerfile.xpress julia_src/" - } - } + // stage("solver setup") { + // steps { + // dir("julia_src/licenseserver") { + // git url: env.LICENSESERVER_URL + // } + // sh "cp julia_src/licenseserver/Dockerfile.xpress julia_src/" + // } + // } stage("lint") { steps { From 41b6f9cf90a44a844c314ba233bc40b5e5ce848d Mon Sep 17 00:00:00 2001 From: bill-becker Date: Wed, 27 Mar 2024 21:38:32 -0600 Subject: [PATCH 005/142] End-of-Life for v1 and v2 POSTs for /job endpoint (running REopt) --- reo/api.py | 422 +++++++++++++++++++++++++++-------------------------- 1 file changed, 219 insertions(+), 203 deletions(-) diff --git a/reo/api.py b/reo/api.py index 3ff8e72c8..0d9656124 100644 --- a/reo/api.py +++ b/reo/api.py @@ -89,108 +89,116 @@ def obj_create(self, bundle, **kwargs): uuidFilter = UUIDFilter(run_uuid) log.addFilter(uuidFilter) log.info('Beginning run setup') + + # End-of-Life for V1 and V2 - as of March 2024 + data['inputs'] = bundle.data + data['messages'] = {} + data['messages']['error'] = "v1 and v2 of the REopt API are NO longer available; End-of-Life. Please use /stable (v3)" + raise ImmediateHttpResponse(HttpResponse(json.dumps(data), + content_type='application/json', + status=410)) # "Gone" code for "no longer available" - # Validate ghpghx_inputs, if applicable - ghpghx_inputs_validation_errors = [] - if bundle.data["Scenario"]["Site"].get("GHP") is not None and \ - bundle.data["Scenario"]["Site"]["GHP"].get("ghpghx_inputs") not in [None, []] and \ - bundle.data["Scenario"]["Site"]["GHP"].get("ghpghx_response_uuids") in [None, []]: - for ghpghx_inputs in bundle.data["Scenario"]["Site"]["GHP"]["ghpghx_inputs"]: - ghpghxM = GHPGHXInputs(**ghpghx_inputs) - try: - # Validate individual model fields - ghpghxM.clean_fields() - except ValidationError as ve: - ghpghx_inputs_validation_errors += [key + ": " + val[i] + " " for key, val in ve.message_dict.items() for i in range(len(val))] + # # Validate ghpghx_inputs, if applicable + # ghpghx_inputs_validation_errors = [] + # if bundle.data["Scenario"]["Site"].get("GHP") is not None and \ + # bundle.data["Scenario"]["Site"]["GHP"].get("ghpghx_inputs") not in [None, []] and \ + # bundle.data["Scenario"]["Site"]["GHP"].get("ghpghx_response_uuids") in [None, []]: + # for ghpghx_inputs in bundle.data["Scenario"]["Site"]["GHP"]["ghpghx_inputs"]: + # ghpghxM = GHPGHXInputs(**ghpghx_inputs) + # try: + # # Validate individual model fields + # ghpghxM.clean_fields() + # except ValidationError as ve: + # ghpghx_inputs_validation_errors += [key + ": " + val[i] + " " for key, val in ve.message_dict.items() for i in range(len(val))] - try: - input_validator = ValidateNestedInput(bundle.data, ghpghx_inputs_validation_errors=ghpghx_inputs_validation_errors) - except Exception as e: - exc_type, exc_value, exc_traceback = sys.exc_info() - err = UnexpectedError(exc_type, exc_value.args[0], traceback.format_tb(exc_traceback), task='ValidateNestedInput', run_uuid=run_uuid) - err.save_to_db() - set_status(data, 'Internal Server Error during input validation. No optimization task has been created. Please check your POST for bad values.') - data['inputs'] = bundle.data - data['messages'] = {} - data['messages']['error'] = err.message # "Unexpected Error." - log.error("Internal Server error: " + err.message) - raise ImmediateHttpResponse(HttpResponse(json.dumps(data), - content_type='application/json', - status=500)) # internal server error - data["inputs"] = input_validator.input_dict - data["messages"] = input_validator.messages - - if not input_validator.isValid: # 400 Bad Request - log.debug("input_validator not valid") - log.debug(json.dumps(data)) - set_status(data, 'Error. No optimization task has been created. See messages for more information. ' \ - 'Note that inputs have default values filled in.') - if saveToDb: - badpost = BadPost(run_uuid=run_uuid, post=json.dumps(bundle.data), errors=str(data['messages'])) - badpost.save() - - raise ImmediateHttpResponse(HttpResponse(json.dumps(data), - content_type='application/json', - status=400)) - log.info('Entering ModelManager') - model_manager = ModelManager() - profiler.profileEnd() - - if saveToDb: - set_status(data, 'Optimizing...') - data['outputs']['Scenario']['Profile']['pre_setup_scenario_seconds'] = profiler.getDuration() - if bundle.request.META.get('HTTP_X_API_USER_ID') or False: - if bundle.request.META.get('HTTP_X_API_USER_ID', '') == '6f09c972-8414-469b-b3e8-a78398874103': - data['outputs']['Scenario']['job_type'] = 'REopt Web Tool' - else: - data['outputs']['Scenario']['job_type'] = 'developer.nrel.gov' - else: - data['outputs']['Scenario']['job_type'] = 'Internal NREL' - test_case = bundle.request.META.get('HTTP_USER_AGENT') or '' - if test_case.startswith('check_http/'): - data['outputs']['Scenario']['job_type'] = 'Monitoring' - try: - model_manager.create_and_save(data) - except Exception as e: - log.error("Could not create and save run_uuid: {}\n Data: {}".format(run_uuid,data)) - exc_type, exc_value, exc_traceback = sys.exc_info() - err = UnexpectedError(exc_type, exc_value.args[0], traceback.format_tb(exc_traceback), task='ModelManager.create_and_save', - run_uuid=run_uuid) - err.save_to_db() - set_status(data, "Internal Server Error during saving of inputs. Please see messages.") - data['messages']['error'] = err.message # "Unexpected Error." - log.error("Internal Server error: " + err.message) - raise ImmediateHttpResponse(HttpResponse(json.dumps(data), - content_type='application/json', - status=500)) # internal server error - setup = setup_scenario.s(run_uuid=run_uuid, data=data, api_version=1) - call_back = process_results.s(data=data, meta={'run_uuid': run_uuid, 'api_version': api_version}) - # (use .si for immutable signature, if no outputs were passed from reopt_jobs) - rjm = run_jump_model.s(data=data) - rjm_bau = run_jump_model.s(data=data, bau=True) - - log.info("Starting celery chain") - try: - chain(setup | group(rjm, rjm_bau) | call_back)() - except Exception as e: - if isinstance(e, REoptError): - pass # handled in each task - else: # for every other kind of exception - exc_type, exc_value, exc_traceback = sys.exc_info() - err = UnexpectedError(exc_type, exc_value.args[0], traceback.format_tb(exc_traceback), task='api.py', run_uuid=run_uuid) - err.save_to_db() - set_status(data, 'Internal Server Error. See messages for more.') - if 'messages' not in data.keys(): - data['messages'] = {} - data['messages']['error'] = err.message - log.error("Internal Server error: " + err.message) - raise ImmediateHttpResponse(HttpResponse(json.dumps(data), - content_type='application/json', - status=500)) # internal server error - - log.info("Returning with HTTP 201") - raise ImmediateHttpResponse(HttpResponse(json.dumps({'run_uuid': run_uuid}), - content_type='application/json', status=201)) + # try: + # input_validator = ValidateNestedInput(bundle.data, ghpghx_inputs_validation_errors=ghpghx_inputs_validation_errors) + # except Exception as e: + # exc_type, exc_value, exc_traceback = sys.exc_info() + # err = UnexpectedError(exc_type, exc_value.args[0], traceback.format_tb(exc_traceback), task='ValidateNestedInput', run_uuid=run_uuid) + # err.save_to_db() + # set_status(data, 'Internal Server Error during input validation. No optimization task has been created. Please check your POST for bad values.') + # data['inputs'] = bundle.data + # data['messages'] = {} + # data['messages']['error'] = err.message # "Unexpected Error." + # log.error("Internal Server error: " + err.message) + # raise ImmediateHttpResponse(HttpResponse(json.dumps(data), + # content_type='application/json', + # status=500)) # internal server error + # data["inputs"] = input_validator.input_dict + # data["messages"] = input_validator.messages + + # if not input_validator.isValid: # 400 Bad Request + # log.debug("input_validator not valid") + # log.debug(json.dumps(data)) + # set_status(data, 'Error. No optimization task has been created. See messages for more information. ' \ + # 'Note that inputs have default values filled in.') + # if saveToDb: + # badpost = BadPost(run_uuid=run_uuid, post=json.dumps(bundle.data), errors=str(data['messages'])) + # badpost.save() + + # raise ImmediateHttpResponse(HttpResponse(json.dumps(data), + # content_type='application/json', + # status=400)) + # log.info('Entering ModelManager') + # model_manager = ModelManager() + # profiler.profileEnd() + + # if saveToDb: + # set_status(data, 'Optimizing...') + # data['outputs']['Scenario']['Profile']['pre_setup_scenario_seconds'] = profiler.getDuration() + # if bundle.request.META.get('HTTP_X_API_USER_ID') or False: + # if bundle.request.META.get('HTTP_X_API_USER_ID', '') == '6f09c972-8414-469b-b3e8-a78398874103': + # data['outputs']['Scenario']['job_type'] = 'REopt Web Tool' + # else: + # data['outputs']['Scenario']['job_type'] = 'developer.nrel.gov' + # else: + # data['outputs']['Scenario']['job_type'] = 'Internal NREL' + # test_case = bundle.request.META.get('HTTP_USER_AGENT') or '' + # if test_case.startswith('check_http/'): + # data['outputs']['Scenario']['job_type'] = 'Monitoring' + # try: + # model_manager.create_and_save(data) + # except Exception as e: + # log.error("Could not create and save run_uuid: {}\n Data: {}".format(run_uuid,data)) + # exc_type, exc_value, exc_traceback = sys.exc_info() + # err = UnexpectedError(exc_type, exc_value.args[0], traceback.format_tb(exc_traceback), task='ModelManager.create_and_save', + # run_uuid=run_uuid) + # err.save_to_db() + # set_status(data, "Internal Server Error during saving of inputs. Please see messages.") + # data['messages']['error'] = err.message # "Unexpected Error." + # log.error("Internal Server error: " + err.message) + # raise ImmediateHttpResponse(HttpResponse(json.dumps(data), + # content_type='application/json', + # status=500)) # internal server error + # setup = setup_scenario.s(run_uuid=run_uuid, data=data, api_version=1) + # call_back = process_results.s(data=data, meta={'run_uuid': run_uuid, 'api_version': api_version}) + # # (use .si for immutable signature, if no outputs were passed from reopt_jobs) + # rjm = run_jump_model.s(data=data) + # rjm_bau = run_jump_model.s(data=data, bau=True) + + # log.info("Starting celery chain") + # try: + # chain(setup | group(rjm, rjm_bau) | call_back)() + # except Exception as e: + # if isinstance(e, REoptError): + # pass # handled in each task + # else: # for every other kind of exception + # exc_type, exc_value, exc_traceback = sys.exc_info() + # err = UnexpectedError(exc_type, exc_value.args[0], traceback.format_tb(exc_traceback), task='api.py', run_uuid=run_uuid) + # err.save_to_db() + # set_status(data, 'Internal Server Error. See messages for more.') + # if 'messages' not in data.keys(): + # data['messages'] = {} + # data['messages']['error'] = err.message + # log.error("Internal Server error: " + err.message) + # raise ImmediateHttpResponse(HttpResponse(json.dumps(data), + # content_type='application/json', + # status=500)) # internal server error + + # log.info("Returning with HTTP 201") + # raise ImmediateHttpResponse(HttpResponse(json.dumps({'run_uuid': run_uuid}), + # content_type='application/json', status=201)) """ NOTES @@ -257,108 +265,116 @@ def obj_create(self, bundle, **kwargs): uuidFilter = UUIDFilter(run_uuid) log.addFilter(uuidFilter) log.info('Beginning run setup') + + # End-of-Life for V1 and V2 - as of March 2024 + data['inputs'] = bundle.data + data['messages'] = {} + data['messages']['error'] = "v1 and v2 of the REopt API are NO longer available; End-of-Life. Please use /stable (v3)" + raise ImmediateHttpResponse(HttpResponse(json.dumps(data), + content_type='application/json', + status=410)) # "Gone" code for "no longer available" - # Validate ghpghx_inputs, if applicable - ghpghx_inputs_validation_errors = [] - if bundle.data["Scenario"]["Site"].get("GHP") is not None and \ - bundle.data["Scenario"]["Site"]["GHP"].get("ghpghx_inputs") not in [None, []] and \ - bundle.data["Scenario"]["Site"]["GHP"].get("ghpghx_response_uuids") in [None, []]: - for ghpghx_inputs in bundle.data["Scenario"]["Site"]["GHP"]["ghpghx_inputs"]: - ghpghxM = GHPGHXInputs(**ghpghx_inputs) - try: - # Validate individual model fields - ghpghxM.clean_fields() - except ValidationError as ve: - ghpghx_inputs_validation_errors += [key + ": " + val[i] + " " for key, val in ve.message_dict.items() for i in range(len(val))] + # # Validate ghpghx_inputs, if applicable + # ghpghx_inputs_validation_errors = [] + # if bundle.data["Scenario"]["Site"].get("GHP") is not None and \ + # bundle.data["Scenario"]["Site"]["GHP"].get("ghpghx_inputs") not in [None, []] and \ + # bundle.data["Scenario"]["Site"]["GHP"].get("ghpghx_response_uuids") in [None, []]: + # for ghpghx_inputs in bundle.data["Scenario"]["Site"]["GHP"]["ghpghx_inputs"]: + # ghpghxM = GHPGHXInputs(**ghpghx_inputs) + # try: + # # Validate individual model fields + # ghpghxM.clean_fields() + # except ValidationError as ve: + # ghpghx_inputs_validation_errors += [key + ": " + val[i] + " " for key, val in ve.message_dict.items() for i in range(len(val))] - try: - input_validator = ValidateNestedInput(bundle.data, - ghpghx_inputs_validation_errors=ghpghx_inputs_validation_errors, - api_version=2 - ) - except Exception as e: - exc_type, exc_value, exc_traceback = sys.exc_info() - err = UnexpectedError(exc_type, exc_value.args[0], traceback.format_tb(exc_traceback), task='ValidateNestedInput', run_uuid=run_uuid) - err.save_to_db() - set_status(data, 'Internal Server Error during input validation. No optimization task has been created. Please check your POST for bad values.') - data['inputs'] = bundle.data - data['messages'] = {} - data['messages']['error'] = err.message # "Unexpected Error." - log.error("Internal Server error: " + err.message) - raise ImmediateHttpResponse(HttpResponse(json.dumps(data), - content_type='application/json', - status=500)) # internal server error - data["inputs"] = input_validator.input_dict - data["messages"] = input_validator.messages - - if not input_validator.isValid: # 400 Bad Request - log.debug("input_validator not valid") - log.debug(json.dumps(data)) - set_status(data, 'Error. No optimization task has been created. See messages for more information. ' \ - 'Note that inputs have default values filled in.') - if saveToDb: - badpost = BadPost(run_uuid=run_uuid, post=json.dumps(bundle.data), errors=str(data['messages'])) - badpost.save() - - raise ImmediateHttpResponse(HttpResponse(json.dumps(data), - content_type='application/json', - status=400)) - log.info('Entering ModelManager') - model_manager = ModelManager() - profiler.profileEnd() - - if saveToDb: - set_status(data, 'Optimizing...') - data['outputs']['Scenario']['Profile']['pre_setup_scenario_seconds'] = profiler.getDuration() - if bundle.request.META.get('HTTP_X_API_USER_ID') or False: - if bundle.request.META.get('HTTP_X_API_USER_ID', '') == '6f09c972-8414-469b-b3e8-a78398874103': - data['outputs']['Scenario']['job_type'] = 'REopt Web Tool' - else: - data['outputs']['Scenario']['job_type'] = 'developer.nrel.gov' - else: - data['outputs']['Scenario']['job_type'] = 'Internal NREL' - test_case = bundle.request.META.get('HTTP_USER_AGENT') or '' - if test_case.startswith('check_http/'): - data['outputs']['Scenario']['job_type'] = 'Monitoring' - try: - model_manager.create_and_save(data) - except Exception as e: - log.error("Could not create and save run_uuid: {}\n Data: {}".format(run_uuid,data)) - exc_type, exc_value, exc_traceback = sys.exc_info() - err = UnexpectedError(exc_type, exc_value.args[0], traceback.format_tb(exc_traceback), task='ModelManager.create_and_save', - run_uuid=run_uuid) - err.save_to_db() - set_status(data, "Internal Server Error during saving of inputs. Please see messages.") - data['messages']['error'] = err.message # "Unexpected Error." - log.error("Internal Server error: " + err.message) - raise ImmediateHttpResponse(HttpResponse(json.dumps(data), - content_type='application/json', - status=500)) # internal server error - setup = setup_scenario.s(run_uuid=run_uuid, data=data, api_version=2) - call_back = process_results.s(data=data, meta={'run_uuid': run_uuid, 'api_version': api_version}) - # (use .si for immutable signature, if no outputs were passed from reopt_jobs) - rjm = run_jump_model.s(data=data) - rjm_bau = run_jump_model.s(data=data, bau=True) - - log.info("Starting celery chain") - try: - chain(setup | group(rjm, rjm_bau) | call_back)() - except Exception as e: - if isinstance(e, REoptError): - pass # handled in each task - else: # for every other kind of exception - exc_type, exc_value, exc_traceback = sys.exc_info() - err = UnexpectedError(exc_type, exc_value.args[0], traceback.format_tb(exc_traceback), task='api.py', run_uuid=run_uuid) - err.save_to_db() - set_status(data, 'Internal Server Error. See messages for more.') - if 'messages' not in data.keys(): - data['messages'] = {} - data['messages']['error'] = err.message - log.error("Internal Server error: " + err.message) - raise ImmediateHttpResponse(HttpResponse(json.dumps(data), - content_type='application/json', - status=500)) # internal server error - - log.info("Returning with HTTP 201") - raise ImmediateHttpResponse(HttpResponse(json.dumps({'run_uuid': run_uuid}), - content_type='application/json', status=201)) \ No newline at end of file + # try: + # input_validator = ValidateNestedInput(bundle.data, + # ghpghx_inputs_validation_errors=ghpghx_inputs_validation_errors, + # api_version=2 + # ) + # except Exception as e: + # exc_type, exc_value, exc_traceback = sys.exc_info() + # err = UnexpectedError(exc_type, exc_value.args[0], traceback.format_tb(exc_traceback), task='ValidateNestedInput', run_uuid=run_uuid) + # err.save_to_db() + # set_status(data, 'Internal Server Error during input validation. No optimization task has been created. Please check your POST for bad values.') + # data['inputs'] = bundle.data + # data['messages'] = {} + # data['messages']['error'] = err.message # "Unexpected Error." + # log.error("Internal Server error: " + err.message) + # raise ImmediateHttpResponse(HttpResponse(json.dumps(data), + # content_type='application/json', + # status=500)) # internal server error + # data["inputs"] = input_validator.input_dict + # data["messages"] = input_validator.messages + + # if not input_validator.isValid: # 400 Bad Request + # log.debug("input_validator not valid") + # log.debug(json.dumps(data)) + # set_status(data, 'Error. No optimization task has been created. See messages for more information. ' \ + # 'Note that inputs have default values filled in.') + # if saveToDb: + # badpost = BadPost(run_uuid=run_uuid, post=json.dumps(bundle.data), errors=str(data['messages'])) + # badpost.save() + + # raise ImmediateHttpResponse(HttpResponse(json.dumps(data), + # content_type='application/json', + # status=400)) + # log.info('Entering ModelManager') + # model_manager = ModelManager() + # profiler.profileEnd() + + # if saveToDb: + # set_status(data, 'Optimizing...') + # data['outputs']['Scenario']['Profile']['pre_setup_scenario_seconds'] = profiler.getDuration() + # if bundle.request.META.get('HTTP_X_API_USER_ID') or False: + # if bundle.request.META.get('HTTP_X_API_USER_ID', '') == '6f09c972-8414-469b-b3e8-a78398874103': + # data['outputs']['Scenario']['job_type'] = 'REopt Web Tool' + # else: + # data['outputs']['Scenario']['job_type'] = 'developer.nrel.gov' + # else: + # data['outputs']['Scenario']['job_type'] = 'Internal NREL' + # test_case = bundle.request.META.get('HTTP_USER_AGENT') or '' + # if test_case.startswith('check_http/'): + # data['outputs']['Scenario']['job_type'] = 'Monitoring' + # try: + # model_manager.create_and_save(data) + # except Exception as e: + # log.error("Could not create and save run_uuid: {}\n Data: {}".format(run_uuid,data)) + # exc_type, exc_value, exc_traceback = sys.exc_info() + # err = UnexpectedError(exc_type, exc_value.args[0], traceback.format_tb(exc_traceback), task='ModelManager.create_and_save', + # run_uuid=run_uuid) + # err.save_to_db() + # set_status(data, "Internal Server Error during saving of inputs. Please see messages.") + # data['messages']['error'] = err.message # "Unexpected Error." + # log.error("Internal Server error: " + err.message) + # raise ImmediateHttpResponse(HttpResponse(json.dumps(data), + # content_type='application/json', + # status=500)) # internal server error + # setup = setup_scenario.s(run_uuid=run_uuid, data=data, api_version=2) + # call_back = process_results.s(data=data, meta={'run_uuid': run_uuid, 'api_version': api_version}) + # # (use .si for immutable signature, if no outputs were passed from reopt_jobs) + # rjm = run_jump_model.s(data=data) + # rjm_bau = run_jump_model.s(data=data, bau=True) + + # log.info("Starting celery chain") + # try: + # chain(setup | group(rjm, rjm_bau) | call_back)() + # except Exception as e: + # if isinstance(e, REoptError): + # pass # handled in each task + # else: # for every other kind of exception + # exc_type, exc_value, exc_traceback = sys.exc_info() + # err = UnexpectedError(exc_type, exc_value.args[0], traceback.format_tb(exc_traceback), task='api.py', run_uuid=run_uuid) + # err.save_to_db() + # set_status(data, 'Internal Server Error. See messages for more.') + # if 'messages' not in data.keys(): + # data['messages'] = {} + # data['messages']['error'] = err.message + # log.error("Internal Server error: " + err.message) + # raise ImmediateHttpResponse(HttpResponse(json.dumps(data), + # content_type='application/json', + # status=500)) # internal server error + + # log.info("Returning with HTTP 201") + # raise ImmediateHttpResponse(HttpResponse(json.dumps({'run_uuid': run_uuid}), + # content_type='application/json', status=201)) \ No newline at end of file From 3141c33eb2acba858baaecacded26ed7e3b43ee3 Mon Sep 17 00:00:00 2001 From: bill-becker Date: Wed, 27 Mar 2024 22:03:00 -0600 Subject: [PATCH 006/142] Increase staging server resources for testing --- .helm/values.staging.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.helm/values.staging.yaml b/.helm/values.staging.yaml index 78b346218..614e0fafb 100644 --- a/.helm/values.staging.yaml +++ b/.helm/values.staging.yaml @@ -1,6 +1,13 @@ appEnv: staging djangoSettingsModule: reopt_api.staging_settings +djangoReplicas: 3 +djangoMemoryRequest: "2800Mi" +djangoMemoryLimit: "2800Mi" +celeryReplicas: 6 +celeryMemoryRequest: "900Mi" +celeryMemoryLimit: "900Mi" +juliaReplicas: 6 juliaCpuRequest: "1000m" juliaCpuLimit: "4000m" -juliaMemoryRequest: "8000Mi" -juliaMemoryLimit: "8000Mi" \ No newline at end of file +juliaMemoryRequest: "12000Mi" +juliaMemoryLimit: "12000Mi" \ No newline at end of file From 686cba20fa18c52ab91930a35ceae9c55a563a6b Mon Sep 17 00:00:00 2001 From: bill-becker Date: Wed, 27 Mar 2024 22:15:58 -0600 Subject: [PATCH 007/142] Comment out werf solver setup --- werf-giterminism.yaml | 12 ++++++------ werf.yaml | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/werf-giterminism.yaml b/werf-giterminism.yaml index fb1e7fb24..f1802bc8a 100644 --- a/werf-giterminism.yaml +++ b/werf-giterminism.yaml @@ -4,9 +4,9 @@ config: allowEnvVariables: - XPRESS_LICENSE_HOST - NREL_ROOT_CERT_URL_ROOT - dockerfile: - allowUncommitted: - - julia_src/Dockerfile.xpress - allowContextAddFiles: - - julia_src/Dockerfile.xpress - - julia_src/licenseserver + # dockerfile: + # allowUncommitted: + # - julia_src/Dockerfile.xpress + # allowContextAddFiles: + # - julia_src/Dockerfile.xpress + # - julia_src/licenseserver diff --git a/werf.yaml b/werf.yaml index 54450a73c..e6e8a1bdd 100644 --- a/werf.yaml +++ b/werf.yaml @@ -10,10 +10,10 @@ args: --- image: julia-api context: julia_src/ -dockerfile: Dockerfile.xpress -contextAddFiles: - - Dockerfile.xpress - - licenseserver +# dockerfile: Dockerfile.xpress +# contextAddFiles: +# - Dockerfile.xpress +# - licenseserver args: XPRESS_LICENSE_HOST: {{ env "XPRESS_LICENSE_HOST" | quote }} NREL_ROOT_CERT_URL_ROOT: {{ env "NREL_ROOT_CERT_URL_ROOT" | quote }} From 9c6cd63c6f67e9973d36a9c8c3a6f272e071025c Mon Sep 17 00:00:00 2001 From: bill-becker Date: Wed, 27 Mar 2024 22:22:27 -0600 Subject: [PATCH 008/142] Fix werf Dockerfile --- werf.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/werf.yaml b/werf.yaml index e6e8a1bdd..0e9b7a396 100644 --- a/werf.yaml +++ b/werf.yaml @@ -10,7 +10,7 @@ args: --- image: julia-api context: julia_src/ -# dockerfile: Dockerfile.xpress +dockerfile: Dockerfile # contextAddFiles: # - Dockerfile.xpress # - licenseserver From 96411c1aa1116035e0db5d52e91a7bcf0125ffee Mon Sep 17 00:00:00 2001 From: bill-becker Date: Thu, 28 Mar 2024 16:06:51 -0600 Subject: [PATCH 009/142] Update REopt.jl#develop with Cbc and SCIP using Big M constraints --- julia_src/Manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index eac073bb6..c0b19604e 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -841,7 +841,7 @@ uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.REopt]] deps = ["ArchGDAL", "CSV", "CoolProp", "DataFrames", "Dates", "DelimitedFiles", "HTTP", "JLD", "JSON", "JuMP", "LinDistFlow", "LinearAlgebra", "Logging", "MathOptInterface", "Requires", "Roots", "Statistics", "TestEnv"] -git-tree-sha1 = "d9e803dcbcee06ac76570e184f90f85eb2495cdd" +git-tree-sha1 = "3e085cc6153e3dcd47f00712a014b5b5faf6f60b" repo-rev = "develop" repo-url = "https://github.com/NREL/REopt.jl.git" uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6" From 8f92f8e76034547e19afb3da8a228c25f34b7858 Mon Sep 17 00:00:00 2001 From: adfarth Date: Fri, 29 Mar 2024 14:35:28 -0600 Subject: [PATCH 010/142] update max annual_kwh mining operations may use > 1,000 GWh --- reoptjl/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reoptjl/models.py b/reoptjl/models.py index 846cece18..2283d816d 100644 --- a/reoptjl/models.py +++ b/reoptjl/models.py @@ -1168,7 +1168,7 @@ class ElectricLoadInputs(BaseModel, models.Model): annual_kwh = models.FloatField( validators=[ MinValueValidator(1), - MaxValueValidator(100000000) + MaxValueValidator(10000000000) ], null=True, blank=True, help_text=("Annual site energy consumption from electricity, in kWh, used to scale simulated default building " From 2053ef9cc69b8356c15be6a47fa7060148859e50 Mon Sep 17 00:00:00 2001 From: bill-becker Date: Fri, 29 Mar 2024 14:57:09 -0600 Subject: [PATCH 011/142] Update Julia to registered v0.44.0 --- julia_src/Manifest.toml | 6 ++---- reoptjl/api.py | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index c0b19604e..875d0f87e 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -841,11 +841,9 @@ uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.REopt]] deps = ["ArchGDAL", "CSV", "CoolProp", "DataFrames", "Dates", "DelimitedFiles", "HTTP", "JLD", "JSON", "JuMP", "LinDistFlow", "LinearAlgebra", "Logging", "MathOptInterface", "Requires", "Roots", "Statistics", "TestEnv"] -git-tree-sha1 = "3e085cc6153e3dcd47f00712a014b5b5faf6f60b" -repo-rev = "develop" -repo-url = "https://github.com/NREL/REopt.jl.git" +git-tree-sha1 = "b8e663a9f06eb6a1085ff7de981df2a6246b2b91" uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6" -version = "0.43.0" +version = "0.44.0" [[deps.Random]] deps = ["SHA", "Serialization"] diff --git a/reoptjl/api.py b/reoptjl/api.py index 05139d352..ea4348210 100644 --- a/reoptjl/api.py +++ b/reoptjl/api.py @@ -98,7 +98,7 @@ def obj_create(self, bundle, **kwargs): meta = { "run_uuid": run_uuid, "api_version": 3, - "reopt_version": "0.43.0", + "reopt_version": "0.44.0", "status": "Validating..." } bundle.data.update({"APIMeta": meta}) From a769763793c999073f060cc7737b29eb9461a6f2 Mon Sep 17 00:00:00 2001 From: bill-becker Date: Fri, 29 Mar 2024 15:24:23 -0600 Subject: [PATCH 012/142] Make outages test a delta of 1% LCC --- reoptjl/test/test_job_endpoint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reoptjl/test/test_job_endpoint.py b/reoptjl/test/test_job_endpoint.py index 8dc8ed566..c945f501b 100644 --- a/reoptjl/test/test_job_endpoint.py +++ b/reoptjl/test/test_job_endpoint.py @@ -33,7 +33,7 @@ def test_multiple_outages(self): self.assertAlmostEqual(sum(sum(np.array(results["Outages"]["unserved_load_per_outage_kwh"]))), 0.0, places=0) # TODO figure out why microgrid_upgrade_capital_cost is about $3000 different locally than on GitHub Actions self.assertAlmostEqual(results["Outages"]["microgrid_upgrade_capital_cost"], 1974429.4, delta=5000.0) - self.assertAlmostEqual(results["Financial"]["lcc"], 59865240.0, delta=5000.0) + self.assertAlmostEqual(results["Financial"]["lcc"], 59865240.0, delta=0.01*results["Financial"]["lcc"]) def test_pv_battery_and_emissions_defaults_from_julia(self): """ From 15349da5ced5c726598204610a54ab503b75e780 Mon Sep 17 00:00:00 2001 From: bill-becker Date: Sat, 30 Mar 2024 08:59:00 -0600 Subject: [PATCH 013/142] Update Changelog for v3.7.0 --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 77ca4fb95..619c030b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,15 @@ Classify the change according to the following categories: ##### Removed ### Patches +## v3.7.0 +### Minor Updates +#### Changed +- Default `Settings.solver_name` = `HiGHS` +- See updates from REopt.jl v0.44.0: https://github.com/NREL/REopt.jl/releases/tag/v0.44.0 +- HiGHS, Cbc, and SCIP solvers use Big M notation constraints only in REopt.jl +#### Deprecated +- End-of-Life for v1 and v2 of the API for external/public interfacing from NREL servers + ## v3.6.1 ### Minor Updates #### Fixed From 089153d301053313bfcd01e030b1bd464a63cd67 Mon Sep 17 00:00:00 2001 From: bill-becker Date: Mon, 1 Apr 2024 10:07:45 -0600 Subject: [PATCH 014/142] Add link to discussion forum post for EOL for v1 and v2. --- CHANGELOG.md | 2 +- reo/api.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 619c030b3..313b490c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,7 +33,7 @@ Classify the change according to the following categories: - See updates from REopt.jl v0.44.0: https://github.com/NREL/REopt.jl/releases/tag/v0.44.0 - HiGHS, Cbc, and SCIP solvers use Big M notation constraints only in REopt.jl #### Deprecated -- End-of-Life for v1 and v2 of the API for external/public interfacing from NREL servers +- End-of-Life for v1 and v2 of the API for external/public interfacing from NREL servers. See https://github.com/NREL/REopt-Analysis-Scripts/discussions/148 for more details. ## v3.6.1 ### Minor Updates diff --git a/reo/api.py b/reo/api.py index 0d9656124..b2b125bd9 100644 --- a/reo/api.py +++ b/reo/api.py @@ -93,7 +93,7 @@ def obj_create(self, bundle, **kwargs): # End-of-Life for V1 and V2 - as of March 2024 data['inputs'] = bundle.data data['messages'] = {} - data['messages']['error'] = "v1 and v2 of the REopt API are NO longer available; End-of-Life. Please use /stable (v3)" + data['messages']['error'] = "v1 and v2 of the REopt API are NO longer available; End-of-Life. Please use /stable (v3). See https://github.com/NREL/REopt-Analysis-Scripts/discussions/148 for more details." raise ImmediateHttpResponse(HttpResponse(json.dumps(data), content_type='application/json', status=410)) # "Gone" code for "no longer available" @@ -269,7 +269,7 @@ def obj_create(self, bundle, **kwargs): # End-of-Life for V1 and V2 - as of March 2024 data['inputs'] = bundle.data data['messages'] = {} - data['messages']['error'] = "v1 and v2 of the REopt API are NO longer available; End-of-Life. Please use /stable (v3)" + data['messages']['error'] = "v1 and v2 of the REopt API are NO longer available; End-of-Life. Please use /stable (v3). See https://github.com/NREL/REopt-Analysis-Scripts/discussions/148 for more details." raise ImmediateHttpResponse(HttpResponse(json.dumps(data), content_type='application/json', status=410)) # "Gone" code for "no longer available" From 7aded8dd26a640f6dc1d1f66e0d5b8f018e0b204 Mon Sep 17 00:00:00 2001 From: bill-becker Date: Thu, 4 Apr 2024 17:51:32 -0400 Subject: [PATCH 015/142] Fix SteamTurbine size_class 3 option --- ..._electricloadinputs_annual_kwh_and_more.py | 24 +++++++++++++++++++ reoptjl/models.py | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 reoptjl/migrations/0056_alter_electricloadinputs_annual_kwh_and_more.py diff --git a/reoptjl/migrations/0056_alter_electricloadinputs_annual_kwh_and_more.py b/reoptjl/migrations/0056_alter_electricloadinputs_annual_kwh_and_more.py new file mode 100644 index 000000000..06a552040 --- /dev/null +++ b/reoptjl/migrations/0056_alter_electricloadinputs_annual_kwh_and_more.py @@ -0,0 +1,24 @@ +# Generated by Django 4.0.7 on 2024-04-04 21:48 + +import django.core.validators +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('reoptjl', '0055_alter_settings_optimality_tolerance_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='electricloadinputs', + name='annual_kwh', + field=models.FloatField(blank=True, help_text="Annual site energy consumption from electricity, in kWh, used to scale simulated default building load profile for the site's climate zone", null=True, validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(10000000000)]), + ), + migrations.AlterField( + model_name='steamturbineinputs', + name='size_class', + field=models.IntegerField(blank=True, choices=[(0, 'Zero'), (1, 'One'), (2, 'Two'), (3, 'Three')], help_text='Steam turbine size class for using appropriate default inputs', null=True), + ), + ] diff --git a/reoptjl/models.py b/reoptjl/models.py index 2283d816d..1a15d09ca 100644 --- a/reoptjl/models.py +++ b/reoptjl/models.py @@ -5228,7 +5228,7 @@ class SIZE_CLASS_LIST(models.IntegerChoices): ZERO = 0, ONE = 1 TWO = 2 - FOUR = 4 + THREE = 3 min_kw = models.FloatField( null=True, From 8ebd5c33aa7c8cc827a76bf12a6677633ae50915 Mon Sep 17 00:00:00 2001 From: bill-becker Date: Fri, 5 Apr 2024 10:23:01 -0600 Subject: [PATCH 016/142] Revert "Increase staging server resources for testing" This reverts commit 3141c33eb2acba858baaecacded26ed7e3b43ee3. --- .helm/values.staging.yaml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.helm/values.staging.yaml b/.helm/values.staging.yaml index 614e0fafb..78b346218 100644 --- a/.helm/values.staging.yaml +++ b/.helm/values.staging.yaml @@ -1,13 +1,6 @@ appEnv: staging djangoSettingsModule: reopt_api.staging_settings -djangoReplicas: 3 -djangoMemoryRequest: "2800Mi" -djangoMemoryLimit: "2800Mi" -celeryReplicas: 6 -celeryMemoryRequest: "900Mi" -celeryMemoryLimit: "900Mi" -juliaReplicas: 6 juliaCpuRequest: "1000m" juliaCpuLimit: "4000m" -juliaMemoryRequest: "12000Mi" -juliaMemoryLimit: "12000Mi" \ No newline at end of file +juliaMemoryRequest: "8000Mi" +juliaMemoryLimit: "8000Mi" \ No newline at end of file From ef304f44e747d5ddb44bc8eb57db16f54d07f70f Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Mon, 8 Apr 2024 14:00:59 -0600 Subject: [PATCH 017/142] add soc_min_applies_during_outages to ElectricStorageInputs --- reoptjl/models.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/reoptjl/models.py b/reoptjl/models.py index 19bdfba26..20a9e08fb 100644 --- a/reoptjl/models.py +++ b/reoptjl/models.py @@ -3291,6 +3291,11 @@ class ElectricStorageInputs(BaseModel, models.Model): blank=True, help_text="Minimum allowable battery state of charge as fraction of energy capacity." ) + soc_min_applies_during_outages = models.BooleanField( + default=False, + blank=True, + help_text="Whether the minimum allowable battery state of charge is enforced during outages in addition to normal operations." + ) soc_init_fraction = models.FloatField( validators=[ MinValueValidator(0), From fb65e6d5298f9c0445b7e24b68d3bbef0d6a33e3 Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Mon, 8 Apr 2024 14:05:16 -0600 Subject: [PATCH 018/142] fix soc_min_applies_during_outages to true in tests to preserve expected solution --- reoptjl/test/posts/all_inputs_test.json | 1 + reoptjl/test/posts/outage.json | 1 + reoptjl/test/posts/validator_post.json | 1 + resilience_stats/tests/ERP_opt_gens_batt_pv_wind_post.json | 1 + resilience_stats/tests/ERP_opt_long_dur_stor_post.json | 1 + 5 files changed, 5 insertions(+) diff --git a/reoptjl/test/posts/all_inputs_test.json b/reoptjl/test/posts/all_inputs_test.json index 45a1ee177..0a7fd1f53 100644 --- a/reoptjl/test/posts/all_inputs_test.json +++ b/reoptjl/test/posts/all_inputs_test.json @@ -155,6 +155,7 @@ "inverter_efficiency_fraction": 0.96, "rectifier_efficiency_fraction": 0.96, "soc_min_fraction": 0.2, + "soc_min_applies_during_outages": true, "soc_init_fraction": 0.5, "can_grid_charge": true, "installed_cost_per_kw": 840.0, diff --git a/reoptjl/test/posts/outage.json b/reoptjl/test/posts/outage.json index 03fa04aab..1a212b871 100644 --- a/reoptjl/test/posts/outage.json +++ b/reoptjl/test/posts/outage.json @@ -67,6 +67,7 @@ "max_kw": 701.97, "min_kwh": 3441.15, "max_kwh": 3441.15, + "soc_min_applies_during_outages": true, "can_grid_charge": false, "total_itc_fraction": 0.26, "macrs_itc_reduction": 0.5, diff --git a/reoptjl/test/posts/validator_post.json b/reoptjl/test/posts/validator_post.json index 706f6feff..d4c8ce524 100644 --- a/reoptjl/test/posts/validator_post.json +++ b/reoptjl/test/posts/validator_post.json @@ -19043,6 +19043,7 @@ "inverter_efficiency_fraction": 0.97, "rectifier_efficiency_fraction": 0.97, "soc_min_fraction": 0.2, + "soc_min_applies_during_outages": true, "soc_init_fraction": 0.6, "canGridCharge": true, "installed_cost_us_dollars_per_kw": 500, diff --git a/resilience_stats/tests/ERP_opt_gens_batt_pv_wind_post.json b/resilience_stats/tests/ERP_opt_gens_batt_pv_wind_post.json index d227cb521..e12228efa 100644 --- a/resilience_stats/tests/ERP_opt_gens_batt_pv_wind_post.json +++ b/resilience_stats/tests/ERP_opt_gens_batt_pv_wind_post.json @@ -36,6 +36,7 @@ "max_kw": 50, "min_kwh": 1000, "max_kwh": 1000, + "soc_min_applies_during_outages": true, "total_rebate_per_kw": 100.0, "macrs_option_years": 5, "can_grid_charge": true, diff --git a/resilience_stats/tests/ERP_opt_long_dur_stor_post.json b/resilience_stats/tests/ERP_opt_long_dur_stor_post.json index af4b56ca6..b30173f98 100644 --- a/resilience_stats/tests/ERP_opt_long_dur_stor_post.json +++ b/resilience_stats/tests/ERP_opt_long_dur_stor_post.json @@ -9,6 +9,7 @@ "min_kwh": 40000, "max_kwh": 40000, "soc_min_fraction": 0.8, + "soc_min_applies_during_outages": true, "soc_init_fraction": 0.9 }, "ElectricLoad": { From fae9340e86eaf6bb255fb30339df7cf46a0bfc6f Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Mon, 8 Apr 2024 14:11:00 -0600 Subject: [PATCH 019/142] Update CHANGELOG.md --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 77ca4fb95..610c8ce9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,11 @@ Classify the change according to the following categories: ##### Removed ### Patches +## Develop 4/8/24 +### Minor Updates +#### Changed +- Added **soc_min_applies_during_outages** boolean field to **ElectricStorageInputs** (defaults to _false_) + ## v3.6.1 ### Minor Updates #### Fixed From e1618885e35d33cfe1f6af3daea77ed610023a32 Mon Sep 17 00:00:00 2001 From: "Rathod, Bhavesh" Date: Thu, 18 Apr 2024 10:35:06 -0600 Subject: [PATCH 020/142] Create 0057_electricstorageinputs_soc_min_applies_during_outages.py --- ...ageinputs_soc_min_applies_during_outages.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 reoptjl/migrations/0057_electricstorageinputs_soc_min_applies_during_outages.py diff --git a/reoptjl/migrations/0057_electricstorageinputs_soc_min_applies_during_outages.py b/reoptjl/migrations/0057_electricstorageinputs_soc_min_applies_during_outages.py new file mode 100644 index 000000000..efa091b38 --- /dev/null +++ b/reoptjl/migrations/0057_electricstorageinputs_soc_min_applies_during_outages.py @@ -0,0 +1,18 @@ +# Generated by Django 4.0.7 on 2024-04-18 16:31 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('reoptjl', '0056_alter_electricloadinputs_annual_kwh_and_more'), + ] + + operations = [ + migrations.AddField( + model_name='electricstorageinputs', + name='soc_min_applies_during_outages', + field=models.BooleanField(blank=True, default=False, help_text='Whether the minimum allowable battery state of charge is enforced during outages in addition to normal operations.'), + ), + ] From 6dacc65f7ccd6d2472208b09b641d9318c1cce0f Mon Sep 17 00:00:00 2001 From: Byron Pullutasig <115118857+bpulluta@users.noreply.github.com> Date: Fri, 19 Apr 2024 14:28:11 -0600 Subject: [PATCH 021/142] changelog update --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 313b490c1..ab8382155 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,13 @@ Classify the change according to the following categories: ##### Removed ### Patches +## Develop - 2024-04-19 +### Minor Updates +#### Changed +- In `core/pv.jl` a change was made to make sure we are using the same assumptions as PVWatts guidelines, the default `tilt` angle for a fixed array should be 20 degrees, irrespective of it being a rooftop `(1)` or ground-mounted (open-rack)`(2)` system. By default the `tilt` will be set to 20 degrees for ground-mount and rooftop, and 0 degrees for axis-tracking (`array_type = (3) or (4)`) + +> "The PVWatts® default value for the tilt angle depends on the array type: For a fixed array, the default value is 20 degrees, and for one-axis tracking the default value is zero. A common rule of thumb for fixed arrays is to set the tilt angle to the latitude of the system's location to maximize the system's total electrical output over the year. Use a lower tilt angle favor peak production in the summer months when the sun is high in the sky, or a higher tilt angle to increase output during winter months. Higher tilt angles tend to cost more for racking and mounting hardware, and may increase the risk of wind damage to the array." + ## v3.7.0 ### Minor Updates #### Changed From 7619053ce414475cb59ce5fb25815b8bd4b19d0b Mon Sep 17 00:00:00 2001 From: Byron Pullutasig <115118857+bpulluta@users.noreply.github.com> Date: Fri, 19 Apr 2024 14:33:46 -0600 Subject: [PATCH 022/142] models helptext update --- reoptjl/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reoptjl/models.py b/reoptjl/models.py index 1a15d09ca..7036a24de 100644 --- a/reoptjl/models.py +++ b/reoptjl/models.py @@ -2790,7 +2790,7 @@ class PV_LOCATION_CHOICES(models.TextChoices): ], blank=True, null=True, - help_text="PV system tilt. If PV system type is rooftop-fixed, then tilt=10 degrees, else tilt=20 degrees" + help_text="PV system tilt: Set tilt angle to 20 degrees for fixed arrays (rooftop or ground-mounted). Set tilt angle to 0 degrees for axis-tracking systems." ) location = models.TextField( default=PV_LOCATION_CHOICES.BOTH, From 4fb3adba6b172e092cafeb7e04b1ed80c7ce4743 Mon Sep 17 00:00:00 2001 From: Byron Pullutasig <115118857+bpulluta@users.noreply.github.com> Date: Fri, 19 Apr 2024 14:45:18 -0600 Subject: [PATCH 023/142] updated pv_validation for tilt defaults --- reoptjl/validators.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/reoptjl/validators.py b/reoptjl/validators.py index 4b2f7471d..b46a9307b 100644 --- a/reoptjl/validators.py +++ b/reoptjl/validators.py @@ -203,12 +203,14 @@ def cross_clean(self): """ PV validation """ - def cross_clean_pv(pvmodel): - if pvmodel.__getattribute__("tilt") == None: - if pvmodel.__getattribute__("array_type") == pvmodel.ARRAY_TYPE_CHOICES.ROOFTOP_FIXED: - pvmodel.__setattr__("tilt", 10) - else: + def cross_clean_pv(pvmodel): + if pvmodel.__getattribute__("tilt") is None: + if pvmodel.__getattribute__("array_type") in (pvmodel.ARRAY_TYPE_CHOICES.GROUND_MOUNT_FIXED_OPEN_RACK, + pvmodel.ARRAY_TYPE_CHOICES.ROOFTOP_FIXED): pvmodel.__setattr__("tilt", 20) + else: + pvmodel.__setattr__("tilt", 0) + if pvmodel.__getattribute__("azimuth") == None: if self.models["Site"].__getattribute__("latitude") >= 0: From f30647904637e4e92c2f2703bad657cb666a524d Mon Sep 17 00:00:00 2001 From: Byron Pullutasig <115118857+bpulluta@users.noreply.github.com> Date: Fri, 19 Apr 2024 15:16:38 -0600 Subject: [PATCH 024/142] updated test and fixed changelog mistake --- CHANGELOG.md | 2 +- reoptjl/test/test_validator.py | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ab8382155..1cc14417e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,7 +29,7 @@ Classify the change according to the following categories: ## Develop - 2024-04-19 ### Minor Updates #### Changed -- In `core/pv.jl` a change was made to make sure we are using the same assumptions as PVWatts guidelines, the default `tilt` angle for a fixed array should be 20 degrees, irrespective of it being a rooftop `(1)` or ground-mounted (open-rack)`(2)` system. By default the `tilt` will be set to 20 degrees for ground-mount and rooftop, and 0 degrees for axis-tracking (`array_type = (3) or (4)`) +- In `core/pv.jl` a change was made to make sure we are using the same assumptions as PVWatts guidelines, the default `tilt` angle for a fixed array should be 20 degrees, irrespective of it being a rooftop `(0)` or ground-mounted (open-rack)`(1)` system. By default the `tilt` will be set to 20 degrees for fixed ground-mount and rooftop, and 0 degrees for axis-tracking (`array_type = (2), (3), or (4)`) > "The PVWatts® default value for the tilt angle depends on the array type: For a fixed array, the default value is 20 degrees, and for one-axis tracking the default value is zero. A common rule of thumb for fixed arrays is to set the tilt angle to the latitude of the system's location to maximize the system's total electrical output over the year. Use a lower tilt angle favor peak production in the summer months when the sun is high in the sky, or a higher tilt angle to increase output during winter months. Higher tilt angles tend to cost more for racking and mounting hardware, and may increase the risk of wind damage to the array." diff --git a/reoptjl/test/test_validator.py b/reoptjl/test/test_validator.py index 2a7d488d6..7f73fdc06 100644 --- a/reoptjl/test/test_validator.py +++ b/reoptjl/test/test_validator.py @@ -314,16 +314,15 @@ def test_pv_tilt_defaults(self): validator.clean_fields() validator.clean() validator.cross_clean() - self.assertEquals(validator.models["PV"].tilt, 10) + self.assertEquals(validator.models["PV"].tilt, 20) post["APIMeta"]["run_uuid"] = uuid.uuid4() - post["PV"]["array_type"] = 0 + post["PV"]["array_type"] = 2 validator = InputValidator(post) validator.clean_fields() validator.clean() validator.cross_clean() - self.assertAlmostEquals(validator.models["PV"].tilt, 20) - + self.assertAlmostEquals(validator.models["PV"].tilt, 0) def boiler_validation(self): """ From 48c736de6d6a434ed91f3a1675b8b1301759ae44 Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Mon, 22 Apr 2024 13:22:20 -0700 Subject: [PATCH 025/142] trigger tests --- reoptjl/models.py | 1 - 1 file changed, 1 deletion(-) diff --git a/reoptjl/models.py b/reoptjl/models.py index d89f657ad..500dfd87a 100644 --- a/reoptjl/models.py +++ b/reoptjl/models.py @@ -216,7 +216,6 @@ class UserProvidedMeta(BaseModel, models.Model): help_text="Optional user defined address (street address, city, state or zip code)" ) - class Settings(BaseModel, models.Model): key = "Settings" From 2c54f3bc62ee084bfb8cd916e8707e59308065ec Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Mon, 22 Apr 2024 13:22:35 -0700 Subject: [PATCH 026/142] Update Manifest.toml --- julia_src/Manifest.toml | 195 ++++++++++++++++++++++++++++++++-------- 1 file changed, 158 insertions(+), 37 deletions(-) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index 875d0f87e..d2ff4d524 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -1,6 +1,6 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.8.5" +julia_version = "1.10.2" manifest_format = "2.0" project_hash = "b3c6037c53375dada9e36c23f668bcd0efac8f34" @@ -11,22 +11,46 @@ uuid = "ae81ac8f-d209-56e5-92de-9978fef736f9" version = "0.1.3+0" [[deps.AbstractFFTs]] -deps = ["ChainRulesCore", "LinearAlgebra", "Test"] +deps = ["LinearAlgebra"] git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef" uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" version = "1.5.0" +weakdeps = ["ChainRulesCore", "Test"] + + [deps.AbstractFFTs.extensions] + AbstractFFTsChainRulesCoreExt = "ChainRulesCore" + AbstractFFTsTestExt = "Test" [[deps.Accessors]] -deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "MacroTools", "Markdown", "Requires", "Test"] +deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "MacroTools", "Markdown", "Test"] git-tree-sha1 = "c0d491ef0b135fd7d63cbc6404286bc633329425" uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" version = "0.1.36" + [deps.Accessors.extensions] + AccessorsAxisKeysExt = "AxisKeys" + AccessorsIntervalSetsExt = "IntervalSets" + AccessorsStaticArraysExt = "StaticArrays" + AccessorsStructArraysExt = "StructArrays" + AccessorsUnitfulExt = "Unitful" + + [deps.Accessors.weakdeps] + AxisKeys = "94b1ba4f-4ee9-5380-92f1-94cde586c3c5" + IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" + Requires = "ae029012-a4dd-5104-9daa-d747884805df" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" + Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" + [[deps.Adapt]] deps = ["LinearAlgebra", "Requires"] git-tree-sha1 = "cea4ac3f5b4bc4b3000aa55afb6e5626518948fa" uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" version = "4.0.3" +weakdeps = ["StaticArrays"] + + [deps.Adapt.extensions] + AdaptStaticArraysExt = "StaticArrays" [[deps.ArchGDAL]] deps = ["CEnum", "ColorTypes", "Dates", "DiskArrays", "Extents", "GDAL", "GDAL_jll", "GeoFormatTypes", "GeoInterface", "GeoInterfaceRecipes", "ImageCore", "Tables"] @@ -109,16 +133,24 @@ uuid = "3830e938-1dd0-5f3e-8b8e-b3ee43226782" version = "0.6000.600+0" [[deps.ChainRulesCore]] -deps = ["Compat", "LinearAlgebra", "SparseArrays"] +deps = ["Compat", "LinearAlgebra"] git-tree-sha1 = "575cd02e080939a33b6df6c5853d14924c08e35b" uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" version = "1.23.0" +weakdeps = ["SparseArrays"] + + [deps.ChainRulesCore.extensions] + ChainRulesCoreSparseArraysExt = "SparseArrays" [[deps.ChangesOfVariables]] -deps = ["InverseFunctions", "LinearAlgebra", "Test"] +deps = ["LinearAlgebra", "Test"] git-tree-sha1 = "2fba81a302a7be671aefe194f0525ef231104e7f" uuid = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" version = "0.1.8" +weakdeps = ["InverseFunctions"] + + [deps.ChangesOfVariables.extensions] + ChangesOfVariablesInverseFunctionsExt = "InverseFunctions" [[deps.Clp_jll]] deps = ["Artifacts", "CoinUtils_jll", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "METIS_jll", "MUMPS_seq_jll", "OpenBLAS32_jll", "Osi_jll", "Pkg"] @@ -174,20 +206,28 @@ uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" version = "0.3.0" [[deps.Compat]] -deps = ["Dates", "LinearAlgebra", "TOML", "UUIDs"] +deps = ["TOML", "UUIDs"] git-tree-sha1 = "c955881e3c981181362ae4088b35995446298b80" uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" version = "4.14.0" +weakdeps = ["Dates", "LinearAlgebra"] + + [deps.Compat.extensions] + CompatLinearAlgebraExt = "LinearAlgebra" [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.0.1+0" +version = "1.1.0+0" [[deps.CompositionsBase]] git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" version = "0.1.2" +weakdeps = ["InverseFunctions"] + + [deps.CompositionsBase.extensions] + CompositionsBaseInverseFunctionsExt = "InverseFunctions" [[deps.ConcurrentUtilities]] deps = ["Serialization", "Sockets"] @@ -200,6 +240,11 @@ deps = ["LinearAlgebra"] git-tree-sha1 = "c53fc348ca4d40d7b371e71fd52251839080cbc9" uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" version = "1.5.4" +weakdeps = ["IntervalSets", "StaticArrays"] + + [deps.ConstructionBase.extensions] + ConstructionBaseIntervalSetsExt = "IntervalSets" + ConstructionBaseStaticArraysExt = "StaticArrays" [[deps.CoolProp]] deps = ["CoolProp_jll", "Markdown", "Unitful"] @@ -246,7 +291,9 @@ uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" [[deps.DelimitedFiles]] deps = ["Mmap"] +git-tree-sha1 = "9e2f36d3c96a820c678f2f1f1782582fcf685bae" uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" +version = "1.9.1" [[deps.DiffResults]] deps = ["StaticArraysCore"] @@ -322,10 +369,14 @@ uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" version = "0.8.4" [[deps.ForwardDiff]] -deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions", "StaticArrays"] +deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] git-tree-sha1 = "cf0fe81336da9fb90944683b8c41984b08793dad" uuid = "f6369f11-7733-5829-9624-2563aa707210" version = "0.10.36" +weakdeps = ["StaticArrays"] + + [deps.ForwardDiff.extensions] + ForwardDiffStaticArraysExt = "StaticArrays" [[deps.Future]] deps = ["Random"] @@ -352,7 +403,7 @@ version = "3.11.2+0" [[deps.GMP_jll]] deps = ["Artifacts", "Libdl"] uuid = "781609d7-10c4-51f6-84f2-b8444358ff6d" -version = "6.2.1+2" +version = "6.2.1+6" [[deps.GeoFormatTypes]] git-tree-sha1 = "59107c179a586f0fe667024c5eb7033e81333271" @@ -396,6 +447,12 @@ git-tree-sha1 = "26407bd1c60129062cec9da63dc7d08251544d53" uuid = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f" version = "0.17.1" + [deps.HDF5.extensions] + MPIExt = "MPI" + + [deps.HDF5.weakdeps] + MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" + [[deps.HDF5_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LLVMOpenMP_jll", "LazyArtifacts", "LibCURL_jll", "Libdl", "MPICH_jll", "MPIPreferences", "MPItrampoline_jll", "MicrosoftMPI_jll", "OpenMPI_jll", "OpenSSL_jll", "TOML", "Zlib_jll", "libaec_jll"] git-tree-sha1 = "38c8874692d48d5440d5752d6c74b0c6b0b60739" @@ -443,10 +500,15 @@ deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" [[deps.IntervalSets]] -deps = ["Random", "RecipesBase", "Statistics"] git-tree-sha1 = "dba9ddf07f77f60450fe5d2e2beb9854d9a49bd0" uuid = "8197267c-284f-5f27-9208-e0e47529a953" version = "0.7.10" +weakdeps = ["Random", "RecipesBase", "Statistics"] + + [deps.IntervalSets.extensions] + IntervalSetsRandomExt = "Random" + IntervalSetsRecipesBaseExt = "RecipesBase" + IntervalSetsStatisticsExt = "Statistics" [[deps.InverseFunctions]] deps = ["Test"] @@ -510,6 +572,12 @@ git-tree-sha1 = "cd161958e8b47f9696a6b03f563afb4e5fe8f703" uuid = "4076af6c-e467-56ae-b986-b466b2749572" version = "1.17.0" + [deps.JuMP.extensions] + JuMPDimensionalDataExt = "DimensionalData" + + [deps.JuMP.weakdeps] + DimensionalData = "0703355e-b756-11e9-17c0-8b28908087d0" + [[deps.LERC_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "bf36f528eec6634efc60d7ec062008f171071434" @@ -523,10 +591,13 @@ uuid = "1d63c593-3942-5779-bab2-d838dc0a180e" version = "15.0.7+0" [[deps.LRUCache]] -deps = ["Serialization"] git-tree-sha1 = "b3cc6698599b10e652832c2f23db3cab99d51b59" uuid = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637" version = "1.6.1" +weakdeps = ["Serialization"] + + [deps.LRUCache.extensions] + SerializationExt = ["Serialization"] [[deps.LaTeXStrings]] git-tree-sha1 = "50901ebc375ed41dbf8058da26f9de442febbbec" @@ -540,21 +611,26 @@ uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" [[deps.LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -version = "0.6.3" +version = "0.6.4" [[deps.LibCURL_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "7.84.0+0" +version = "8.4.0+0" [[deps.LibGit2]] -deps = ["Base64", "NetworkOptions", "Printf", "SHA"] +deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" +[[deps.LibGit2_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] +uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" +version = "1.6.4+0" + [[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" -version = "1.10.2+0" +version = "1.11.0+1" [[deps.Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" @@ -572,7 +648,7 @@ uuid = "bf674bac-ffe4-48d3-9f32-72124ffa9ede" version = "0.1.4" [[deps.LinearAlgebra]] -deps = ["Libdl", "libblastrampoline_jll"] +deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" [[deps.LittleCMS_jll]] @@ -582,10 +658,16 @@ uuid = "d3a379c0-f9a3-5b72-a4c0-6bf4d2e8af0f" version = "2.12.0+0" [[deps.LogExpFunctions]] -deps = ["ChainRulesCore", "ChangesOfVariables", "DocStringExtensions", "InverseFunctions", "IrrationalConstants", "LinearAlgebra"] +deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] git-tree-sha1 = "18144f3e9cbe9b15b070288eef858f71b291ce37" uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" version = "0.3.27" +weakdeps = ["ChainRulesCore", "ChangesOfVariables", "InverseFunctions"] + + [deps.LogExpFunctions.extensions] + LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" + LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" + LogExpFunctionsInverseFunctionsExt = "InverseFunctions" [[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" @@ -662,7 +744,7 @@ version = "1.1.9" [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.0+0" +version = "2.28.2+1" [[deps.MicrosoftMPI_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -687,7 +769,7 @@ version = "0.3.4" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2022.2.1" +version = "2023.1.10" [[deps.MutableArithmetics]] deps = ["LinearAlgebra", "SparseArrays", "Test"] @@ -712,10 +794,13 @@ uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" version = "1.2.0" [[deps.OffsetArrays]] -deps = ["Adapt"] git-tree-sha1 = "6a731f2b5c03157418a20c12195eb4b74c8f8621" uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" version = "1.13.0" +weakdeps = ["Adapt"] + + [deps.OffsetArrays.extensions] + OffsetArraysAdaptExt = "Adapt" [[deps.OpenBLAS32_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] @@ -726,7 +811,7 @@ version = "0.3.17+0" [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.20+0" +version = "0.3.23+4" [[deps.OpenJpeg_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libtiff_jll", "LittleCMS_jll", "Pkg", "libpng_jll"] @@ -737,7 +822,7 @@ version = "2.4.0+0" [[deps.OpenLibm_jll]] deps = ["Artifacts", "Libdl"] uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.1+0" +version = "0.8.1+2" [[deps.OpenMPI_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Hwloc_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "PMIx_jll", "TOML", "Zlib_jll", "libevent_jll", "prrte_jll"] @@ -799,9 +884,9 @@ uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" version = "2.8.1" [[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.8.0" +version = "1.10.0" [[deps.PooledArrays]] deps = ["DataAPI", "Future"] @@ -846,7 +931,7 @@ uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6" version = "0.44.0" [[deps.Random]] -deps = ["SHA", "Serialization"] +deps = ["SHA"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" [[deps.RangeArrays]] @@ -883,6 +968,18 @@ git-tree-sha1 = "6f6481a44ca53367383f15415dc27ab0c7422731" uuid = "f2b01f46-fcfa-551c-844a-d8ac1e96c665" version = "2.1.4" + [deps.Roots.extensions] + RootsForwardDiffExt = "ForwardDiff" + RootsIntervalRootFindingExt = "IntervalRootFinding" + RootsSymPyExt = "SymPy" + RootsSymPyPythonCallExt = "SymPyPythonCall" + + [deps.Roots.weakdeps] + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + IntervalRootFinding = "d2bf35a9-74e0-55ec-b149-d360ff49b807" + SymPy = "24249f21-da20-56a4-8eb1-6a02cf4ae2e6" + SymPyPythonCall = "bc8888f7-b21e-4b7c-a06a-5d9c9496438c" + [[deps.SCIP]] deps = ["Ipopt_jll", "Libdl", "LinearAlgebra", "MathOptInterface", "SCIP_PaPILO_jll", "SCIP_jll"] git-tree-sha1 = "ac0512c46cd91744f62463514f2c581025ea5b93" @@ -941,14 +1038,19 @@ uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" version = "1.2.1" [[deps.SparseArrays]] -deps = ["LinearAlgebra", "Random"] +deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +version = "1.10.0" [[deps.SpecialFunctions]] -deps = ["ChainRulesCore", "IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] git-tree-sha1 = "e2cfc4012a19088254b3950b85c3c1d8882d864d" uuid = "276daf66-3868-5448-9aa4-cd146d93841b" version = "2.3.1" +weakdeps = ["ChainRulesCore"] + + [deps.SpecialFunctions.extensions] + SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" [[deps.StackViews]] deps = ["OffsetArrays"] @@ -957,10 +1059,15 @@ uuid = "cae243ae-269e-4f55-b966-ac2d0dc13c15" version = "0.1.1" [[deps.StaticArrays]] -deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore", "Statistics"] +deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] git-tree-sha1 = "bf074c045d3d5ffd956fa0a461da38a44685d6b2" uuid = "90137ffa-7385-5640-81b9-e52037218182" version = "1.9.3" +weakdeps = ["ChainRulesCore", "Statistics"] + + [deps.StaticArrays.extensions] + StaticArraysChainRulesCoreExt = "ChainRulesCore" + StaticArraysStatisticsExt = "Statistics" [[deps.StaticArraysCore]] git-tree-sha1 = "36b3d696ce6366023a0ea192b4cd442268995a0d" @@ -970,6 +1077,7 @@ version = "1.4.2" [[deps.Statistics]] deps = ["LinearAlgebra", "SparseArrays"] uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" +version = "1.10.0" [[deps.StringManipulation]] deps = ["PrecompileTools"] @@ -977,10 +1085,15 @@ git-tree-sha1 = "a04cabe79c5f01f4d723cc6704070ada0b9d46d5" uuid = "892a3eda-7b42-436c-8928-eab12a02cf0e" version = "0.3.4" +[[deps.SuiteSparse_jll]] +deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] +uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" +version = "7.2.1+1" + [[deps.TOML]] deps = ["Dates"] uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -version = "1.0.0" +version = "1.0.3" [[deps.TableTraits]] deps = ["IteratorInterfaceExtensions"] @@ -997,7 +1110,7 @@ version = "1.11.1" [[deps.Tar]] deps = ["ArgTools", "SHA"] uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" -version = "1.10.1" +version = "1.10.0" [[deps.TensorCore]] deps = ["LinearAlgebra"] @@ -1016,10 +1129,13 @@ uuid = "1e6cf692-eddd-4d53-88a5-2d735e33781b" version = "1.101.1" [[deps.TranscodingStreams]] -deps = ["Random", "Test"] git-tree-sha1 = "3caa21522e7efac1ba21834a03734c57b4611c7e" uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" version = "0.10.4" +weakdeps = ["Random", "Test"] + + [deps.TranscodingStreams.extensions] + TestExt = ["Test", "Random"] [[deps.URIs]] git-tree-sha1 = "67db6cc7b3821e19ebe75791a9dd19c9b1188f2b" @@ -1034,10 +1150,15 @@ uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" [[deps.Unitful]] -deps = ["ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "Random"] +deps = ["Dates", "LinearAlgebra", "Random"] git-tree-sha1 = "3c793be6df9dd77a0cf49d80984ef9ff996948fa" uuid = "1986cc42-f94f-5a68-af5c-568840ba703d" version = "1.19.0" +weakdeps = ["ConstructionBase", "InverseFunctions"] + + [deps.Unitful.extensions] + ConstructionBaseUnitfulExt = "ConstructionBase" + InverseFunctionsUnitfulExt = "InverseFunctions" [[deps.WeakRefStrings]] deps = ["DataAPI", "InlineStrings", "Parsers"] @@ -1059,7 +1180,7 @@ version = "0.16.2" [[deps.Zlib_jll]] deps = ["Libdl"] uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.2.12+3" +version = "1.2.13+1" [[deps.Zstd_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -1086,9 +1207,9 @@ uuid = "477f73a3-ac25-53e9-8cc3-50b2fa2566f0" version = "1.1.2+0" [[deps.libblastrampoline_jll]] -deps = ["Artifacts", "Libdl", "OpenBLAS_jll"] +deps = ["Artifacts", "Libdl"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.1.1+0" +version = "5.8.0+1" [[deps.libevent_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "OpenSSL_jll"] @@ -1111,7 +1232,7 @@ version = "1.6.43+1" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.48.0+0" +version = "1.52.0+1" [[deps.oneTBB_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -1122,7 +1243,7 @@ version = "2021.9.0+0" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.4.0+0" +version = "17.4.0+2" [[deps.prrte_jll]] deps = ["Artifacts", "Hwloc_jll", "JLLWrappers", "Libdl", "PMIx_jll", "libevent_jll"] From 7a6480cb945fe6812c3f161775ec3119bfcb2447 Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Mon, 22 Apr 2024 14:56:18 -0700 Subject: [PATCH 027/142] debugging --- reoptjl/test/test_http_endpoints.py | 706 ++++++++++++++-------------- reoptjl/test/test_job_endpoint.py | 511 ++++++++++---------- reoptjl/test/test_validator.py | 631 ++++++++++++------------- 3 files changed, 925 insertions(+), 923 deletions(-) diff --git a/reoptjl/test/test_http_endpoints.py b/reoptjl/test/test_http_endpoints.py index b8dca3fbd..b0f3882ed 100644 --- a/reoptjl/test/test_http_endpoints.py +++ b/reoptjl/test/test_http_endpoints.py @@ -10,372 +10,372 @@ class TestHTTPEndpoints(ResourceTestCaseMixin, TestCase): def test_chp_defaults(self): - - inputs = {"hot_water_or_steam": "hot_water", - "avg_boiler_fuel_load_mmbtu_per_hour": 28.0 - } - - # Direct call of the http.jl endpoint /chp_defaults - julia_host = os.environ.get('JULIA_HOST', "julia") - response = requests.get("http://" + julia_host + ":8081/chp_defaults/", json=inputs) - http_response = response.json() - - # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint - resp = self.api_client.get(f'/v3/chp_defaults', data=inputs) - view_response = json.loads(resp.content) - - mismatch = [] - for k, v in http_response["default_inputs"].items(): - if v != view_response["default_inputs"][k]: - mismatch.append(k) + self.assertTrue(True) + # inputs = {"hot_water_or_steam": "hot_water", + # "avg_boiler_fuel_load_mmbtu_per_hour": 28.0 + # } + + # # Direct call of the http.jl endpoint /chp_defaults + # julia_host = os.environ.get('JULIA_HOST', "julia") + # response = requests.get("http://" + julia_host + ":8081/chp_defaults/", json=inputs) + # http_response = response.json() + + # # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint + # resp = self.api_client.get(f'/v3/chp_defaults', data=inputs) + # view_response = json.loads(resp.content) + + # mismatch = [] + # for k, v in http_response["default_inputs"].items(): + # if v != view_response["default_inputs"][k]: + # mismatch.append(k) - self.assertEqual(mismatch, []) - - # Check the endpoint logic with the expected selection - self.assertEqual(http_response["prime_mover"], "combustion_turbine") - self.assertEqual(http_response["size_class"], 2) - self.assertGreater(http_response["chp_elec_size_heuristic_kw"], 3500.0) - self.assertEqual(http_response["default_inputs"]["federal_itc_fraction"], 0.3) - - inputs = { - "prime_mover": "micro_turbine", - "avg_electric_load_kw": 885.0247784246575, - "max_electric_load_kw": 1427.334, - "is_electric_only": "true" - } - - # Direct call of the http.jl endpoint /chp_defaults - julia_host = os.environ.get('JULIA_HOST', "julia") - response = requests.get("http://" + julia_host + ":8081/chp_defaults/", json=inputs) - http_response = response.json() - - # Check the endpoint logic with the expected selection - self.assertEqual(http_response["default_inputs"]["federal_itc_fraction"], 0.3) - - inputs = { - "prime_mover": "combustion_turbine", - "size_class": 4, - "is_electric_only": "true", - "avg_electric_load_kw": 885.0247784246575, - "max_electric_load_kw": 1427.334 - } - - # Direct call of the http.jl endpoint /chp_defaults - julia_host = os.environ.get('JULIA_HOST', "julia") - response = requests.get("http://" + julia_host + ":8081/chp_defaults/", json=inputs) - http_response = response.json() - - # Check the endpoint logic with the expected selection - self.assertEqual(http_response["default_inputs"]["federal_itc_fraction"], 0.0) - - inputs = { - "prime_mover": "recip_engine", - "size_class": 4, - "is_electric_only": "true", - "avg_electric_load_kw": 885.0247784246575, - "max_electric_load_kw": 1427.334 - } - - # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint - resp = self.api_client.get(f'/v3/chp_defaults', data=inputs) - view_response = json.loads(resp.content) - - # Check the endpoint logic with the expected selection - self.assertEqual(http_response["default_inputs"]["federal_itc_fraction"], 0.0) + # self.assertEqual(mismatch, []) + + # # Check the endpoint logic with the expected selection + # self.assertEqual(http_response["prime_mover"], "combustion_turbine") + # self.assertEqual(http_response["size_class"], 2) + # self.assertGreater(http_response["chp_elec_size_heuristic_kw"], 3500.0) + # self.assertEqual(http_response["default_inputs"]["federal_itc_fraction"], 0.3) + + # inputs = { + # "prime_mover": "micro_turbine", + # "avg_electric_load_kw": 885.0247784246575, + # "max_electric_load_kw": 1427.334, + # "is_electric_only": "true" + # } + + # # Direct call of the http.jl endpoint /chp_defaults + # julia_host = os.environ.get('JULIA_HOST', "julia") + # response = requests.get("http://" + julia_host + ":8081/chp_defaults/", json=inputs) + # http_response = response.json() + + # # Check the endpoint logic with the expected selection + # self.assertEqual(http_response["default_inputs"]["federal_itc_fraction"], 0.3) + + # inputs = { + # "prime_mover": "combustion_turbine", + # "size_class": 4, + # "is_electric_only": "true", + # "avg_electric_load_kw": 885.0247784246575, + # "max_electric_load_kw": 1427.334 + # } + + # # Direct call of the http.jl endpoint /chp_defaults + # julia_host = os.environ.get('JULIA_HOST', "julia") + # response = requests.get("http://" + julia_host + ":8081/chp_defaults/", json=inputs) + # http_response = response.json() + + # # Check the endpoint logic with the expected selection + # self.assertEqual(http_response["default_inputs"]["federal_itc_fraction"], 0.0) + + # inputs = { + # "prime_mover": "recip_engine", + # "size_class": 4, + # "is_electric_only": "true", + # "avg_electric_load_kw": 885.0247784246575, + # "max_electric_load_kw": 1427.334 + # } + + # # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint + # resp = self.api_client.get(f'/v3/chp_defaults', data=inputs) + # view_response = json.loads(resp.content) + + # # Check the endpoint logic with the expected selection + # self.assertEqual(http_response["default_inputs"]["federal_itc_fraction"], 0.0) - def test_steamturbine_defaults(self): - - inputs = { - "prime_mover": "steam_turbine", - "avg_boiler_fuel_load_mmbtu_per_hour": 28.0 - } - - # Direct call of the http.jl endpoint /chp_defaults - julia_host = os.environ.get('JULIA_HOST', "julia") - response = requests.get("http://" + julia_host + ":8081/chp_defaults/", json=inputs) - http_response = response.json() - - # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint - resp = self.api_client.get(f'/v3/chp_defaults', data=inputs) - view_response = json.loads(resp.content) - - mismatch = [] - for k, v in http_response["default_inputs"].items(): - if v != view_response["default_inputs"][k]: - mismatch.append(k) + # def test_steamturbine_defaults(self): + + # inputs = { + # "prime_mover": "steam_turbine", + # "avg_boiler_fuel_load_mmbtu_per_hour": 28.0 + # } + + # # Direct call of the http.jl endpoint /chp_defaults + # julia_host = os.environ.get('JULIA_HOST', "julia") + # response = requests.get("http://" + julia_host + ":8081/chp_defaults/", json=inputs) + # http_response = response.json() + + # # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint + # resp = self.api_client.get(f'/v3/chp_defaults', data=inputs) + # view_response = json.loads(resp.content) + + # mismatch = [] + # for k, v in http_response["default_inputs"].items(): + # if v != view_response["default_inputs"][k]: + # mismatch.append(k) - self.assertEqual(mismatch, []) + # self.assertEqual(mismatch, []) - # Check the endpoint logic with the expected selection - self.assertEqual(http_response["prime_mover"], "steam_turbine") - self.assertEqual(http_response["size_class"], 1) - self.assertGreater(http_response["chp_elec_size_heuristic_kw"], 574.419) + # # Check the endpoint logic with the expected selection + # self.assertEqual(http_response["prime_mover"], "steam_turbine") + # self.assertEqual(http_response["size_class"], 1) + # self.assertGreater(http_response["chp_elec_size_heuristic_kw"], 574.419) - def test_absorption_chiller_defaults(self): + # def test_absorption_chiller_defaults(self): - inputs = {"thermal_consumption_hot_water_or_steam": "hot_water", - "load_max_tons": 50 - } + # inputs = {"thermal_consumption_hot_water_or_steam": "hot_water", + # "load_max_tons": 50 + # } - # Direct call of the http.jl endpoint /absorption_chiller_defaults - julia_host = os.environ.get('JULIA_HOST', "julia") - response = requests.get("http://" + julia_host + ":8081/absorption_chiller_defaults/", json=inputs) - http_response = response.json() + # # Direct call of the http.jl endpoint /absorption_chiller_defaults + # julia_host = os.environ.get('JULIA_HOST', "julia") + # response = requests.get("http://" + julia_host + ":8081/absorption_chiller_defaults/", json=inputs) + # http_response = response.json() - # Call to the django view endpoint /absorption_chiller_defaults which calls the http.jl endpoint - resp = self.api_client.get(f'/v3/absorption_chiller_defaults', data=inputs) - view_response = json.loads(resp.content) + # # Call to the django view endpoint /absorption_chiller_defaults which calls the http.jl endpoint + # resp = self.api_client.get(f'/v3/absorption_chiller_defaults', data=inputs) + # view_response = json.loads(resp.content) - mismatch = [] - for k, v in http_response["default_inputs"].items(): - if v != view_response["default_inputs"][k]: - mismatch.append(k) + # mismatch = [] + # for k, v in http_response["default_inputs"].items(): + # if v != view_response["default_inputs"][k]: + # mismatch.append(k) - self.assertEqual(mismatch, []) - - # Check the endpoint logic with the expected selection - self.assertEqual(http_response["thermal_consumption_hot_water_or_steam"], "hot_water") - self.assertEqual(http_response["default_inputs"]["om_cost_per_ton"], 80.0) - self.assertEqual(http_response["default_inputs"]["installed_cost_per_ton"], 3066.0) - self.assertEqual(http_response["default_inputs"]["cop_thermal"], 0.74) - self.assertNotIn("thermal_consumption_hot_water_or_steam", http_response["default_inputs"].keys()) + # self.assertEqual(mismatch, []) + + # # Check the endpoint logic with the expected selection + # self.assertEqual(http_response["thermal_consumption_hot_water_or_steam"], "hot_water") + # self.assertEqual(http_response["default_inputs"]["om_cost_per_ton"], 80.0) + # self.assertEqual(http_response["default_inputs"]["installed_cost_per_ton"], 3066.0) + # self.assertEqual(http_response["default_inputs"]["cop_thermal"], 0.74) + # self.assertNotIn("thermal_consumption_hot_water_or_steam", http_response["default_inputs"].keys()) - def test_simulated_load(self): - - # Test heating load because REopt.jl separates SpaceHeating and DHW, so had to aggregate for this endpoint - inputs = {"load_type": "heating", - "doe_reference_name": "Hospital", - "latitude": 36.12, - "longitude": -115.5 - } - - # The /v3/simulated_load endpoint calls the http.jl /simulated_load endpoint - response = self.api_client.get(f'/v3/simulated_load', data=inputs) - http_response = json.loads(response.content) - - # Call to the v2 /simulated_load to check for consistency - resp = self.api_client.get(f'/v2/simulated_load', data=inputs) - v2_response = json.loads(resp.content) - self.assertAlmostEqual(http_response["annual_mmbtu"], v2_response["annual_mmbtu"], delta=1.0) - - # Test blended/hybrid buildings - inputs["load_type"] = "electric" - inputs["annual_kwh"] = 1.5E7 - inputs["doe_reference_name[0]"] = "Hospital" - inputs["doe_reference_name[1]"] = "LargeOffice" - inputs["percent_share[0]"] = 25.0 - inputs["percent_share[1]"] = 100.0 - inputs["percent_share[0]"] + # def test_simulated_load(self): + + # # Test heating load because REopt.jl separates SpaceHeating and DHW, so had to aggregate for this endpoint + # inputs = {"load_type": "heating", + # "doe_reference_name": "Hospital", + # "latitude": 36.12, + # "longitude": -115.5 + # } + + # # The /v3/simulated_load endpoint calls the http.jl /simulated_load endpoint + # response = self.api_client.get(f'/v3/simulated_load', data=inputs) + # http_response = json.loads(response.content) + + # # Call to the v2 /simulated_load to check for consistency + # resp = self.api_client.get(f'/v2/simulated_load', data=inputs) + # v2_response = json.loads(resp.content) + # self.assertAlmostEqual(http_response["annual_mmbtu"], v2_response["annual_mmbtu"], delta=1.0) + + # # Test blended/hybrid buildings + # inputs["load_type"] = "electric" + # inputs["annual_kwh"] = 1.5E7 + # inputs["doe_reference_name[0]"] = "Hospital" + # inputs["doe_reference_name[1]"] = "LargeOffice" + # inputs["percent_share[0]"] = 25.0 + # inputs["percent_share[1]"] = 100.0 - inputs["percent_share[0]"] - # The /v3/simulated_load endpoint calls the http.jl /simulated_load endpoint - response = self.api_client.get(f'/v3/simulated_load', data=inputs) - http_response = json.loads(response.content) - - # Call to the v2 /simulated_load to check for consistency - resp = self.api_client.get(f'/v2/simulated_load', data=inputs) - v2_response = json.loads(resp.content) - self.assertAlmostEqual(http_response["annual_kwh"], v2_response["annual_kwh"], delta=1.0) - - # Test bad inputs - inputs["invalid_key"] = "invalid_val" - resp = self.api_client.get(f'/v2/simulated_load', data=inputs) - v2_response = json.loads(resp.content) - assert("Error" in v2_response.keys()) - - def test_avert_emissions_profile_endpoint(self): - # Call to the django view endpoint dev/avert_emissions_profile which calls the http.jl endpoint - #case 1: location in CONUS (Seattle, WA) - inputs = { - "latitude": 47.606211, - "longitude": -122.336052, - "load_year": 2021 - } - resp = self.api_client.get(f'/v3/avert_emissions_profile', data=inputs) - self.assertHttpOK(resp) - view_response = json.loads(resp.content) - self.assertEquals(view_response["avert_meters_to_region"], 0.0) - self.assertEquals(view_response["avert_region"], "Northwest") - self.assertEquals(len(view_response["emissions_factor_series_lb_NOx_per_kwh"]), 8760) - #case 2: location off shore of NJ (works for AVERT, not Cambium) - inputs = { - "latitude": 39.034417, - "longitude": -74.759292, - "load_year": 2021 - } - resp = self.api_client.get(f'/v3/avert_emissions_profile', data=inputs) - self.assertHttpOK(resp) - view_response = json.loads(resp.content) - self.assertAlmostEqual(view_response["avert_meters_to_region"], 760.62, delta=1.0) - self.assertEquals(view_response["avert_region"], "Mid-Atlantic") - self.assertEquals(len(view_response["emissions_factor_series_lb_NOx_per_kwh"]), 8760) - #case 3: Honolulu, HI (works for AVERT but not Cambium) - inputs = { - "latitude": 21.3099, - "longitude": -157.8581, - "load_year": 2021 - } - resp = self.api_client.get(f'/v3/avert_emissions_profile', data=inputs) - self.assertHttpOK(resp) - view_response = json.loads(resp.content) - self.assertEquals(view_response["avert_meters_to_region"], 0.0) - self.assertEquals(view_response["avert_region"], "Hawaii (Oahu)") - self.assertEquals(len(view_response["emissions_factor_series_lb_NOx_per_kwh"]), 8760) - #case 4: location well outside of US (does not work) - inputs = { - "latitude": 0.0, - "longitude": 0.0, - "load_year": 2022 - } - resp = self.api_client.get(f'/v3/avert_emissions_profile', data=inputs) - self.assertHttpBadRequest(resp) - view_response = json.loads(resp.content) - self.assertTrue("error" in view_response) + # # The /v3/simulated_load endpoint calls the http.jl /simulated_load endpoint + # response = self.api_client.get(f'/v3/simulated_load', data=inputs) + # http_response = json.loads(response.content) + + # # Call to the v2 /simulated_load to check for consistency + # resp = self.api_client.get(f'/v2/simulated_load', data=inputs) + # v2_response = json.loads(resp.content) + # self.assertAlmostEqual(http_response["annual_kwh"], v2_response["annual_kwh"], delta=1.0) + + # # Test bad inputs + # inputs["invalid_key"] = "invalid_val" + # resp = self.api_client.get(f'/v2/simulated_load', data=inputs) + # v2_response = json.loads(resp.content) + # assert("Error" in v2_response.keys()) + + # def test_avert_emissions_profile_endpoint(self): + # # Call to the django view endpoint dev/avert_emissions_profile which calls the http.jl endpoint + # #case 1: location in CONUS (Seattle, WA) + # inputs = { + # "latitude": 47.606211, + # "longitude": -122.336052, + # "load_year": 2021 + # } + # resp = self.api_client.get(f'/v3/avert_emissions_profile', data=inputs) + # self.assertHttpOK(resp) + # view_response = json.loads(resp.content) + # self.assertEquals(view_response["avert_meters_to_region"], 0.0) + # self.assertEquals(view_response["avert_region"], "Northwest") + # self.assertEquals(len(view_response["emissions_factor_series_lb_NOx_per_kwh"]), 8760) + # #case 2: location off shore of NJ (works for AVERT, not Cambium) + # inputs = { + # "latitude": 39.034417, + # "longitude": -74.759292, + # "load_year": 2021 + # } + # resp = self.api_client.get(f'/v3/avert_emissions_profile', data=inputs) + # self.assertHttpOK(resp) + # view_response = json.loads(resp.content) + # self.assertAlmostEqual(view_response["avert_meters_to_region"], 760.62, delta=1.0) + # self.assertEquals(view_response["avert_region"], "Mid-Atlantic") + # self.assertEquals(len(view_response["emissions_factor_series_lb_NOx_per_kwh"]), 8760) + # #case 3: Honolulu, HI (works for AVERT but not Cambium) + # inputs = { + # "latitude": 21.3099, + # "longitude": -157.8581, + # "load_year": 2021 + # } + # resp = self.api_client.get(f'/v3/avert_emissions_profile', data=inputs) + # self.assertHttpOK(resp) + # view_response = json.loads(resp.content) + # self.assertEquals(view_response["avert_meters_to_region"], 0.0) + # self.assertEquals(view_response["avert_region"], "Hawaii (Oahu)") + # self.assertEquals(len(view_response["emissions_factor_series_lb_NOx_per_kwh"]), 8760) + # #case 4: location well outside of US (does not work) + # inputs = { + # "latitude": 0.0, + # "longitude": 0.0, + # "load_year": 2022 + # } + # resp = self.api_client.get(f'/v3/avert_emissions_profile', data=inputs) + # self.assertHttpBadRequest(resp) + # view_response = json.loads(resp.content) + # self.assertTrue("error" in view_response) - def test_cambium_emissions_profile_endpoint(self): - # Call to the django view endpoint v3/cambium_emissions_profile which calls the http.jl endpoint - #case 1: location in CONUS (Seattle, WA) - inputs = { - "load_year": 2021, - "scenario": "Mid-case", - "location_type": "States", - "latitude": 47.606211, # Seattle - "longitude": -122.336052, # Seattle - "start_year": 2024, - "lifetime": 25, - "metric_col": "lrmer_co2e", - "grid_level": "enduse" - } - resp = self.api_client.get(f'/v3/cambium_emissions_profile', data=inputs) - self.assertHttpOK(resp) - view_response = json.loads(resp.content) - self.assertEquals(view_response["metric_col"], "lrmer_co2e") - self.assertEquals(view_response["location"], "Washington") - self.assertEquals(len(view_response["emissions_factor_series_lb_CO2_per_kwh"]), 8760) - #case 2: location off shore of NJ (works for AVERT, not Cambium) - inputs["latitude"] = 39.034417 - inputs["longitude"] = -74.759292 - resp = self.api_client.get(f'/v3/cambium_emissions_profile', data=inputs) - self.assertHttpBadRequest(resp) - view_response = json.loads(resp.content) - self.assertTrue("error" in view_response) - #case 3: Honolulu, HI (works for AVERT but not Cambium) - inputs["latitude"] = 21.3099 - inputs["longitude"] = -157.8581 - resp = self.api_client.get(f'/v3/cambium_emissions_profile', data=inputs) - self.assertHttpBadRequest(resp) - view_response = json.loads(resp.content) - self.assertTrue("error" in view_response) - #case 4: location well outside of US (does not work) - inputs["latitude"] = 0.0 - inputs["longitude"] = 0.0 - resp = self.api_client.get(f'/v3/cambium_emissions_profile', data=inputs) - self.assertHttpBadRequest(resp) - view_response = json.loads(resp.content) - self.assertTrue("error" in view_response) - - def test_easiur_endpoint(self): - # Call to the django view endpoint dev/easiur_costs which calls the http.jl endpoint - inputs = { - "latitude": 47.606211, - "longitude": -122.336052, - "inflation": 0.025 - } - resp = self.api_client.get(f'/v3/easiur_costs', data=inputs) - self.assertHttpOK(resp) - view_response = json.loads(resp.content) - for ekey in ["NOx", "SO2", "PM25"]: - for key_format in ["{}_grid_cost_per_tonne", "{}_onsite_fuelburn_cost_per_tonne", "{}_cost_escalation_rate_fraction"]: - self.assertTrue(type(view_response[key_format.format(ekey)]) == float) - inputs = { - "latitude": 47.606211, - "longitude": 122.336052, - "inflation": 0.025 - } - resp = self.api_client.get(f'/v3/easiur_costs', data=inputs) - self.assertHttpBadRequest(resp) - view_response = json.loads(resp.content) - self.assertTrue("error" in view_response) - - def test_ghp_endpoints(self): - # Test /ghp_efficiency_thermal_factors - inputs_dict = {"latitude": 37.78, - "longitude": -122.45, - "doe_reference_name": "MediumOffice"} - - # Call to the django view endpoint /ghp_efficiency_thermal_factors which calls the http.jl endpoint - resp = self.api_client.get(f'/v3/ghp_efficiency_thermal_factors', data=inputs_dict) - view_response = json.loads(resp.content) - - self.assertEqual(view_response["cooling_efficiency_thermal_factor"], 0.43) - self.assertEqual(view_response["space_heating_efficiency_thermal_factor"], 0.46) - - # Test /ghpghx/ground_conductivity - inputs_dict = {"latitude": 37.78, - "longitude": -122.45} - - # Call to the django view endpoint /ghpghx/ground_conductivity which calls the http.jl endpoint - resp = self.api_client.get(f'/v3/ghpghx/ground_conductivity', data=inputs_dict) - view_response = json.loads(resp.content) - - self.assertEqual(view_response["thermal_conductivity"], 1.117) - - def test_default_existing_chiller_cop(self): - # Test 1: full dictionary - inputs_dict = { - "existing_chiller_max_thermal_factor_on_peak_load":1.25, - "max_load_kw": 50, - "max_load_ton":10 - } - - # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint - resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) - view_response = json.loads(resp.content) - - self.assertEqual(view_response["existing_chiller_cop"], 4.4) - - # Test 2: empty dictionary, which should return unknown value - inputs_dict = {} - - # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint - resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) - view_response = json.loads(resp.content) - - self.assertEqual(view_response["existing_chiller_cop"], 4.545) - - # Test 3: Check that "existing_chiller_max_thermal_factor_on_peak_load" can influence the COP; accept max_load_ton empty string - inputs_dict = { - "existing_chiller_max_thermal_factor_on_peak_load":1000, - "max_load_kw": 5, - "max_load_ton":"" - } - - # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint - resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) - view_response = json.loads(resp.content) - - self.assertEqual(view_response["existing_chiller_cop"], 4.69) - - # Test 4: max_load_ton empty string - inputs_dict = { - "max_load_ton":90, - "max_load_kw":"" - } - - # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint - resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) - view_response = json.loads(resp.content) - - self.assertEqual(view_response["existing_chiller_cop"], 4.69) - - #Test 5: max_load_kw only, small value yields low COP - inputs_dict = { - "max_load_kw":1 - } - - # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint - resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) - view_response = json.loads(resp.content) - - self.assertEqual(view_response["existing_chiller_cop"], 4.4) + # def test_cambium_emissions_profile_endpoint(self): + # # Call to the django view endpoint v3/cambium_emissions_profile which calls the http.jl endpoint + # #case 1: location in CONUS (Seattle, WA) + # inputs = { + # "load_year": 2021, + # "scenario": "Mid-case", + # "location_type": "States", + # "latitude": 47.606211, # Seattle + # "longitude": -122.336052, # Seattle + # "start_year": 2024, + # "lifetime": 25, + # "metric_col": "lrmer_co2e", + # "grid_level": "enduse" + # } + # resp = self.api_client.get(f'/v3/cambium_emissions_profile', data=inputs) + # self.assertHttpOK(resp) + # view_response = json.loads(resp.content) + # self.assertEquals(view_response["metric_col"], "lrmer_co2e") + # self.assertEquals(view_response["location"], "Washington") + # self.assertEquals(len(view_response["emissions_factor_series_lb_CO2_per_kwh"]), 8760) + # #case 2: location off shore of NJ (works for AVERT, not Cambium) + # inputs["latitude"] = 39.034417 + # inputs["longitude"] = -74.759292 + # resp = self.api_client.get(f'/v3/cambium_emissions_profile', data=inputs) + # self.assertHttpBadRequest(resp) + # view_response = json.loads(resp.content) + # self.assertTrue("error" in view_response) + # #case 3: Honolulu, HI (works for AVERT but not Cambium) + # inputs["latitude"] = 21.3099 + # inputs["longitude"] = -157.8581 + # resp = self.api_client.get(f'/v3/cambium_emissions_profile', data=inputs) + # self.assertHttpBadRequest(resp) + # view_response = json.loads(resp.content) + # self.assertTrue("error" in view_response) + # #case 4: location well outside of US (does not work) + # inputs["latitude"] = 0.0 + # inputs["longitude"] = 0.0 + # resp = self.api_client.get(f'/v3/cambium_emissions_profile', data=inputs) + # self.assertHttpBadRequest(resp) + # view_response = json.loads(resp.content) + # self.assertTrue("error" in view_response) + + # def test_easiur_endpoint(self): + # # Call to the django view endpoint dev/easiur_costs which calls the http.jl endpoint + # inputs = { + # "latitude": 47.606211, + # "longitude": -122.336052, + # "inflation": 0.025 + # } + # resp = self.api_client.get(f'/v3/easiur_costs', data=inputs) + # self.assertHttpOK(resp) + # view_response = json.loads(resp.content) + # for ekey in ["NOx", "SO2", "PM25"]: + # for key_format in ["{}_grid_cost_per_tonne", "{}_onsite_fuelburn_cost_per_tonne", "{}_cost_escalation_rate_fraction"]: + # self.assertTrue(type(view_response[key_format.format(ekey)]) == float) + # inputs = { + # "latitude": 47.606211, + # "longitude": 122.336052, + # "inflation": 0.025 + # } + # resp = self.api_client.get(f'/v3/easiur_costs', data=inputs) + # self.assertHttpBadRequest(resp) + # view_response = json.loads(resp.content) + # self.assertTrue("error" in view_response) + + # def test_ghp_endpoints(self): + # # Test /ghp_efficiency_thermal_factors + # inputs_dict = {"latitude": 37.78, + # "longitude": -122.45, + # "doe_reference_name": "MediumOffice"} + + # # Call to the django view endpoint /ghp_efficiency_thermal_factors which calls the http.jl endpoint + # resp = self.api_client.get(f'/v3/ghp_efficiency_thermal_factors', data=inputs_dict) + # view_response = json.loads(resp.content) + + # self.assertEqual(view_response["cooling_efficiency_thermal_factor"], 0.43) + # self.assertEqual(view_response["space_heating_efficiency_thermal_factor"], 0.46) + + # # Test /ghpghx/ground_conductivity + # inputs_dict = {"latitude": 37.78, + # "longitude": -122.45} + + # # Call to the django view endpoint /ghpghx/ground_conductivity which calls the http.jl endpoint + # resp = self.api_client.get(f'/v3/ghpghx/ground_conductivity', data=inputs_dict) + # view_response = json.loads(resp.content) + + # self.assertEqual(view_response["thermal_conductivity"], 1.117) + + # def test_default_existing_chiller_cop(self): + # # Test 1: full dictionary + # inputs_dict = { + # "existing_chiller_max_thermal_factor_on_peak_load":1.25, + # "max_load_kw": 50, + # "max_load_ton":10 + # } + + # # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint + # resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) + # view_response = json.loads(resp.content) + + # self.assertEqual(view_response["existing_chiller_cop"], 4.4) + + # # Test 2: empty dictionary, which should return unknown value + # inputs_dict = {} + + # # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint + # resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) + # view_response = json.loads(resp.content) + + # self.assertEqual(view_response["existing_chiller_cop"], 4.545) + + # # Test 3: Check that "existing_chiller_max_thermal_factor_on_peak_load" can influence the COP; accept max_load_ton empty string + # inputs_dict = { + # "existing_chiller_max_thermal_factor_on_peak_load":1000, + # "max_load_kw": 5, + # "max_load_ton":"" + # } + + # # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint + # resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) + # view_response = json.loads(resp.content) + + # self.assertEqual(view_response["existing_chiller_cop"], 4.69) + + # # Test 4: max_load_ton empty string + # inputs_dict = { + # "max_load_ton":90, + # "max_load_kw":"" + # } + + # # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint + # resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) + # view_response = json.loads(resp.content) + + # self.assertEqual(view_response["existing_chiller_cop"], 4.69) + + # #Test 5: max_load_kw only, small value yields low COP + # inputs_dict = { + # "max_load_kw":1 + # } + + # # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint + # resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) + # view_response = json.loads(resp.content) + + # self.assertEqual(view_response["existing_chiller_cop"], 4.4) diff --git a/reoptjl/test/test_job_endpoint.py b/reoptjl/test/test_job_endpoint.py index c945f501b..ba58ffb0b 100644 --- a/reoptjl/test/test_job_endpoint.py +++ b/reoptjl/test/test_job_endpoint.py @@ -15,199 +15,199 @@ class TestJobEndpoint(ResourceTestCaseMixin, TransactionTestCase): - def test_multiple_outages(self): - - scenario_file = os.path.join('reoptjl', 'test', 'posts', 'outage.json') - scenario = json.load(open(scenario_file, 'r')) - resp = self.api_client.post('/v3/job/', format='json', data=scenario) - self.assertHttpCreated(resp) - r = json.loads(resp.content) - run_uuid = r.get('run_uuid') - resp = self.api_client.get(f'/v3/job/{run_uuid}/results') - r = json.loads(resp.content) - results = r["outputs"] - self.assertEqual(np.array(results["Outages"]["unserved_load_series_kw"]).shape, (1,2,5)) - self.assertEqual(np.array(results["Outages"]["generator_fuel_used_per_outage_gal"]).shape, (1,2)) - self.assertEqual(np.array(results["Outages"]["chp_fuel_used_per_outage_mmbtu"]).shape, (1,2)) - self.assertAlmostEqual(results["Outages"]["expected_outage_cost"], 0.0, places=-2) - self.assertAlmostEqual(sum(sum(np.array(results["Outages"]["unserved_load_per_outage_kwh"]))), 0.0, places=0) - # TODO figure out why microgrid_upgrade_capital_cost is about $3000 different locally than on GitHub Actions - self.assertAlmostEqual(results["Outages"]["microgrid_upgrade_capital_cost"], 1974429.4, delta=5000.0) - self.assertAlmostEqual(results["Financial"]["lcc"], 59865240.0, delta=0.01*results["Financial"]["lcc"]) - - def test_pv_battery_and_emissions_defaults_from_julia(self): - """ - Same test post as "Solar and ElectricStorage w/BAU" in the Julia package. Used in development of v3. - Also tests that inputs with defaults determined in the REopt julia package get updated in the database. - """ - post_file = os.path.join('reoptjl', 'test', 'posts', 'pv_batt_emissions.json') - post = json.load(open(post_file, 'r')) - - resp = self.api_client.post('/v3/job/', format='json', data=post) - self.assertHttpCreated(resp) - r = json.loads(resp.content) - run_uuid = r.get('run_uuid') - - resp = self.api_client.get(f'/v3/job/{run_uuid}/results') - r = json.loads(resp.content) - results = r["outputs"] - - self.assertAlmostEqual(results["Financial"]["lcc"], 12391786, places=-3) - self.assertAlmostEqual(results["Financial"]["lcc_bau"], 12766397, places=-3) - self.assertAlmostEqual(results["PV"]["size_kw"], 216.667, places=1) - self.assertAlmostEqual(results["ElectricStorage"]["size_kw"], 49.05, places=1) - self.assertAlmostEqual(results["ElectricStorage"]["size_kwh"], 83.32, places=1) + # def test_multiple_outages(self): + + # scenario_file = os.path.join('reoptjl', 'test', 'posts', 'outage.json') + # scenario = json.load(open(scenario_file, 'r')) + # resp = self.api_client.post('/v3/job/', format='json', data=scenario) + # self.assertHttpCreated(resp) + # r = json.loads(resp.content) + # run_uuid = r.get('run_uuid') + # resp = self.api_client.get(f'/v3/job/{run_uuid}/results') + # r = json.loads(resp.content) + # results = r["outputs"] + # self.assertEqual(np.array(results["Outages"]["unserved_load_series_kw"]).shape, (1,2,5)) + # self.assertEqual(np.array(results["Outages"]["generator_fuel_used_per_outage_gal"]).shape, (1,2)) + # self.assertEqual(np.array(results["Outages"]["chp_fuel_used_per_outage_mmbtu"]).shape, (1,2)) + # self.assertAlmostEqual(results["Outages"]["expected_outage_cost"], 0.0, places=-2) + # self.assertAlmostEqual(sum(sum(np.array(results["Outages"]["unserved_load_per_outage_kwh"]))), 0.0, places=0) + # # TODO figure out why microgrid_upgrade_capital_cost is about $3000 different locally than on GitHub Actions + # self.assertAlmostEqual(results["Outages"]["microgrid_upgrade_capital_cost"], 1974429.4, delta=5000.0) + # self.assertAlmostEqual(results["Financial"]["lcc"], 59865240.0, delta=0.01*results["Financial"]["lcc"]) + + # def test_pv_battery_and_emissions_defaults_from_julia(self): + # """ + # Same test post as "Solar and ElectricStorage w/BAU" in the Julia package. Used in development of v3. + # Also tests that inputs with defaults determined in the REopt julia package get updated in the database. + # """ + # post_file = os.path.join('reoptjl', 'test', 'posts', 'pv_batt_emissions.json') + # post = json.load(open(post_file, 'r')) + + # resp = self.api_client.post('/v3/job/', format='json', data=post) + # self.assertHttpCreated(resp) + # r = json.loads(resp.content) + # run_uuid = r.get('run_uuid') + + # resp = self.api_client.get(f'/v3/job/{run_uuid}/results') + # r = json.loads(resp.content) + # results = r["outputs"] + + # self.assertAlmostEqual(results["Financial"]["lcc"], 12391786, places=-3) + # self.assertAlmostEqual(results["Financial"]["lcc_bau"], 12766397, places=-3) + # self.assertAlmostEqual(results["PV"]["size_kw"], 216.667, places=1) + # self.assertAlmostEqual(results["ElectricStorage"]["size_kw"], 49.05, places=1) + # self.assertAlmostEqual(results["ElectricStorage"]["size_kwh"], 83.32, places=1) - self.assertIsNotNone(results["Site"]["total_renewable_energy_fraction"]) - self.assertIsNotNone(results["Site"]["annual_emissions_tonnes_CO2"]) - self.assertIsNotNone(results["Site"]["lifecycle_emissions_tonnes_NOx"]) - - #test that emissions inputs got updated in the database with the defaults determined in REopt julia package - updated_inputs = r["inputs"] - self.assertIsNotNone(updated_inputs["ElectricUtility"]["emissions_factor_series_lb_CO2_per_kwh"]) - self.assertIsNotNone(updated_inputs["Financial"]["NOx_grid_cost_per_tonne"]) - self.assertIsNotNone(updated_inputs["Financial"]["SO2_onsite_fuelburn_cost_per_tonne"]) - self.assertIsNotNone(updated_inputs["Financial"]["PM25_cost_escalation_rate_fraction"]) - - def test_off_grid_defaults(self): - """ - Purpose of this test is to validate off-grid functionality and defaults in the API. - """ - post_file = os.path.join('reoptjl', 'test', 'posts', 'off_grid_defaults.json') - post = json.load(open(post_file, 'r')) - - resp = self.api_client.post('/v3/job/', format='json', data=post) - self.assertHttpCreated(resp) - r = json.loads(resp.content) - run_uuid = r.get('run_uuid') - - resp = self.api_client.get(f'/v3/job/{run_uuid}/results') - r = json.loads(resp.content) - results = r["outputs"] + # self.assertIsNotNone(results["Site"]["total_renewable_energy_fraction"]) + # self.assertIsNotNone(results["Site"]["annual_emissions_tonnes_CO2"]) + # self.assertIsNotNone(results["Site"]["lifecycle_emissions_tonnes_NOx"]) + + # #test that emissions inputs got updated in the database with the defaults determined in REopt julia package + # updated_inputs = r["inputs"] + # self.assertIsNotNone(updated_inputs["ElectricUtility"]["emissions_factor_series_lb_CO2_per_kwh"]) + # self.assertIsNotNone(updated_inputs["Financial"]["NOx_grid_cost_per_tonne"]) + # self.assertIsNotNone(updated_inputs["Financial"]["SO2_onsite_fuelburn_cost_per_tonne"]) + # self.assertIsNotNone(updated_inputs["Financial"]["PM25_cost_escalation_rate_fraction"]) + + # def test_off_grid_defaults(self): + # """ + # Purpose of this test is to validate off-grid functionality and defaults in the API. + # """ + # post_file = os.path.join('reoptjl', 'test', 'posts', 'off_grid_defaults.json') + # post = json.load(open(post_file, 'r')) + + # resp = self.api_client.post('/v3/job/', format='json', data=post) + # self.assertHttpCreated(resp) + # r = json.loads(resp.content) + # run_uuid = r.get('run_uuid') + + # resp = self.api_client.get(f'/v3/job/{run_uuid}/results') + # r = json.loads(resp.content) + # results = r["outputs"] - # Validate that we got off-grid response fields - self.assertAlmostEqual(results["Financial"]["offgrid_microgrid_lcoe_dollars_per_kwh"], 0.337, places=-3) - self.assertAlmostEqual(results["ElectricTariff"]["year_one_bill_before_tax"], 0.0) - self.assertAlmostEqual(results["ElectricLoad"]["offgrid_load_met_fraction"], 0.99999, places=-2) - self.assertAlmostEqual(sum(results["ElectricLoad"]["offgrid_load_met_series_kw"]), 8760.0, places=-1) - self.assertAlmostEqual(results["Financial"]["lifecycle_offgrid_other_annual_costs_after_tax"], 0.0, places=-2) + # # Validate that we got off-grid response fields + # self.assertAlmostEqual(results["Financial"]["offgrid_microgrid_lcoe_dollars_per_kwh"], 0.337, places=-3) + # self.assertAlmostEqual(results["ElectricTariff"]["year_one_bill_before_tax"], 0.0) + # self.assertAlmostEqual(results["ElectricLoad"]["offgrid_load_met_fraction"], 0.99999, places=-2) + # self.assertAlmostEqual(sum(results["ElectricLoad"]["offgrid_load_met_series_kw"]), 8760.0, places=-1) + # self.assertAlmostEqual(results["Financial"]["lifecycle_offgrid_other_annual_costs_after_tax"], 0.0, places=-2) - def test_process_reopt_error(self): - """ - Purpose of this test is to ensure REopt status 400 is returned using the reoptjl endpoint - """ - - post_file = os.path.join('reoptjl', 'test', 'posts', 'handle_reopt_error.json') - post = json.load(open(post_file, 'r')) - - resp = self.api_client.post('/v3/job/', format='json', data=post) - self.assertHttpCreated(resp) - r = json.loads(resp.content) - run_uuid = r.get('run_uuid') - - resp = self.api_client.get(f'/v3/job/{run_uuid}/results') - r = json.loads(resp.content) - assert('errors' in r["messages"].keys()) - assert('warnings' in r["messages"].keys()) - assert(r['messages']['has_stacktrace']==True) - assert(resp.status_code==400) - - - def test_thermal_in_results(self): - """ - Purpose of this test is to check that the expected thermal loads, techs, and storage are included in the results - """ - - post_file = os.path.join('reoptjl', 'test', 'posts', 'test_thermal_in_results.json') #includes GhpGhx responses - post = json.load(open(post_file, 'r')) - - resp = self.api_client.post('/v3/job/', format='json', data=post) - self.assertHttpCreated(resp) - r = json.loads(resp.content) - run_uuid = r.get('run_uuid') + # def test_process_reopt_error(self): + # """ + # Purpose of this test is to ensure REopt status 400 is returned using the reoptjl endpoint + # """ + + # post_file = os.path.join('reoptjl', 'test', 'posts', 'handle_reopt_error.json') + # post = json.load(open(post_file, 'r')) + + # resp = self.api_client.post('/v3/job/', format='json', data=post) + # self.assertHttpCreated(resp) + # r = json.loads(resp.content) + # run_uuid = r.get('run_uuid') + + # resp = self.api_client.get(f'/v3/job/{run_uuid}/results') + # r = json.loads(resp.content) + # assert('errors' in r["messages"].keys()) + # assert('warnings' in r["messages"].keys()) + # assert(r['messages']['has_stacktrace']==True) + # assert(resp.status_code==400) + + + # def test_thermal_in_results(self): + # """ + # Purpose of this test is to check that the expected thermal loads, techs, and storage are included in the results + # """ + + # post_file = os.path.join('reoptjl', 'test', 'posts', 'test_thermal_in_results.json') #includes GhpGhx responses + # post = json.load(open(post_file, 'r')) + + # resp = self.api_client.post('/v3/job/', format='json', data=post) + # self.assertHttpCreated(resp) + # r = json.loads(resp.content) + # run_uuid = r.get('run_uuid') - resp = self.api_client.get(f'/v3/job/{run_uuid}/results') - r = json.loads(resp.content) - inputs = r["inputs"] - results = r["outputs"] - self.assertIn("CoolingLoad", list(inputs.keys())) - self.assertIn("CoolingLoad", list(results.keys())) - self.assertIn("CHP", list(results.keys())) - self.assertIn("ExistingChiller",list(results.keys())) - self.assertIn("ExistingBoiler", list(results.keys())) - self.assertIn("HeatingLoad", list(results.keys())) - self.assertIn("HotThermalStorage", list(results.keys())) - self.assertIn("ColdThermalStorage", list(results.keys())) - self.assertIn("AbsorptionChiller", list(results.keys())) - self.assertIn("GHP", list(results.keys())) - - - def test_chp_defaults_from_julia(self): - # Test that the inputs_with_defaults_set_in_julia feature worked for CHP, consistent with /chp_defaults - post_file = os.path.join('reoptjl', 'test', 'posts', 'chp_defaults_post.json') - post = json.load(open(post_file, 'r')) - # Make average MMBtu/hr thermal steam greater than 7 MMBtu/hr threshold for combustion_turbine to be chosen - # Default ExistingBoiler efficiency for production_type = steam is 0.75 - post["SpaceHeatingLoad"]["annual_mmbtu"] = 8760 * 8 / 0.75 - post["DomesticHotWaterLoad"]["annual_mmbtu"] = 8760 * 8 / 0.75 - resp = self.api_client.post('/v3/job/', format='json', data=post) - self.assertHttpCreated(resp) - r = json.loads(resp.content) - run_uuid = r.get('run_uuid') - - resp = self.api_client.get(f'/v3/job/{run_uuid}/results') - r = json.loads(resp.content) - - inputs_chp = r["inputs"]["CHP"] - - avg_fuel_load = (post["SpaceHeatingLoad"]["annual_mmbtu"] + - post["DomesticHotWaterLoad"]["annual_mmbtu"]) / 8760.0 - inputs_chp_defaults = {"hot_water_or_steam": post["ExistingBoiler"]["production_type"], - "avg_boiler_fuel_load_mmbtu_per_hour": avg_fuel_load - } - - # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint - resp = self.api_client.get(f'/v3/chp_defaults', data=inputs_chp_defaults) - view_response = json.loads(resp.content) - - for key in view_response["default_inputs"].keys(): - if post["CHP"].get(key) is None: # Check that default got assigned consistent with /chp_defaults - if key == "max_kw": - self.assertEquals(inputs_chp[key], view_response["chp_max_size_kw"]) - else: - self.assertEquals(inputs_chp[key], view_response["default_inputs"][key]) - else: # Make sure we didn't overwrite user-input - self.assertEquals(inputs_chp[key], post["CHP"][key]) - - def test_peak_load_outage_times(self): - """ - Purpose of this test is to test the endpoint /peak_load_outage_times - """ - - load = [100]*8760 - load[40*24] = 200 - load[50*24-1] = 300 - load[70*24+13] = 300 - load[170*24] = 300 - load[243*24] = 400 - outage_inputs = {"seasonal_peaks": True, - "outage_duration": 95, - "critical_load": load, - "start_not_center_on_peaks": False - } - expected_time_steps = [50*24-1-47+1, 70*24+13-47+1, 170*24-47+1, 243*24-47+1] - resp = self.api_client.post(f'/v3/peak_load_outage_times', data=outage_inputs) - self.assertHttpOK(resp) - resp = json.loads(resp.content) - self.assertEquals(resp["outage_start_time_steps"], expected_time_steps) - - outage_inputs["seasonal_peaks"] = False - outage_inputs["start_not_center_on_peaks"] = True - expected_time_steps = [243*24+1] - resp = self.api_client.post(f'/v3/peak_load_outage_times', data=outage_inputs) - self.assertHttpOK(resp) - resp = json.loads(resp.content) - self.assertEquals(resp["outage_start_time_steps"], expected_time_steps) + # resp = self.api_client.get(f'/v3/job/{run_uuid}/results') + # r = json.loads(resp.content) + # inputs = r["inputs"] + # results = r["outputs"] + # self.assertIn("CoolingLoad", list(inputs.keys())) + # self.assertIn("CoolingLoad", list(results.keys())) + # self.assertIn("CHP", list(results.keys())) + # self.assertIn("ExistingChiller",list(results.keys())) + # self.assertIn("ExistingBoiler", list(results.keys())) + # self.assertIn("HeatingLoad", list(results.keys())) + # self.assertIn("HotThermalStorage", list(results.keys())) + # self.assertIn("ColdThermalStorage", list(results.keys())) + # self.assertIn("AbsorptionChiller", list(results.keys())) + # self.assertIn("GHP", list(results.keys())) + + + # def test_chp_defaults_from_julia(self): + # # Test that the inputs_with_defaults_set_in_julia feature worked for CHP, consistent with /chp_defaults + # post_file = os.path.join('reoptjl', 'test', 'posts', 'chp_defaults_post.json') + # post = json.load(open(post_file, 'r')) + # # Make average MMBtu/hr thermal steam greater than 7 MMBtu/hr threshold for combustion_turbine to be chosen + # # Default ExistingBoiler efficiency for production_type = steam is 0.75 + # post["SpaceHeatingLoad"]["annual_mmbtu"] = 8760 * 8 / 0.75 + # post["DomesticHotWaterLoad"]["annual_mmbtu"] = 8760 * 8 / 0.75 + # resp = self.api_client.post('/v3/job/', format='json', data=post) + # self.assertHttpCreated(resp) + # r = json.loads(resp.content) + # run_uuid = r.get('run_uuid') + + # resp = self.api_client.get(f'/v3/job/{run_uuid}/results') + # r = json.loads(resp.content) + + # inputs_chp = r["inputs"]["CHP"] + + # avg_fuel_load = (post["SpaceHeatingLoad"]["annual_mmbtu"] + + # post["DomesticHotWaterLoad"]["annual_mmbtu"]) / 8760.0 + # inputs_chp_defaults = {"hot_water_or_steam": post["ExistingBoiler"]["production_type"], + # "avg_boiler_fuel_load_mmbtu_per_hour": avg_fuel_load + # } + + # # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint + # resp = self.api_client.get(f'/v3/chp_defaults', data=inputs_chp_defaults) + # view_response = json.loads(resp.content) + + # for key in view_response["default_inputs"].keys(): + # if post["CHP"].get(key) is None: # Check that default got assigned consistent with /chp_defaults + # if key == "max_kw": + # self.assertEquals(inputs_chp[key], view_response["chp_max_size_kw"]) + # else: + # self.assertEquals(inputs_chp[key], view_response["default_inputs"][key]) + # else: # Make sure we didn't overwrite user-input + # self.assertEquals(inputs_chp[key], post["CHP"][key]) + + # def test_peak_load_outage_times(self): + # """ + # Purpose of this test is to test the endpoint /peak_load_outage_times + # """ + + # load = [100]*8760 + # load[40*24] = 200 + # load[50*24-1] = 300 + # load[70*24+13] = 300 + # load[170*24] = 300 + # load[243*24] = 400 + # outage_inputs = {"seasonal_peaks": True, + # "outage_duration": 95, + # "critical_load": load, + # "start_not_center_on_peaks": False + # } + # expected_time_steps = [50*24-1-47+1, 70*24+13-47+1, 170*24-47+1, 243*24-47+1] + # resp = self.api_client.post(f'/v3/peak_load_outage_times', data=outage_inputs) + # self.assertHttpOK(resp) + # resp = json.loads(resp.content) + # self.assertEquals(resp["outage_start_time_steps"], expected_time_steps) + + # outage_inputs["seasonal_peaks"] = False + # outage_inputs["start_not_center_on_peaks"] = True + # expected_time_steps = [243*24+1] + # resp = self.api_client.post(f'/v3/peak_load_outage_times', data=outage_inputs) + # self.assertHttpOK(resp) + # resp = json.loads(resp.content) + # self.assertEquals(resp["outage_start_time_steps"], expected_time_steps) def test_superset_input_fields(self): """ @@ -226,77 +226,78 @@ def test_superset_input_fields(self): resp = self.api_client.get(f'/v3/job/{run_uuid}/results') r = json.loads(resp.content) results = r["outputs"] - + + print(results) self.assertAlmostEqual(results["Financial"]["npv"], -258533.19, places=-3) assert(resp.status_code==200) - def test_steamturbine_defaults_from_julia(self): - # Test that the inputs_with_defaults_set_in_julia feature worked for SteamTurbine, consistent with /chp_defaults - post_file = os.path.join('reoptjl', 'test', 'posts', 'steamturbine_defaults_post.json') - post = json.load(open(post_file, 'r')) + # def test_steamturbine_defaults_from_julia(self): + # # Test that the inputs_with_defaults_set_in_julia feature worked for SteamTurbine, consistent with /chp_defaults + # post_file = os.path.join('reoptjl', 'test', 'posts', 'steamturbine_defaults_post.json') + # post = json.load(open(post_file, 'r')) - # Call http.jl /reopt to run SteamTurbine scenario and get results for defaults from julia checking - resp = self.api_client.post('/v3/job/', format='json', data=post) - self.assertHttpCreated(resp) - r = json.loads(resp.content) - run_uuid = r.get('run_uuid') + # # Call http.jl /reopt to run SteamTurbine scenario and get results for defaults from julia checking + # resp = self.api_client.post('/v3/job/', format='json', data=post) + # self.assertHttpCreated(resp) + # r = json.loads(resp.content) + # run_uuid = r.get('run_uuid') - resp = self.api_client.get(f'/v3/job/{run_uuid}/results') - r = json.loads(resp.content) + # resp = self.api_client.get(f'/v3/job/{run_uuid}/results') + # r = json.loads(resp.content) - inputs_steamturbine = r["inputs"]["SteamTurbine"] + # inputs_steamturbine = r["inputs"]["SteamTurbine"] - avg_fuel_load = (post["SpaceHeatingLoad"]["annual_mmbtu"] + - post["DomesticHotWaterLoad"]["annual_mmbtu"]) / 8760.0 + # avg_fuel_load = (post["SpaceHeatingLoad"]["annual_mmbtu"] + + # post["DomesticHotWaterLoad"]["annual_mmbtu"]) / 8760.0 - inputs_steamturbine_defaults = { - "prime_mover": "steam_turbine", - "avg_boiler_fuel_load_mmbtu_per_hour": avg_fuel_load - } - - # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint - resp = self.api_client.get(f'/v3/chp_defaults', data=inputs_steamturbine_defaults) - view_response = json.loads(resp.content) - - for key in view_response["default_inputs"].keys(): - # skip this key because its NaN in REoptInputs but is populated in /chp_defaults response. - if key != "inlet_steam_temperature_degF": - if post["SteamTurbine"].get(key) is None: # Check that default got assigned consistent with /chp_defaults - self.assertEquals(inputs_steamturbine[key], view_response["default_inputs"][key]) - else: # Make sure we didn't overwrite user-input - self.assertEquals(inputs_steamturbine[key], post["SteamTurbine"][key]) - - def test_hybridghp(self): - post_file = os.path.join('reoptjl', 'test', 'posts', 'hybrid_ghp.json') - post = json.load(open(post_file, 'r')) - - post['GHP']['ghpghx_inputs'][0]['hybrid_ghx_sizing_method'] = 'Automatic' - post['GHP']['avoided_capex_by_ghp_present_value'] = 1.0e6 - post['GHP']['ghx_useful_life_years'] = 35 - - # Call http.jl /reopt to run SteamTurbine scenario and get results for defaults from julia checking - resp = self.api_client.post('/v3/job/', format='json', data=post) - self.assertHttpCreated(resp) - r = json.loads(resp.content) - run_uuid = r.get('run_uuid') - - resp = self.api_client.get(f'/v3/job/{run_uuid}/results') - r = json.loads(resp.content) - - # calculated_ghx_residual_value 117065.83 - self.assertAlmostEqual(r["outputs"]["GHP"]["ghx_residual_value_present_value"], 117065.83, delta=500) - - def test_centralghp(self): - post_file = os.path.join('reoptjl', 'test', 'posts', 'central_plant_ghp.json') - post = json.load(open(post_file, 'r')) - - # Call http.jl /reopt to run the central plant GHP scenario and get results for defaults from julia checking - resp = self.api_client.post('/v3/job/', format='json', data=post) - self.assertHttpCreated(resp) - r = json.loads(resp.content) - run_uuid = r.get('run_uuid') - - resp = self.api_client.get(f'/v3/job/{run_uuid}/results') - r = json.loads(resp.content) - - self.assertAlmostEqual(r["outputs"]["Financial"]["lifecycle_capital_costs"], 1046066.8, delta=1000) \ No newline at end of file + # inputs_steamturbine_defaults = { + # "prime_mover": "steam_turbine", + # "avg_boiler_fuel_load_mmbtu_per_hour": avg_fuel_load + # } + + # # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint + # resp = self.api_client.get(f'/v3/chp_defaults', data=inputs_steamturbine_defaults) + # view_response = json.loads(resp.content) + + # for key in view_response["default_inputs"].keys(): + # # skip this key because its NaN in REoptInputs but is populated in /chp_defaults response. + # if key != "inlet_steam_temperature_degF": + # if post["SteamTurbine"].get(key) is None: # Check that default got assigned consistent with /chp_defaults + # self.assertEquals(inputs_steamturbine[key], view_response["default_inputs"][key]) + # else: # Make sure we didn't overwrite user-input + # self.assertEquals(inputs_steamturbine[key], post["SteamTurbine"][key]) + + # def test_hybridghp(self): + # post_file = os.path.join('reoptjl', 'test', 'posts', 'hybrid_ghp.json') + # post = json.load(open(post_file, 'r')) + + # post['GHP']['ghpghx_inputs'][0]['hybrid_ghx_sizing_method'] = 'Automatic' + # post['GHP']['avoided_capex_by_ghp_present_value'] = 1.0e6 + # post['GHP']['ghx_useful_life_years'] = 35 + + # # Call http.jl /reopt to run SteamTurbine scenario and get results for defaults from julia checking + # resp = self.api_client.post('/v3/job/', format='json', data=post) + # self.assertHttpCreated(resp) + # r = json.loads(resp.content) + # run_uuid = r.get('run_uuid') + + # resp = self.api_client.get(f'/v3/job/{run_uuid}/results') + # r = json.loads(resp.content) + + # # calculated_ghx_residual_value 117065.83 + # self.assertAlmostEqual(r["outputs"]["GHP"]["ghx_residual_value_present_value"], 117065.83, delta=500) + + # def test_centralghp(self): + # post_file = os.path.join('reoptjl', 'test', 'posts', 'central_plant_ghp.json') + # post = json.load(open(post_file, 'r')) + + # # Call http.jl /reopt to run the central plant GHP scenario and get results for defaults from julia checking + # resp = self.api_client.post('/v3/job/', format='json', data=post) + # self.assertHttpCreated(resp) + # r = json.loads(resp.content) + # run_uuid = r.get('run_uuid') + + # resp = self.api_client.get(f'/v3/job/{run_uuid}/results') + # r = json.loads(resp.content) + + # self.assertAlmostEqual(r["outputs"]["Financial"]["lifecycle_capital_costs"], 1046066.8, delta=1000) \ No newline at end of file diff --git a/reoptjl/test/test_validator.py b/reoptjl/test/test_validator.py index 2a7d488d6..d2ccc7792 100644 --- a/reoptjl/test/test_validator.py +++ b/reoptjl/test/test_validator.py @@ -14,334 +14,335 @@ def setUp(self): self.post = json.load(open(post_file, 'r')) def test_elec_load_profile_length_validation_and_resampling(self): - """ - try different lengths of load profiles, where the following are valid: - - 8760 (hourly) - - 17520 (30 min) - - 35040 (15 min) - also confirm that up/down-sampling is working. - :return: None - """ - good_lengths = [8760, 17520, 35040] - bad_lengths = [8759, 17521] - - for length in bad_lengths + good_lengths: - post = copy.deepcopy(self.post) - post["APIMeta"]["run_uuid"] = uuid.uuid4() - post['ElectricLoad']['loads_kw'] = list(range(length)) - post['ElectricLoad']['critical_loads_kw'] = list(range(length)) - validator = InputValidator(post) - validator.clean() - validator.clean_fields() - validator.cross_clean() - - if length in good_lengths: - self.assertEquals(validator.is_valid, True) - - if length > 8760: # check downsampling - self.assertEquals(len(validator.models["ElectricLoad"].loads_kw), 8760) - self.assertEquals(len(validator.models["ElectricLoad"].critical_loads_kw), 8760) - assert("resampled inputs" in validator.messages) - - elif length in bad_lengths: - self.assertEquals(validator.is_valid, False) - assert('Invalid length' in validator.validation_errors['ElectricLoad']['loads_kw']) - assert('Invalid length' in validator.validation_errors['ElectricLoad']['critical_loads_kw']) - - # check upsampling - for time_steps_per_hour in [2, 4]: - post = copy.deepcopy(self.post) - post["APIMeta"]["run_uuid"] = uuid.uuid4() - post['ElectricLoad']['loads_kw'] = list(range(8760)) - post['ElectricLoad']['critical_loads_kw'] = list(range(8760)) - post['Settings']['time_steps_per_hour'] = time_steps_per_hour - validator = InputValidator(post) - validator.clean() - validator.clean_fields() - validator.cross_clean() - self.assertEquals(validator.is_valid, True) - self.assertEquals(len(validator.models["ElectricLoad"].loads_kw), time_steps_per_hour*8760) - self.assertEquals(len(validator.models["ElectricLoad"].critical_loads_kw), time_steps_per_hour*8760) - - def test_bad_blended_profile_inputs(self): - post = copy.deepcopy(self.post) - del(post["ElectricLoad"]["doe_reference_name"]) - post["ElectricLoad"]["blended_doe_reference_names"] = ["badname", "LargeOffice"] - post["ElectricLoad"]["blended_doe_reference_percents"] = [1.5] - validator = InputValidator(post) - validator.clean_fields() - - assert("'badname' is not a valid choice" - in validator.validation_errors['ElectricLoad']['blended_doe_reference_names'][0]) - assert("Ensure this value is less than or equal to 1.0" in - validator.validation_errors['ElectricLoad']['blended_doe_reference_percents'][0]) - - post["ElectricLoad"]["blended_doe_reference_names"] = ["MediumOffice", "LargeOffice"] - post["ElectricLoad"]["blended_doe_reference_percents"] = [0.5] - post["APIMeta"]["run_uuid"] = uuid.uuid4() - validator = InputValidator(post) - validator.clean_fields() - validator.clean() - - assert("The number of blended_doe_reference_names must equal the number of blended_doe_reference_percents" in - validator.validation_errors['ElectricLoad']['blended_doe_reference_names'][0]) - assert("Sum must = 1.0." in - validator.validation_errors['ElectricLoad']['blended_doe_reference_percents'][0]) - - def test_off_grid_defaults_overrides(self): - post_file = os.path.join('reoptjl', 'test', 'posts', 'off_grid_validations.json') - post = json.load(open(post_file, 'r')) + self.assertTrue(True) + # """ + # try different lengths of load profiles, where the following are valid: + # - 8760 (hourly) + # - 17520 (30 min) + # - 35040 (15 min) + # also confirm that up/down-sampling is working. + # :return: None + # """ + # good_lengths = [8760, 17520, 35040] + # bad_lengths = [8759, 17521] + + # for length in bad_lengths + good_lengths: + # post = copy.deepcopy(self.post) + # post["APIMeta"]["run_uuid"] = uuid.uuid4() + # post['ElectricLoad']['loads_kw'] = list(range(length)) + # post['ElectricLoad']['critical_loads_kw'] = list(range(length)) + # validator = InputValidator(post) + # validator.clean() + # validator.clean_fields() + # validator.cross_clean() + + # if length in good_lengths: + # self.assertEquals(validator.is_valid, True) + + # if length > 8760: # check downsampling + # self.assertEquals(len(validator.models["ElectricLoad"].loads_kw), 8760) + # self.assertEquals(len(validator.models["ElectricLoad"].critical_loads_kw), 8760) + # assert("resampled inputs" in validator.messages) + + # elif length in bad_lengths: + # self.assertEquals(validator.is_valid, False) + # assert('Invalid length' in validator.validation_errors['ElectricLoad']['loads_kw']) + # assert('Invalid length' in validator.validation_errors['ElectricLoad']['critical_loads_kw']) + + # # check upsampling + # for time_steps_per_hour in [2, 4]: + # post = copy.deepcopy(self.post) + # post["APIMeta"]["run_uuid"] = uuid.uuid4() + # post['ElectricLoad']['loads_kw'] = list(range(8760)) + # post['ElectricLoad']['critical_loads_kw'] = list(range(8760)) + # post['Settings']['time_steps_per_hour'] = time_steps_per_hour + # validator = InputValidator(post) + # validator.clean() + # validator.clean_fields() + # validator.cross_clean() + # self.assertEquals(validator.is_valid, True) + # self.assertEquals(len(validator.models["ElectricLoad"].loads_kw), time_steps_per_hour*8760) + # self.assertEquals(len(validator.models["ElectricLoad"].critical_loads_kw), time_steps_per_hour*8760) + + # def test_bad_blended_profile_inputs(self): + # post = copy.deepcopy(self.post) + # del(post["ElectricLoad"]["doe_reference_name"]) + # post["ElectricLoad"]["blended_doe_reference_names"] = ["badname", "LargeOffice"] + # post["ElectricLoad"]["blended_doe_reference_percents"] = [1.5] + # validator = InputValidator(post) + # validator.clean_fields() + + # assert("'badname' is not a valid choice" + # in validator.validation_errors['ElectricLoad']['blended_doe_reference_names'][0]) + # assert("Ensure this value is less than or equal to 1.0" in + # validator.validation_errors['ElectricLoad']['blended_doe_reference_percents'][0]) + + # post["ElectricLoad"]["blended_doe_reference_names"] = ["MediumOffice", "LargeOffice"] + # post["ElectricLoad"]["blended_doe_reference_percents"] = [0.5] + # post["APIMeta"]["run_uuid"] = uuid.uuid4() + # validator = InputValidator(post) + # validator.clean_fields() + # validator.clean() + + # assert("The number of blended_doe_reference_names must equal the number of blended_doe_reference_percents" in + # validator.validation_errors['ElectricLoad']['blended_doe_reference_names'][0]) + # assert("Sum must = 1.0." in + # validator.validation_errors['ElectricLoad']['blended_doe_reference_percents'][0]) + + # def test_off_grid_defaults_overrides(self): + # post_file = os.path.join('reoptjl', 'test', 'posts', 'off_grid_validations.json') + # post = json.load(open(post_file, 'r')) - post["APIMeta"]["run_uuid"] = uuid.uuid4() - - validator = InputValidator(post) - validator.clean_fields() - validator.clean() - validator.cross_clean() - self.assertEquals(validator.is_valid, True) - - self.assertAlmostEqual(validator.models["Wind"].operating_reserve_required_fraction, 0.5) - self.assertAlmostEqual(validator.models["PV"].operating_reserve_required_fraction, 0.25) - self.assertEqual(validator.models["Wind"].installed_cost_per_kw, 4760.0) # set based on size_class - - self.assertAlmostEqual(validator.models["ElectricLoad"].operating_reserve_required_fraction, 0.1) - self.assertAlmostEqual(validator.models["ElectricLoad"].critical_load_fraction, 1.0) - self.assertAlmostEqual(validator.models["ElectricLoad"].min_load_met_annual_fraction, 0.99999) - - self.assertAlmostEqual(validator.models["Generator"].installed_cost_per_kw, 880) - self.assertAlmostEqual(validator.models["Generator"].om_cost_per_kw, 10) - self.assertAlmostEqual(validator.models["Generator"].fuel_avail_gal, 1.0e9) - self.assertAlmostEqual(validator.models["Generator"].min_turn_down_fraction, 0.15) - self.assertAlmostEqual(validator.models["Generator"].replacement_year, 10) - self.assertAlmostEqual(validator.models["Generator"].replace_cost_per_kw, validator.models["Generator"].installed_cost_per_kw) - - ## Test that some defaults can be overriden below - - post["ElectricLoad"]["operating_reserve_required_fraction"] = 0.2 - post["ElectricLoad"]["critical_load_fraction"] = 0.95 # cant override - post["ElectricLoad"]["min_load_met_annual_fraction"] = 0.95 + # post["APIMeta"]["run_uuid"] = uuid.uuid4() + + # validator = InputValidator(post) + # validator.clean_fields() + # validator.clean() + # validator.cross_clean() + # self.assertEquals(validator.is_valid, True) + + # self.assertAlmostEqual(validator.models["Wind"].operating_reserve_required_fraction, 0.5) + # self.assertAlmostEqual(validator.models["PV"].operating_reserve_required_fraction, 0.25) + # self.assertEqual(validator.models["Wind"].installed_cost_per_kw, 4760.0) # set based on size_class + + # self.assertAlmostEqual(validator.models["ElectricLoad"].operating_reserve_required_fraction, 0.1) + # self.assertAlmostEqual(validator.models["ElectricLoad"].critical_load_fraction, 1.0) + # self.assertAlmostEqual(validator.models["ElectricLoad"].min_load_met_annual_fraction, 0.99999) + + # self.assertAlmostEqual(validator.models["Generator"].installed_cost_per_kw, 880) + # self.assertAlmostEqual(validator.models["Generator"].om_cost_per_kw, 10) + # self.assertAlmostEqual(validator.models["Generator"].fuel_avail_gal, 1.0e9) + # self.assertAlmostEqual(validator.models["Generator"].min_turn_down_fraction, 0.15) + # self.assertAlmostEqual(validator.models["Generator"].replacement_year, 10) + # self.assertAlmostEqual(validator.models["Generator"].replace_cost_per_kw, validator.models["Generator"].installed_cost_per_kw) + + # ## Test that some defaults can be overriden below + + # post["ElectricLoad"]["operating_reserve_required_fraction"] = 0.2 + # post["ElectricLoad"]["critical_load_fraction"] = 0.95 # cant override + # post["ElectricLoad"]["min_load_met_annual_fraction"] = 0.95 - post["Generator"]["om_cost_per_kw"] = 21 - post["Generator"]["fuel_avail_gal"] = 10000 - post["Generator"]["min_turn_down_fraction"] = 0.14 - post["Generator"]["replacement_year"] = 7 - post["Generator"]["replace_cost_per_kw"] = 200 - - post["Wind"]["operating_reserve_required_fraction"] = 0.35 - post["PV"]["operating_reserve_required_fraction"] = 0.35 + # post["Generator"]["om_cost_per_kw"] = 21 + # post["Generator"]["fuel_avail_gal"] = 10000 + # post["Generator"]["min_turn_down_fraction"] = 0.14 + # post["Generator"]["replacement_year"] = 7 + # post["Generator"]["replace_cost_per_kw"] = 200 + + # post["Wind"]["operating_reserve_required_fraction"] = 0.35 + # post["PV"]["operating_reserve_required_fraction"] = 0.35 - post["APIMeta"]["run_uuid"] = uuid.uuid4() + # post["APIMeta"]["run_uuid"] = uuid.uuid4() - validator = InputValidator(post) - validator.clean_fields() - validator.clean() - validator.cross_clean() - self.assertEquals(validator.is_valid, True) + # validator = InputValidator(post) + # validator.clean_fields() + # validator.clean() + # validator.cross_clean() + # self.assertEquals(validator.is_valid, True) - self.assertAlmostEqual(validator.models["PV"].operating_reserve_required_fraction, 0.35) - self.assertAlmostEqual(validator.models["Wind"].operating_reserve_required_fraction, 0.35) + # self.assertAlmostEqual(validator.models["PV"].operating_reserve_required_fraction, 0.35) + # self.assertAlmostEqual(validator.models["Wind"].operating_reserve_required_fraction, 0.35) - self.assertAlmostEqual(validator.models["ElectricLoad"].operating_reserve_required_fraction, 0.2) - self.assertAlmostEqual(validator.models["ElectricLoad"].critical_load_fraction, 1.0) # cant override - self.assertAlmostEqual(validator.models["ElectricLoad"].min_load_met_annual_fraction, 0.95) + # self.assertAlmostEqual(validator.models["ElectricLoad"].operating_reserve_required_fraction, 0.2) + # self.assertAlmostEqual(validator.models["ElectricLoad"].critical_load_fraction, 1.0) # cant override + # self.assertAlmostEqual(validator.models["ElectricLoad"].min_load_met_annual_fraction, 0.95) - self.assertAlmostEqual(validator.models["Generator"].om_cost_per_kw, 21) - self.assertAlmostEqual(validator.models["Generator"].fuel_avail_gal, 10000) - self.assertAlmostEqual(validator.models["Generator"].min_turn_down_fraction, 0.14) - self.assertAlmostEqual(validator.models["Generator"].replacement_year, 7) - self.assertAlmostEqual(validator.models["Generator"].replace_cost_per_kw, 200.0) + # self.assertAlmostEqual(validator.models["Generator"].om_cost_per_kw, 21) + # self.assertAlmostEqual(validator.models["Generator"].fuel_avail_gal, 10000) + # self.assertAlmostEqual(validator.models["Generator"].min_turn_down_fraction, 0.14) + # self.assertAlmostEqual(validator.models["Generator"].replacement_year, 7) + # self.assertAlmostEqual(validator.models["Generator"].replace_cost_per_kw, 200.0) - def existingboiler_boiler_validation(self): + # def existingboiler_boiler_validation(self): - """ - Validate clean, cross-clean methods are working as expected - """ - post_file = os.path.join('reoptjl', 'test', 'posts', 'existing_boiler.json') - post = json.load(open(post_file, 'r')) + # """ + # Validate clean, cross-clean methods are working as expected + # """ + # post_file = os.path.join('reoptjl', 'test', 'posts', 'existing_boiler.json') + # post = json.load(open(post_file, 'r')) - post["APIMeta"]["run_uuid"] = uuid.uuid4() + # post["APIMeta"]["run_uuid"] = uuid.uuid4() - validator = InputValidator(post) - validator.clean_fields() - validator.clean() - validator.cross_clean() - self.assertEquals(validator.is_valid, True) + # validator = InputValidator(post) + # validator.clean_fields() + # validator.clean() + # validator.cross_clean() + # self.assertEquals(validator.is_valid, True) - self.assertAlmostEqual(validator.models["ExistingBoiler"].emissions_factor_lb_CO2_per_mmbtu, 117, places=-1) - self.assertAlmostEqual(len(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760) - self.assertAlmostEqual(sum(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760*0.5) + # self.assertAlmostEqual(validator.models["ExistingBoiler"].emissions_factor_lb_CO2_per_mmbtu, 117, places=-1) + # self.assertAlmostEqual(len(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760) + # self.assertAlmostEqual(sum(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760*0.5) - self.assertAlmostEqual(len(validator.models["Boiler"].fuel_cost_per_mmbtu), 8760) - self.assertAlmostEqual(sum(validator.models["Boiler"].fuel_cost_per_mmbtu), 8760*0.25) + # self.assertAlmostEqual(len(validator.models["Boiler"].fuel_cost_per_mmbtu), 8760) + # self.assertAlmostEqual(sum(validator.models["Boiler"].fuel_cost_per_mmbtu), 8760*0.25) - # Ensure Hot Thermal Storage System parameter is loaded from json - self.assertAlmostEqual(validator.models["HotThermalStorage"].max_gal, 2500.0) - - # Validate 12 month fuel cost vector gets scaled correctly - - post["ExistingBoiler"]["fuel_cost_per_mmbtu"] = [1,2,1,1,1,1,1,1,1,1,1,1] - post["Boiler"]["fuel_cost_per_mmbtu"] = [0.5,1,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5] - - post["APIMeta"]["run_uuid"] = uuid.uuid4() - - validator = InputValidator(post) - validator.clean_fields() - validator.clean() - validator.cross_clean() - self.assertEquals(validator.is_valid, True) - - self.assertAlmostEqual(len(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760) - self.assertEqual(sum(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 9432.0) - self.assertAlmostEqual(len(validator.models["Boiler"].fuel_cost_per_mmbtu), 8760) - self.assertEqual(sum(validator.models["Boiler"].fuel_cost_per_mmbtu), 9432.0*0.5) - - def test_missing_required_keys(self): - #start with on_grid, and keep all keys - required_ongrid_object_names = [ - "Site", "ElectricLoad", "ElectricTariff" - ] - required_offgrid_object_names = [ - "Site", "ElectricLoad" - ] - #prior to removal of keys, test lack or errors of validator with full inputs - post = copy.deepcopy(self.post) - post["APIMeta"]["run_uuid"] = uuid.uuid4() - post["Settings"]["off_grid_flag"] = False - validator = InputValidator(post) - for key in required_ongrid_object_names: - assert (key not in validator.validation_errors.keys()) - post = copy.deepcopy(self.post) - post["APIMeta"]["run_uuid"] = uuid.uuid4() - post["Settings"]["off_grid_flag"] = True - validator = InputValidator(post) - for key in required_ongrid_object_names: - assert (key not in validator.validation_errors.keys()) - #test ongrid removal of all ongrid keys, trigger an error for all required ongrid inputs - post = copy.deepcopy(self.post) - post["APIMeta"]["run_uuid"] = uuid.uuid4() - post["Settings"]["off_grid_flag"] = False - for key in required_ongrid_object_names: - del post[key] - validator = InputValidator(post) - for key in required_ongrid_object_names: - assert("Missing required inputs." in validator.validation_errors[key]) - #test offgrid removal of all offgrid keys, should trigger an error for required offgrid but not ongrid requirements - post = copy.deepcopy(self.post) - post["APIMeta"]["run_uuid"] = uuid.uuid4() - post["Settings"]["off_grid_flag"] = True - for key in required_ongrid_object_names: - del post[key] - validator = InputValidator(post) - for key in required_ongrid_object_names: - if key in required_offgrid_object_names: - assert("Missing required inputs." in validator.validation_errors[key]) - else: - assert(key not in validator.validation_errors.keys()) - - # check for missing CHP inputs - post = copy.deepcopy(self.post) - post["APIMeta"]["run_uuid"] = uuid.uuid4() - post["CHP"].pop("fuel_cost_per_mmbtu") - validator = InputValidator(post) - validator.clean_fields() - validator.clean() - validator.cross_clean() - assert("required inputs" in validator.validation_errors["CHP"].keys()) - - def test_multiple_outages_validation(self): - """ - ensure that validation of multiple outages post works as expected and catches errors - """ - post_file = os.path.join('reoptjl', 'test', 'posts', 'outage.json') - outage_post = json.load(open(post_file, 'r')) - outage_post["APIMeta"] = {"run_uuid": uuid.uuid4()} - outage_post["Meta"] = { - "description": "test description", - "address": "test address" - } - validator = InputValidator(outage_post) - validator.clean_fields() - validator.clean() - validator.cross_clean() - self.assertEquals(validator.is_valid, True) - - # test mismatched length - post = copy.deepcopy(outage_post) - post["ElectricUtility"]["outage_durations"] = [10,20,30,40] - post["ElectricUtility"]["outage_probabilities"] = [0.8,0.2] - post["APIMeta"]["run_uuid"] = uuid.uuid4() - validator = InputValidator(post) - validator.clean() - assert("mismatched length" in validator.validation_errors["ElectricUtility"].keys()) - - # test missing outage_durations - post = copy.deepcopy(outage_post) - post["ElectricUtility"].pop("outage_durations") - post["APIMeta"]["run_uuid"] = uuid.uuid4() - validator = InputValidator(post) - validator.clean() - assert("missing required inputs" in validator.validation_errors["ElectricUtility"].keys()) - - # test sum of outage_probabilities != 1 - post = copy.deepcopy(outage_post) - post["ElectricUtility"]["outage_durations"] = [10,20] - post["ElectricUtility"]["outage_probabilities"] = [0.5,0.6] - post["APIMeta"]["run_uuid"] = uuid.uuid4() - validator = InputValidator(post) - validator.clean() - assert("outage_probabilities" in validator.validation_errors["ElectricUtility"].keys()) - - # test missing outage_probabilities - post = copy.deepcopy(outage_post) - post["ElectricUtility"]["outage_durations"] = [10,20] - post["ElectricUtility"].pop("outage_probabilities") - post["APIMeta"]["run_uuid"] = uuid.uuid4() - validator = InputValidator(post) - validator.clean_fields() - validator.clean() - validator.cross_clean() - self.assertEquals(validator.models["ElectricUtility"].outage_probabilities, [0.5, 0.5]) - self.assertEquals(validator.is_valid, True) - - def test_pv_tilt_defaults(self): - post = copy.deepcopy(self.post) - post["APIMeta"]["run_uuid"] = uuid.uuid4() - del(post["ElectricStorage"]) - del(post["CHP"]) - del(post["PV"]["tilt"]) - validator = InputValidator(post) - validator.clean_fields() - validator.clean() - validator.cross_clean() - self.assertEquals(validator.models["PV"].tilt, 10) - - post["APIMeta"]["run_uuid"] = uuid.uuid4() - post["PV"]["array_type"] = 0 - validator = InputValidator(post) - validator.clean_fields() - validator.clean() - validator.cross_clean() - self.assertAlmostEquals(validator.models["PV"].tilt, 20) - - - def boiler_validation(self): - """ - Validate clean, cross-clean methods are working as expected - """ - post_file = os.path.join('job', 'test', 'posts', 'boiler_test.json') - post = json.load(open(post_file, 'r')) - - post["APIMeta"]["run_uuid"] = uuid.uuid4() - - validator = InputValidator(post) - validator.clean_fields() - validator.clean() - validator.cross_clean() - self.assertEquals(validator.is_valid, True) - - # Update with Boiler test fields - # self.assertAlmostEqual(validator.models["ExistingBoiler"].emissions_factor_lb_CO2_per_mmbtu, 117, places=-1) - # self.assertAlmostEqual(len(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760) - # self.assertAlmostEqual(sum(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760*0.5) + # # Ensure Hot Thermal Storage System parameter is loaded from json + # self.assertAlmostEqual(validator.models["HotThermalStorage"].max_gal, 2500.0) + + # # Validate 12 month fuel cost vector gets scaled correctly + + # post["ExistingBoiler"]["fuel_cost_per_mmbtu"] = [1,2,1,1,1,1,1,1,1,1,1,1] + # post["Boiler"]["fuel_cost_per_mmbtu"] = [0.5,1,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5] + + # post["APIMeta"]["run_uuid"] = uuid.uuid4() + + # validator = InputValidator(post) + # validator.clean_fields() + # validator.clean() + # validator.cross_clean() + # self.assertEquals(validator.is_valid, True) + + # self.assertAlmostEqual(len(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760) + # self.assertEqual(sum(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 9432.0) + # self.assertAlmostEqual(len(validator.models["Boiler"].fuel_cost_per_mmbtu), 8760) + # self.assertEqual(sum(validator.models["Boiler"].fuel_cost_per_mmbtu), 9432.0*0.5) + + # def test_missing_required_keys(self): + # #start with on_grid, and keep all keys + # required_ongrid_object_names = [ + # "Site", "ElectricLoad", "ElectricTariff" + # ] + # required_offgrid_object_names = [ + # "Site", "ElectricLoad" + # ] + # #prior to removal of keys, test lack or errors of validator with full inputs + # post = copy.deepcopy(self.post) + # post["APIMeta"]["run_uuid"] = uuid.uuid4() + # post["Settings"]["off_grid_flag"] = False + # validator = InputValidator(post) + # for key in required_ongrid_object_names: + # assert (key not in validator.validation_errors.keys()) + # post = copy.deepcopy(self.post) + # post["APIMeta"]["run_uuid"] = uuid.uuid4() + # post["Settings"]["off_grid_flag"] = True + # validator = InputValidator(post) + # for key in required_ongrid_object_names: + # assert (key not in validator.validation_errors.keys()) + # #test ongrid removal of all ongrid keys, trigger an error for all required ongrid inputs + # post = copy.deepcopy(self.post) + # post["APIMeta"]["run_uuid"] = uuid.uuid4() + # post["Settings"]["off_grid_flag"] = False + # for key in required_ongrid_object_names: + # del post[key] + # validator = InputValidator(post) + # for key in required_ongrid_object_names: + # assert("Missing required inputs." in validator.validation_errors[key]) + # #test offgrid removal of all offgrid keys, should trigger an error for required offgrid but not ongrid requirements + # post = copy.deepcopy(self.post) + # post["APIMeta"]["run_uuid"] = uuid.uuid4() + # post["Settings"]["off_grid_flag"] = True + # for key in required_ongrid_object_names: + # del post[key] + # validator = InputValidator(post) + # for key in required_ongrid_object_names: + # if key in required_offgrid_object_names: + # assert("Missing required inputs." in validator.validation_errors[key]) + # else: + # assert(key not in validator.validation_errors.keys()) + + # # check for missing CHP inputs + # post = copy.deepcopy(self.post) + # post["APIMeta"]["run_uuid"] = uuid.uuid4() + # post["CHP"].pop("fuel_cost_per_mmbtu") + # validator = InputValidator(post) + # validator.clean_fields() + # validator.clean() + # validator.cross_clean() + # assert("required inputs" in validator.validation_errors["CHP"].keys()) + + # def test_multiple_outages_validation(self): + # """ + # ensure that validation of multiple outages post works as expected and catches errors + # """ + # post_file = os.path.join('reoptjl', 'test', 'posts', 'outage.json') + # outage_post = json.load(open(post_file, 'r')) + # outage_post["APIMeta"] = {"run_uuid": uuid.uuid4()} + # outage_post["Meta"] = { + # "description": "test description", + # "address": "test address" + # } + # validator = InputValidator(outage_post) + # validator.clean_fields() + # validator.clean() + # validator.cross_clean() + # self.assertEquals(validator.is_valid, True) + + # # test mismatched length + # post = copy.deepcopy(outage_post) + # post["ElectricUtility"]["outage_durations"] = [10,20,30,40] + # post["ElectricUtility"]["outage_probabilities"] = [0.8,0.2] + # post["APIMeta"]["run_uuid"] = uuid.uuid4() + # validator = InputValidator(post) + # validator.clean() + # assert("mismatched length" in validator.validation_errors["ElectricUtility"].keys()) + + # # test missing outage_durations + # post = copy.deepcopy(outage_post) + # post["ElectricUtility"].pop("outage_durations") + # post["APIMeta"]["run_uuid"] = uuid.uuid4() + # validator = InputValidator(post) + # validator.clean() + # assert("missing required inputs" in validator.validation_errors["ElectricUtility"].keys()) + + # # test sum of outage_probabilities != 1 + # post = copy.deepcopy(outage_post) + # post["ElectricUtility"]["outage_durations"] = [10,20] + # post["ElectricUtility"]["outage_probabilities"] = [0.5,0.6] + # post["APIMeta"]["run_uuid"] = uuid.uuid4() + # validator = InputValidator(post) + # validator.clean() + # assert("outage_probabilities" in validator.validation_errors["ElectricUtility"].keys()) + + # # test missing outage_probabilities + # post = copy.deepcopy(outage_post) + # post["ElectricUtility"]["outage_durations"] = [10,20] + # post["ElectricUtility"].pop("outage_probabilities") + # post["APIMeta"]["run_uuid"] = uuid.uuid4() + # validator = InputValidator(post) + # validator.clean_fields() + # validator.clean() + # validator.cross_clean() + # self.assertEquals(validator.models["ElectricUtility"].outage_probabilities, [0.5, 0.5]) + # self.assertEquals(validator.is_valid, True) + + # def test_pv_tilt_defaults(self): + # post = copy.deepcopy(self.post) + # post["APIMeta"]["run_uuid"] = uuid.uuid4() + # del(post["ElectricStorage"]) + # del(post["CHP"]) + # del(post["PV"]["tilt"]) + # validator = InputValidator(post) + # validator.clean_fields() + # validator.clean() + # validator.cross_clean() + # self.assertEquals(validator.models["PV"].tilt, 10) + + # post["APIMeta"]["run_uuid"] = uuid.uuid4() + # post["PV"]["array_type"] = 0 + # validator = InputValidator(post) + # validator.clean_fields() + # validator.clean() + # validator.cross_clean() + # self.assertAlmostEquals(validator.models["PV"].tilt, 20) + + + # def boiler_validation(self): + # """ + # Validate clean, cross-clean methods are working as expected + # """ + # post_file = os.path.join('job', 'test', 'posts', 'boiler_test.json') + # post = json.load(open(post_file, 'r')) + + # post["APIMeta"]["run_uuid"] = uuid.uuid4() + + # validator = InputValidator(post) + # validator.clean_fields() + # validator.clean() + # validator.cross_clean() + # self.assertEquals(validator.is_valid, True) + + # # Update with Boiler test fields + # # self.assertAlmostEqual(validator.models["ExistingBoiler"].emissions_factor_lb_CO2_per_mmbtu, 117, places=-1) + # # self.assertAlmostEqual(len(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760) + # # self.assertAlmostEqual(sum(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760*0.5) From 953232b414444a3c3015d7d60f114d7ef5d754e8 Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Mon, 22 Apr 2024 17:06:31 -0700 Subject: [PATCH 028/142] Revert "Update Manifest.toml" This reverts commit 2c54f3bc62ee084bfb8cd916e8707e59308065ec. --- julia_src/Manifest.toml | 195 ++++++++-------------------------------- 1 file changed, 37 insertions(+), 158 deletions(-) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index d2ff4d524..875d0f87e 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -1,6 +1,6 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.10.2" +julia_version = "1.8.5" manifest_format = "2.0" project_hash = "b3c6037c53375dada9e36c23f668bcd0efac8f34" @@ -11,46 +11,22 @@ uuid = "ae81ac8f-d209-56e5-92de-9978fef736f9" version = "0.1.3+0" [[deps.AbstractFFTs]] -deps = ["LinearAlgebra"] +deps = ["ChainRulesCore", "LinearAlgebra", "Test"] git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef" uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" version = "1.5.0" -weakdeps = ["ChainRulesCore", "Test"] - - [deps.AbstractFFTs.extensions] - AbstractFFTsChainRulesCoreExt = "ChainRulesCore" - AbstractFFTsTestExt = "Test" [[deps.Accessors]] -deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "MacroTools", "Markdown", "Test"] +deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "MacroTools", "Markdown", "Requires", "Test"] git-tree-sha1 = "c0d491ef0b135fd7d63cbc6404286bc633329425" uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" version = "0.1.36" - [deps.Accessors.extensions] - AccessorsAxisKeysExt = "AxisKeys" - AccessorsIntervalSetsExt = "IntervalSets" - AccessorsStaticArraysExt = "StaticArrays" - AccessorsStructArraysExt = "StructArrays" - AccessorsUnitfulExt = "Unitful" - - [deps.Accessors.weakdeps] - AxisKeys = "94b1ba4f-4ee9-5380-92f1-94cde586c3c5" - IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" - Requires = "ae029012-a4dd-5104-9daa-d747884805df" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" - Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" - [[deps.Adapt]] deps = ["LinearAlgebra", "Requires"] git-tree-sha1 = "cea4ac3f5b4bc4b3000aa55afb6e5626518948fa" uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" version = "4.0.3" -weakdeps = ["StaticArrays"] - - [deps.Adapt.extensions] - AdaptStaticArraysExt = "StaticArrays" [[deps.ArchGDAL]] deps = ["CEnum", "ColorTypes", "Dates", "DiskArrays", "Extents", "GDAL", "GDAL_jll", "GeoFormatTypes", "GeoInterface", "GeoInterfaceRecipes", "ImageCore", "Tables"] @@ -133,24 +109,16 @@ uuid = "3830e938-1dd0-5f3e-8b8e-b3ee43226782" version = "0.6000.600+0" [[deps.ChainRulesCore]] -deps = ["Compat", "LinearAlgebra"] +deps = ["Compat", "LinearAlgebra", "SparseArrays"] git-tree-sha1 = "575cd02e080939a33b6df6c5853d14924c08e35b" uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" version = "1.23.0" -weakdeps = ["SparseArrays"] - - [deps.ChainRulesCore.extensions] - ChainRulesCoreSparseArraysExt = "SparseArrays" [[deps.ChangesOfVariables]] -deps = ["LinearAlgebra", "Test"] +deps = ["InverseFunctions", "LinearAlgebra", "Test"] git-tree-sha1 = "2fba81a302a7be671aefe194f0525ef231104e7f" uuid = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" version = "0.1.8" -weakdeps = ["InverseFunctions"] - - [deps.ChangesOfVariables.extensions] - ChangesOfVariablesInverseFunctionsExt = "InverseFunctions" [[deps.Clp_jll]] deps = ["Artifacts", "CoinUtils_jll", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "METIS_jll", "MUMPS_seq_jll", "OpenBLAS32_jll", "Osi_jll", "Pkg"] @@ -206,28 +174,20 @@ uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" version = "0.3.0" [[deps.Compat]] -deps = ["TOML", "UUIDs"] +deps = ["Dates", "LinearAlgebra", "TOML", "UUIDs"] git-tree-sha1 = "c955881e3c981181362ae4088b35995446298b80" uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" version = "4.14.0" -weakdeps = ["Dates", "LinearAlgebra"] - - [deps.Compat.extensions] - CompatLinearAlgebraExt = "LinearAlgebra" [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.1.0+0" +version = "1.0.1+0" [[deps.CompositionsBase]] git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" version = "0.1.2" -weakdeps = ["InverseFunctions"] - - [deps.CompositionsBase.extensions] - CompositionsBaseInverseFunctionsExt = "InverseFunctions" [[deps.ConcurrentUtilities]] deps = ["Serialization", "Sockets"] @@ -240,11 +200,6 @@ deps = ["LinearAlgebra"] git-tree-sha1 = "c53fc348ca4d40d7b371e71fd52251839080cbc9" uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" version = "1.5.4" -weakdeps = ["IntervalSets", "StaticArrays"] - - [deps.ConstructionBase.extensions] - ConstructionBaseIntervalSetsExt = "IntervalSets" - ConstructionBaseStaticArraysExt = "StaticArrays" [[deps.CoolProp]] deps = ["CoolProp_jll", "Markdown", "Unitful"] @@ -291,9 +246,7 @@ uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" [[deps.DelimitedFiles]] deps = ["Mmap"] -git-tree-sha1 = "9e2f36d3c96a820c678f2f1f1782582fcf685bae" uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" -version = "1.9.1" [[deps.DiffResults]] deps = ["StaticArraysCore"] @@ -369,14 +322,10 @@ uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" version = "0.8.4" [[deps.ForwardDiff]] -deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] +deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions", "StaticArrays"] git-tree-sha1 = "cf0fe81336da9fb90944683b8c41984b08793dad" uuid = "f6369f11-7733-5829-9624-2563aa707210" version = "0.10.36" -weakdeps = ["StaticArrays"] - - [deps.ForwardDiff.extensions] - ForwardDiffStaticArraysExt = "StaticArrays" [[deps.Future]] deps = ["Random"] @@ -403,7 +352,7 @@ version = "3.11.2+0" [[deps.GMP_jll]] deps = ["Artifacts", "Libdl"] uuid = "781609d7-10c4-51f6-84f2-b8444358ff6d" -version = "6.2.1+6" +version = "6.2.1+2" [[deps.GeoFormatTypes]] git-tree-sha1 = "59107c179a586f0fe667024c5eb7033e81333271" @@ -447,12 +396,6 @@ git-tree-sha1 = "26407bd1c60129062cec9da63dc7d08251544d53" uuid = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f" version = "0.17.1" - [deps.HDF5.extensions] - MPIExt = "MPI" - - [deps.HDF5.weakdeps] - MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" - [[deps.HDF5_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LLVMOpenMP_jll", "LazyArtifacts", "LibCURL_jll", "Libdl", "MPICH_jll", "MPIPreferences", "MPItrampoline_jll", "MicrosoftMPI_jll", "OpenMPI_jll", "OpenSSL_jll", "TOML", "Zlib_jll", "libaec_jll"] git-tree-sha1 = "38c8874692d48d5440d5752d6c74b0c6b0b60739" @@ -500,15 +443,10 @@ deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" [[deps.IntervalSets]] +deps = ["Random", "RecipesBase", "Statistics"] git-tree-sha1 = "dba9ddf07f77f60450fe5d2e2beb9854d9a49bd0" uuid = "8197267c-284f-5f27-9208-e0e47529a953" version = "0.7.10" -weakdeps = ["Random", "RecipesBase", "Statistics"] - - [deps.IntervalSets.extensions] - IntervalSetsRandomExt = "Random" - IntervalSetsRecipesBaseExt = "RecipesBase" - IntervalSetsStatisticsExt = "Statistics" [[deps.InverseFunctions]] deps = ["Test"] @@ -572,12 +510,6 @@ git-tree-sha1 = "cd161958e8b47f9696a6b03f563afb4e5fe8f703" uuid = "4076af6c-e467-56ae-b986-b466b2749572" version = "1.17.0" - [deps.JuMP.extensions] - JuMPDimensionalDataExt = "DimensionalData" - - [deps.JuMP.weakdeps] - DimensionalData = "0703355e-b756-11e9-17c0-8b28908087d0" - [[deps.LERC_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "bf36f528eec6634efc60d7ec062008f171071434" @@ -591,13 +523,10 @@ uuid = "1d63c593-3942-5779-bab2-d838dc0a180e" version = "15.0.7+0" [[deps.LRUCache]] +deps = ["Serialization"] git-tree-sha1 = "b3cc6698599b10e652832c2f23db3cab99d51b59" uuid = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637" version = "1.6.1" -weakdeps = ["Serialization"] - - [deps.LRUCache.extensions] - SerializationExt = ["Serialization"] [[deps.LaTeXStrings]] git-tree-sha1 = "50901ebc375ed41dbf8058da26f9de442febbbec" @@ -611,26 +540,21 @@ uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" [[deps.LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -version = "0.6.4" +version = "0.6.3" [[deps.LibCURL_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "8.4.0+0" +version = "7.84.0+0" [[deps.LibGit2]] -deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] +deps = ["Base64", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" -[[deps.LibGit2_jll]] -deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] -uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" -version = "1.6.4+0" - [[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" -version = "1.11.0+1" +version = "1.10.2+0" [[deps.Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" @@ -648,7 +572,7 @@ uuid = "bf674bac-ffe4-48d3-9f32-72124ffa9ede" version = "0.1.4" [[deps.LinearAlgebra]] -deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] +deps = ["Libdl", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" [[deps.LittleCMS_jll]] @@ -658,16 +582,10 @@ uuid = "d3a379c0-f9a3-5b72-a4c0-6bf4d2e8af0f" version = "2.12.0+0" [[deps.LogExpFunctions]] -deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] +deps = ["ChainRulesCore", "ChangesOfVariables", "DocStringExtensions", "InverseFunctions", "IrrationalConstants", "LinearAlgebra"] git-tree-sha1 = "18144f3e9cbe9b15b070288eef858f71b291ce37" uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" version = "0.3.27" -weakdeps = ["ChainRulesCore", "ChangesOfVariables", "InverseFunctions"] - - [deps.LogExpFunctions.extensions] - LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" - LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" - LogExpFunctionsInverseFunctionsExt = "InverseFunctions" [[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" @@ -744,7 +662,7 @@ version = "1.1.9" [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.2+1" +version = "2.28.0+0" [[deps.MicrosoftMPI_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -769,7 +687,7 @@ version = "0.3.4" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2023.1.10" +version = "2022.2.1" [[deps.MutableArithmetics]] deps = ["LinearAlgebra", "SparseArrays", "Test"] @@ -794,13 +712,10 @@ uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" version = "1.2.0" [[deps.OffsetArrays]] +deps = ["Adapt"] git-tree-sha1 = "6a731f2b5c03157418a20c12195eb4b74c8f8621" uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" version = "1.13.0" -weakdeps = ["Adapt"] - - [deps.OffsetArrays.extensions] - OffsetArraysAdaptExt = "Adapt" [[deps.OpenBLAS32_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] @@ -811,7 +726,7 @@ version = "0.3.17+0" [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.23+4" +version = "0.3.20+0" [[deps.OpenJpeg_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libtiff_jll", "LittleCMS_jll", "Pkg", "libpng_jll"] @@ -822,7 +737,7 @@ version = "2.4.0+0" [[deps.OpenLibm_jll]] deps = ["Artifacts", "Libdl"] uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.1+2" +version = "0.8.1+0" [[deps.OpenMPI_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Hwloc_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "PMIx_jll", "TOML", "Zlib_jll", "libevent_jll", "prrte_jll"] @@ -884,9 +799,9 @@ uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" version = "2.8.1" [[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.10.0" +version = "1.8.0" [[deps.PooledArrays]] deps = ["DataAPI", "Future"] @@ -931,7 +846,7 @@ uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6" version = "0.44.0" [[deps.Random]] -deps = ["SHA"] +deps = ["SHA", "Serialization"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" [[deps.RangeArrays]] @@ -968,18 +883,6 @@ git-tree-sha1 = "6f6481a44ca53367383f15415dc27ab0c7422731" uuid = "f2b01f46-fcfa-551c-844a-d8ac1e96c665" version = "2.1.4" - [deps.Roots.extensions] - RootsForwardDiffExt = "ForwardDiff" - RootsIntervalRootFindingExt = "IntervalRootFinding" - RootsSymPyExt = "SymPy" - RootsSymPyPythonCallExt = "SymPyPythonCall" - - [deps.Roots.weakdeps] - ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" - IntervalRootFinding = "d2bf35a9-74e0-55ec-b149-d360ff49b807" - SymPy = "24249f21-da20-56a4-8eb1-6a02cf4ae2e6" - SymPyPythonCall = "bc8888f7-b21e-4b7c-a06a-5d9c9496438c" - [[deps.SCIP]] deps = ["Ipopt_jll", "Libdl", "LinearAlgebra", "MathOptInterface", "SCIP_PaPILO_jll", "SCIP_jll"] git-tree-sha1 = "ac0512c46cd91744f62463514f2c581025ea5b93" @@ -1038,19 +941,14 @@ uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" version = "1.2.1" [[deps.SparseArrays]] -deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] +deps = ["LinearAlgebra", "Random"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -version = "1.10.0" [[deps.SpecialFunctions]] -deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +deps = ["ChainRulesCore", "IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] git-tree-sha1 = "e2cfc4012a19088254b3950b85c3c1d8882d864d" uuid = "276daf66-3868-5448-9aa4-cd146d93841b" version = "2.3.1" -weakdeps = ["ChainRulesCore"] - - [deps.SpecialFunctions.extensions] - SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" [[deps.StackViews]] deps = ["OffsetArrays"] @@ -1059,15 +957,10 @@ uuid = "cae243ae-269e-4f55-b966-ac2d0dc13c15" version = "0.1.1" [[deps.StaticArrays]] -deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] +deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore", "Statistics"] git-tree-sha1 = "bf074c045d3d5ffd956fa0a461da38a44685d6b2" uuid = "90137ffa-7385-5640-81b9-e52037218182" version = "1.9.3" -weakdeps = ["ChainRulesCore", "Statistics"] - - [deps.StaticArrays.extensions] - StaticArraysChainRulesCoreExt = "ChainRulesCore" - StaticArraysStatisticsExt = "Statistics" [[deps.StaticArraysCore]] git-tree-sha1 = "36b3d696ce6366023a0ea192b4cd442268995a0d" @@ -1077,7 +970,6 @@ version = "1.4.2" [[deps.Statistics]] deps = ["LinearAlgebra", "SparseArrays"] uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.10.0" [[deps.StringManipulation]] deps = ["PrecompileTools"] @@ -1085,15 +977,10 @@ git-tree-sha1 = "a04cabe79c5f01f4d723cc6704070ada0b9d46d5" uuid = "892a3eda-7b42-436c-8928-eab12a02cf0e" version = "0.3.4" -[[deps.SuiteSparse_jll]] -deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] -uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "7.2.1+1" - [[deps.TOML]] deps = ["Dates"] uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -version = "1.0.3" +version = "1.0.0" [[deps.TableTraits]] deps = ["IteratorInterfaceExtensions"] @@ -1110,7 +997,7 @@ version = "1.11.1" [[deps.Tar]] deps = ["ArgTools", "SHA"] uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" -version = "1.10.0" +version = "1.10.1" [[deps.TensorCore]] deps = ["LinearAlgebra"] @@ -1129,13 +1016,10 @@ uuid = "1e6cf692-eddd-4d53-88a5-2d735e33781b" version = "1.101.1" [[deps.TranscodingStreams]] +deps = ["Random", "Test"] git-tree-sha1 = "3caa21522e7efac1ba21834a03734c57b4611c7e" uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" version = "0.10.4" -weakdeps = ["Random", "Test"] - - [deps.TranscodingStreams.extensions] - TestExt = ["Test", "Random"] [[deps.URIs]] git-tree-sha1 = "67db6cc7b3821e19ebe75791a9dd19c9b1188f2b" @@ -1150,15 +1034,10 @@ uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" [[deps.Unitful]] -deps = ["Dates", "LinearAlgebra", "Random"] +deps = ["ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "Random"] git-tree-sha1 = "3c793be6df9dd77a0cf49d80984ef9ff996948fa" uuid = "1986cc42-f94f-5a68-af5c-568840ba703d" version = "1.19.0" -weakdeps = ["ConstructionBase", "InverseFunctions"] - - [deps.Unitful.extensions] - ConstructionBaseUnitfulExt = "ConstructionBase" - InverseFunctionsUnitfulExt = "InverseFunctions" [[deps.WeakRefStrings]] deps = ["DataAPI", "InlineStrings", "Parsers"] @@ -1180,7 +1059,7 @@ version = "0.16.2" [[deps.Zlib_jll]] deps = ["Libdl"] uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.2.13+1" +version = "1.2.12+3" [[deps.Zstd_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -1207,9 +1086,9 @@ uuid = "477f73a3-ac25-53e9-8cc3-50b2fa2566f0" version = "1.1.2+0" [[deps.libblastrampoline_jll]] -deps = ["Artifacts", "Libdl"] +deps = ["Artifacts", "Libdl", "OpenBLAS_jll"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.8.0+1" +version = "5.1.1+0" [[deps.libevent_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "OpenSSL_jll"] @@ -1232,7 +1111,7 @@ version = "1.6.43+1" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.52.0+1" +version = "1.48.0+0" [[deps.oneTBB_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -1243,7 +1122,7 @@ version = "2021.9.0+0" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.4.0+2" +version = "17.4.0+0" [[deps.prrte_jll]] deps = ["Artifacts", "Hwloc_jll", "JLLWrappers", "Libdl", "PMIx_jll", "libevent_jll"] From 11213d873d6a3bcff63bbf5acecdfd9e65fa6d1c Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Mon, 22 Apr 2024 17:20:40 -0700 Subject: [PATCH 029/142] point to reopt master branch --- julia_src/Manifest.toml | 201 ++++++++++++++++++++++++++++++++-------- 1 file changed, 162 insertions(+), 39 deletions(-) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index 875d0f87e..359ef2d4e 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -1,6 +1,6 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.8.5" +julia_version = "1.10.2" manifest_format = "2.0" project_hash = "b3c6037c53375dada9e36c23f668bcd0efac8f34" @@ -11,22 +11,46 @@ uuid = "ae81ac8f-d209-56e5-92de-9978fef736f9" version = "0.1.3+0" [[deps.AbstractFFTs]] -deps = ["ChainRulesCore", "LinearAlgebra", "Test"] +deps = ["LinearAlgebra"] git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef" uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" version = "1.5.0" +weakdeps = ["ChainRulesCore", "Test"] + + [deps.AbstractFFTs.extensions] + AbstractFFTsChainRulesCoreExt = "ChainRulesCore" + AbstractFFTsTestExt = "Test" [[deps.Accessors]] -deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "MacroTools", "Markdown", "Requires", "Test"] +deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "MacroTools", "Markdown", "Test"] git-tree-sha1 = "c0d491ef0b135fd7d63cbc6404286bc633329425" uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" version = "0.1.36" + [deps.Accessors.extensions] + AccessorsAxisKeysExt = "AxisKeys" + AccessorsIntervalSetsExt = "IntervalSets" + AccessorsStaticArraysExt = "StaticArrays" + AccessorsStructArraysExt = "StructArrays" + AccessorsUnitfulExt = "Unitful" + + [deps.Accessors.weakdeps] + AxisKeys = "94b1ba4f-4ee9-5380-92f1-94cde586c3c5" + IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" + Requires = "ae029012-a4dd-5104-9daa-d747884805df" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" + Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" + [[deps.Adapt]] deps = ["LinearAlgebra", "Requires"] git-tree-sha1 = "cea4ac3f5b4bc4b3000aa55afb6e5626518948fa" uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" version = "4.0.3" +weakdeps = ["StaticArrays"] + + [deps.Adapt.extensions] + AdaptStaticArraysExt = "StaticArrays" [[deps.ArchGDAL]] deps = ["CEnum", "ColorTypes", "Dates", "DiskArrays", "Extents", "GDAL", "GDAL_jll", "GeoFormatTypes", "GeoInterface", "GeoInterfaceRecipes", "ImageCore", "Tables"] @@ -109,16 +133,24 @@ uuid = "3830e938-1dd0-5f3e-8b8e-b3ee43226782" version = "0.6000.600+0" [[deps.ChainRulesCore]] -deps = ["Compat", "LinearAlgebra", "SparseArrays"] +deps = ["Compat", "LinearAlgebra"] git-tree-sha1 = "575cd02e080939a33b6df6c5853d14924c08e35b" uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" version = "1.23.0" +weakdeps = ["SparseArrays"] + + [deps.ChainRulesCore.extensions] + ChainRulesCoreSparseArraysExt = "SparseArrays" [[deps.ChangesOfVariables]] -deps = ["InverseFunctions", "LinearAlgebra", "Test"] +deps = ["LinearAlgebra", "Test"] git-tree-sha1 = "2fba81a302a7be671aefe194f0525ef231104e7f" uuid = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" version = "0.1.8" +weakdeps = ["InverseFunctions"] + + [deps.ChangesOfVariables.extensions] + ChangesOfVariablesInverseFunctionsExt = "InverseFunctions" [[deps.Clp_jll]] deps = ["Artifacts", "CoinUtils_jll", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "METIS_jll", "MUMPS_seq_jll", "OpenBLAS32_jll", "Osi_jll", "Pkg"] @@ -174,20 +206,28 @@ uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" version = "0.3.0" [[deps.Compat]] -deps = ["Dates", "LinearAlgebra", "TOML", "UUIDs"] +deps = ["TOML", "UUIDs"] git-tree-sha1 = "c955881e3c981181362ae4088b35995446298b80" uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" version = "4.14.0" +weakdeps = ["Dates", "LinearAlgebra"] + + [deps.Compat.extensions] + CompatLinearAlgebraExt = "LinearAlgebra" [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.0.1+0" +version = "1.1.0+0" [[deps.CompositionsBase]] git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" version = "0.1.2" +weakdeps = ["InverseFunctions"] + + [deps.CompositionsBase.extensions] + CompositionsBaseInverseFunctionsExt = "InverseFunctions" [[deps.ConcurrentUtilities]] deps = ["Serialization", "Sockets"] @@ -200,6 +240,11 @@ deps = ["LinearAlgebra"] git-tree-sha1 = "c53fc348ca4d40d7b371e71fd52251839080cbc9" uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" version = "1.5.4" +weakdeps = ["IntervalSets", "StaticArrays"] + + [deps.ConstructionBase.extensions] + ConstructionBaseIntervalSetsExt = "IntervalSets" + ConstructionBaseStaticArraysExt = "StaticArrays" [[deps.CoolProp]] deps = ["CoolProp_jll", "Markdown", "Unitful"] @@ -246,7 +291,9 @@ uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" [[deps.DelimitedFiles]] deps = ["Mmap"] +git-tree-sha1 = "9e2f36d3c96a820c678f2f1f1782582fcf685bae" uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" +version = "1.9.1" [[deps.DiffResults]] deps = ["StaticArraysCore"] @@ -322,10 +369,14 @@ uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" version = "0.8.4" [[deps.ForwardDiff]] -deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions", "StaticArrays"] +deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] git-tree-sha1 = "cf0fe81336da9fb90944683b8c41984b08793dad" uuid = "f6369f11-7733-5829-9624-2563aa707210" version = "0.10.36" +weakdeps = ["StaticArrays"] + + [deps.ForwardDiff.extensions] + ForwardDiffStaticArraysExt = "StaticArrays" [[deps.Future]] deps = ["Random"] @@ -352,7 +403,7 @@ version = "3.11.2+0" [[deps.GMP_jll]] deps = ["Artifacts", "Libdl"] uuid = "781609d7-10c4-51f6-84f2-b8444358ff6d" -version = "6.2.1+2" +version = "6.2.1+6" [[deps.GeoFormatTypes]] git-tree-sha1 = "59107c179a586f0fe667024c5eb7033e81333271" @@ -396,6 +447,12 @@ git-tree-sha1 = "26407bd1c60129062cec9da63dc7d08251544d53" uuid = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f" version = "0.17.1" + [deps.HDF5.extensions] + MPIExt = "MPI" + + [deps.HDF5.weakdeps] + MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" + [[deps.HDF5_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LLVMOpenMP_jll", "LazyArtifacts", "LibCURL_jll", "Libdl", "MPICH_jll", "MPIPreferences", "MPItrampoline_jll", "MicrosoftMPI_jll", "OpenMPI_jll", "OpenSSL_jll", "TOML", "Zlib_jll", "libaec_jll"] git-tree-sha1 = "38c8874692d48d5440d5752d6c74b0c6b0b60739" @@ -443,10 +500,15 @@ deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" [[deps.IntervalSets]] -deps = ["Random", "RecipesBase", "Statistics"] git-tree-sha1 = "dba9ddf07f77f60450fe5d2e2beb9854d9a49bd0" uuid = "8197267c-284f-5f27-9208-e0e47529a953" version = "0.7.10" +weakdeps = ["Random", "RecipesBase", "Statistics"] + + [deps.IntervalSets.extensions] + IntervalSetsRandomExt = "Random" + IntervalSetsRecipesBaseExt = "RecipesBase" + IntervalSetsStatisticsExt = "Statistics" [[deps.InverseFunctions]] deps = ["Test"] @@ -510,6 +572,12 @@ git-tree-sha1 = "cd161958e8b47f9696a6b03f563afb4e5fe8f703" uuid = "4076af6c-e467-56ae-b986-b466b2749572" version = "1.17.0" + [deps.JuMP.extensions] + JuMPDimensionalDataExt = "DimensionalData" + + [deps.JuMP.weakdeps] + DimensionalData = "0703355e-b756-11e9-17c0-8b28908087d0" + [[deps.LERC_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "bf36f528eec6634efc60d7ec062008f171071434" @@ -523,10 +591,13 @@ uuid = "1d63c593-3942-5779-bab2-d838dc0a180e" version = "15.0.7+0" [[deps.LRUCache]] -deps = ["Serialization"] git-tree-sha1 = "b3cc6698599b10e652832c2f23db3cab99d51b59" uuid = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637" version = "1.6.1" +weakdeps = ["Serialization"] + + [deps.LRUCache.extensions] + SerializationExt = ["Serialization"] [[deps.LaTeXStrings]] git-tree-sha1 = "50901ebc375ed41dbf8058da26f9de442febbbec" @@ -540,21 +611,26 @@ uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" [[deps.LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -version = "0.6.3" +version = "0.6.4" [[deps.LibCURL_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "7.84.0+0" +version = "8.4.0+0" [[deps.LibGit2]] -deps = ["Base64", "NetworkOptions", "Printf", "SHA"] +deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" +[[deps.LibGit2_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] +uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" +version = "1.6.4+0" + [[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" -version = "1.10.2+0" +version = "1.11.0+1" [[deps.Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" @@ -572,7 +648,7 @@ uuid = "bf674bac-ffe4-48d3-9f32-72124ffa9ede" version = "0.1.4" [[deps.LinearAlgebra]] -deps = ["Libdl", "libblastrampoline_jll"] +deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" [[deps.LittleCMS_jll]] @@ -582,10 +658,16 @@ uuid = "d3a379c0-f9a3-5b72-a4c0-6bf4d2e8af0f" version = "2.12.0+0" [[deps.LogExpFunctions]] -deps = ["ChainRulesCore", "ChangesOfVariables", "DocStringExtensions", "InverseFunctions", "IrrationalConstants", "LinearAlgebra"] +deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] git-tree-sha1 = "18144f3e9cbe9b15b070288eef858f71b291ce37" uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" version = "0.3.27" +weakdeps = ["ChainRulesCore", "ChangesOfVariables", "InverseFunctions"] + + [deps.LogExpFunctions.extensions] + LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" + LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" + LogExpFunctionsInverseFunctionsExt = "InverseFunctions" [[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" @@ -662,7 +744,7 @@ version = "1.1.9" [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.0+0" +version = "2.28.2+1" [[deps.MicrosoftMPI_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -687,7 +769,7 @@ version = "0.3.4" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2022.2.1" +version = "2023.1.10" [[deps.MutableArithmetics]] deps = ["LinearAlgebra", "SparseArrays", "Test"] @@ -712,10 +794,13 @@ uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" version = "1.2.0" [[deps.OffsetArrays]] -deps = ["Adapt"] git-tree-sha1 = "6a731f2b5c03157418a20c12195eb4b74c8f8621" uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" version = "1.13.0" +weakdeps = ["Adapt"] + + [deps.OffsetArrays.extensions] + OffsetArraysAdaptExt = "Adapt" [[deps.OpenBLAS32_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] @@ -726,7 +811,7 @@ version = "0.3.17+0" [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.20+0" +version = "0.3.23+4" [[deps.OpenJpeg_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libtiff_jll", "LittleCMS_jll", "Pkg", "libpng_jll"] @@ -737,7 +822,7 @@ version = "2.4.0+0" [[deps.OpenLibm_jll]] deps = ["Artifacts", "Libdl"] uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.1+0" +version = "0.8.1+2" [[deps.OpenMPI_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Hwloc_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "PMIx_jll", "TOML", "Zlib_jll", "libevent_jll", "prrte_jll"] @@ -799,9 +884,9 @@ uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" version = "2.8.1" [[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.8.0" +version = "1.10.0" [[deps.PooledArrays]] deps = ["DataAPI", "Future"] @@ -841,12 +926,14 @@ uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.REopt]] deps = ["ArchGDAL", "CSV", "CoolProp", "DataFrames", "Dates", "DelimitedFiles", "HTTP", "JLD", "JSON", "JuMP", "LinDistFlow", "LinearAlgebra", "Logging", "MathOptInterface", "Requires", "Roots", "Statistics", "TestEnv"] -git-tree-sha1 = "b8e663a9f06eb6a1085ff7de981df2a6246b2b91" +git-tree-sha1 = "d2bbcbb8344f19ed87ee8cb6a196d4ed8415255b" +repo-rev = "master" +repo-url = "https://github.com/NREL/REopt.jl.git" uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6" -version = "0.44.0" +version = "0.45.0" [[deps.Random]] -deps = ["SHA", "Serialization"] +deps = ["SHA"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" [[deps.RangeArrays]] @@ -883,6 +970,18 @@ git-tree-sha1 = "6f6481a44ca53367383f15415dc27ab0c7422731" uuid = "f2b01f46-fcfa-551c-844a-d8ac1e96c665" version = "2.1.4" + [deps.Roots.extensions] + RootsForwardDiffExt = "ForwardDiff" + RootsIntervalRootFindingExt = "IntervalRootFinding" + RootsSymPyExt = "SymPy" + RootsSymPyPythonCallExt = "SymPyPythonCall" + + [deps.Roots.weakdeps] + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + IntervalRootFinding = "d2bf35a9-74e0-55ec-b149-d360ff49b807" + SymPy = "24249f21-da20-56a4-8eb1-6a02cf4ae2e6" + SymPyPythonCall = "bc8888f7-b21e-4b7c-a06a-5d9c9496438c" + [[deps.SCIP]] deps = ["Ipopt_jll", "Libdl", "LinearAlgebra", "MathOptInterface", "SCIP_PaPILO_jll", "SCIP_jll"] git-tree-sha1 = "ac0512c46cd91744f62463514f2c581025ea5b93" @@ -941,14 +1040,19 @@ uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" version = "1.2.1" [[deps.SparseArrays]] -deps = ["LinearAlgebra", "Random"] +deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +version = "1.10.0" [[deps.SpecialFunctions]] -deps = ["ChainRulesCore", "IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] git-tree-sha1 = "e2cfc4012a19088254b3950b85c3c1d8882d864d" uuid = "276daf66-3868-5448-9aa4-cd146d93841b" version = "2.3.1" +weakdeps = ["ChainRulesCore"] + + [deps.SpecialFunctions.extensions] + SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" [[deps.StackViews]] deps = ["OffsetArrays"] @@ -957,10 +1061,15 @@ uuid = "cae243ae-269e-4f55-b966-ac2d0dc13c15" version = "0.1.1" [[deps.StaticArrays]] -deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore", "Statistics"] +deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] git-tree-sha1 = "bf074c045d3d5ffd956fa0a461da38a44685d6b2" uuid = "90137ffa-7385-5640-81b9-e52037218182" version = "1.9.3" +weakdeps = ["ChainRulesCore", "Statistics"] + + [deps.StaticArrays.extensions] + StaticArraysChainRulesCoreExt = "ChainRulesCore" + StaticArraysStatisticsExt = "Statistics" [[deps.StaticArraysCore]] git-tree-sha1 = "36b3d696ce6366023a0ea192b4cd442268995a0d" @@ -970,6 +1079,7 @@ version = "1.4.2" [[deps.Statistics]] deps = ["LinearAlgebra", "SparseArrays"] uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" +version = "1.10.0" [[deps.StringManipulation]] deps = ["PrecompileTools"] @@ -977,10 +1087,15 @@ git-tree-sha1 = "a04cabe79c5f01f4d723cc6704070ada0b9d46d5" uuid = "892a3eda-7b42-436c-8928-eab12a02cf0e" version = "0.3.4" +[[deps.SuiteSparse_jll]] +deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] +uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" +version = "7.2.1+1" + [[deps.TOML]] deps = ["Dates"] uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -version = "1.0.0" +version = "1.0.3" [[deps.TableTraits]] deps = ["IteratorInterfaceExtensions"] @@ -997,7 +1112,7 @@ version = "1.11.1" [[deps.Tar]] deps = ["ArgTools", "SHA"] uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" -version = "1.10.1" +version = "1.10.0" [[deps.TensorCore]] deps = ["LinearAlgebra"] @@ -1016,10 +1131,13 @@ uuid = "1e6cf692-eddd-4d53-88a5-2d735e33781b" version = "1.101.1" [[deps.TranscodingStreams]] -deps = ["Random", "Test"] git-tree-sha1 = "3caa21522e7efac1ba21834a03734c57b4611c7e" uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" version = "0.10.4" +weakdeps = ["Random", "Test"] + + [deps.TranscodingStreams.extensions] + TestExt = ["Test", "Random"] [[deps.URIs]] git-tree-sha1 = "67db6cc7b3821e19ebe75791a9dd19c9b1188f2b" @@ -1034,10 +1152,15 @@ uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" [[deps.Unitful]] -deps = ["ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "Random"] +deps = ["Dates", "LinearAlgebra", "Random"] git-tree-sha1 = "3c793be6df9dd77a0cf49d80984ef9ff996948fa" uuid = "1986cc42-f94f-5a68-af5c-568840ba703d" version = "1.19.0" +weakdeps = ["ConstructionBase", "InverseFunctions"] + + [deps.Unitful.extensions] + ConstructionBaseUnitfulExt = "ConstructionBase" + InverseFunctionsUnitfulExt = "InverseFunctions" [[deps.WeakRefStrings]] deps = ["DataAPI", "InlineStrings", "Parsers"] @@ -1059,7 +1182,7 @@ version = "0.16.2" [[deps.Zlib_jll]] deps = ["Libdl"] uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.2.12+3" +version = "1.2.13+1" [[deps.Zstd_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -1086,9 +1209,9 @@ uuid = "477f73a3-ac25-53e9-8cc3-50b2fa2566f0" version = "1.1.2+0" [[deps.libblastrampoline_jll]] -deps = ["Artifacts", "Libdl", "OpenBLAS_jll"] +deps = ["Artifacts", "Libdl"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.1.1+0" +version = "5.8.0+1" [[deps.libevent_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "OpenSSL_jll"] @@ -1111,7 +1234,7 @@ version = "1.6.43+1" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.48.0+0" +version = "1.52.0+1" [[deps.oneTBB_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -1122,7 +1245,7 @@ version = "2021.9.0+0" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.4.0+0" +version = "17.4.0+2" [[deps.prrte_jll]] deps = ["Artifacts", "Hwloc_jll", "JLLWrappers", "Libdl", "PMIx_jll", "libevent_jll"] From 254197e7d577c96a9e85f56472e74efb87d55bd5 Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Mon, 22 Apr 2024 17:28:42 -0700 Subject: [PATCH 030/142] Revert "point to reopt master branch" This reverts commit 11213d873d6a3bcff63bbf5acecdfd9e65fa6d1c. --- julia_src/Manifest.toml | 201 ++++++++-------------------------------- 1 file changed, 39 insertions(+), 162 deletions(-) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index 359ef2d4e..875d0f87e 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -1,6 +1,6 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.10.2" +julia_version = "1.8.5" manifest_format = "2.0" project_hash = "b3c6037c53375dada9e36c23f668bcd0efac8f34" @@ -11,46 +11,22 @@ uuid = "ae81ac8f-d209-56e5-92de-9978fef736f9" version = "0.1.3+0" [[deps.AbstractFFTs]] -deps = ["LinearAlgebra"] +deps = ["ChainRulesCore", "LinearAlgebra", "Test"] git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef" uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" version = "1.5.0" -weakdeps = ["ChainRulesCore", "Test"] - - [deps.AbstractFFTs.extensions] - AbstractFFTsChainRulesCoreExt = "ChainRulesCore" - AbstractFFTsTestExt = "Test" [[deps.Accessors]] -deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "MacroTools", "Markdown", "Test"] +deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "MacroTools", "Markdown", "Requires", "Test"] git-tree-sha1 = "c0d491ef0b135fd7d63cbc6404286bc633329425" uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" version = "0.1.36" - [deps.Accessors.extensions] - AccessorsAxisKeysExt = "AxisKeys" - AccessorsIntervalSetsExt = "IntervalSets" - AccessorsStaticArraysExt = "StaticArrays" - AccessorsStructArraysExt = "StructArrays" - AccessorsUnitfulExt = "Unitful" - - [deps.Accessors.weakdeps] - AxisKeys = "94b1ba4f-4ee9-5380-92f1-94cde586c3c5" - IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" - Requires = "ae029012-a4dd-5104-9daa-d747884805df" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" - Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" - [[deps.Adapt]] deps = ["LinearAlgebra", "Requires"] git-tree-sha1 = "cea4ac3f5b4bc4b3000aa55afb6e5626518948fa" uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" version = "4.0.3" -weakdeps = ["StaticArrays"] - - [deps.Adapt.extensions] - AdaptStaticArraysExt = "StaticArrays" [[deps.ArchGDAL]] deps = ["CEnum", "ColorTypes", "Dates", "DiskArrays", "Extents", "GDAL", "GDAL_jll", "GeoFormatTypes", "GeoInterface", "GeoInterfaceRecipes", "ImageCore", "Tables"] @@ -133,24 +109,16 @@ uuid = "3830e938-1dd0-5f3e-8b8e-b3ee43226782" version = "0.6000.600+0" [[deps.ChainRulesCore]] -deps = ["Compat", "LinearAlgebra"] +deps = ["Compat", "LinearAlgebra", "SparseArrays"] git-tree-sha1 = "575cd02e080939a33b6df6c5853d14924c08e35b" uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" version = "1.23.0" -weakdeps = ["SparseArrays"] - - [deps.ChainRulesCore.extensions] - ChainRulesCoreSparseArraysExt = "SparseArrays" [[deps.ChangesOfVariables]] -deps = ["LinearAlgebra", "Test"] +deps = ["InverseFunctions", "LinearAlgebra", "Test"] git-tree-sha1 = "2fba81a302a7be671aefe194f0525ef231104e7f" uuid = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" version = "0.1.8" -weakdeps = ["InverseFunctions"] - - [deps.ChangesOfVariables.extensions] - ChangesOfVariablesInverseFunctionsExt = "InverseFunctions" [[deps.Clp_jll]] deps = ["Artifacts", "CoinUtils_jll", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "METIS_jll", "MUMPS_seq_jll", "OpenBLAS32_jll", "Osi_jll", "Pkg"] @@ -206,28 +174,20 @@ uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" version = "0.3.0" [[deps.Compat]] -deps = ["TOML", "UUIDs"] +deps = ["Dates", "LinearAlgebra", "TOML", "UUIDs"] git-tree-sha1 = "c955881e3c981181362ae4088b35995446298b80" uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" version = "4.14.0" -weakdeps = ["Dates", "LinearAlgebra"] - - [deps.Compat.extensions] - CompatLinearAlgebraExt = "LinearAlgebra" [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.1.0+0" +version = "1.0.1+0" [[deps.CompositionsBase]] git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" version = "0.1.2" -weakdeps = ["InverseFunctions"] - - [deps.CompositionsBase.extensions] - CompositionsBaseInverseFunctionsExt = "InverseFunctions" [[deps.ConcurrentUtilities]] deps = ["Serialization", "Sockets"] @@ -240,11 +200,6 @@ deps = ["LinearAlgebra"] git-tree-sha1 = "c53fc348ca4d40d7b371e71fd52251839080cbc9" uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" version = "1.5.4" -weakdeps = ["IntervalSets", "StaticArrays"] - - [deps.ConstructionBase.extensions] - ConstructionBaseIntervalSetsExt = "IntervalSets" - ConstructionBaseStaticArraysExt = "StaticArrays" [[deps.CoolProp]] deps = ["CoolProp_jll", "Markdown", "Unitful"] @@ -291,9 +246,7 @@ uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" [[deps.DelimitedFiles]] deps = ["Mmap"] -git-tree-sha1 = "9e2f36d3c96a820c678f2f1f1782582fcf685bae" uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" -version = "1.9.1" [[deps.DiffResults]] deps = ["StaticArraysCore"] @@ -369,14 +322,10 @@ uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" version = "0.8.4" [[deps.ForwardDiff]] -deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] +deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions", "StaticArrays"] git-tree-sha1 = "cf0fe81336da9fb90944683b8c41984b08793dad" uuid = "f6369f11-7733-5829-9624-2563aa707210" version = "0.10.36" -weakdeps = ["StaticArrays"] - - [deps.ForwardDiff.extensions] - ForwardDiffStaticArraysExt = "StaticArrays" [[deps.Future]] deps = ["Random"] @@ -403,7 +352,7 @@ version = "3.11.2+0" [[deps.GMP_jll]] deps = ["Artifacts", "Libdl"] uuid = "781609d7-10c4-51f6-84f2-b8444358ff6d" -version = "6.2.1+6" +version = "6.2.1+2" [[deps.GeoFormatTypes]] git-tree-sha1 = "59107c179a586f0fe667024c5eb7033e81333271" @@ -447,12 +396,6 @@ git-tree-sha1 = "26407bd1c60129062cec9da63dc7d08251544d53" uuid = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f" version = "0.17.1" - [deps.HDF5.extensions] - MPIExt = "MPI" - - [deps.HDF5.weakdeps] - MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" - [[deps.HDF5_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LLVMOpenMP_jll", "LazyArtifacts", "LibCURL_jll", "Libdl", "MPICH_jll", "MPIPreferences", "MPItrampoline_jll", "MicrosoftMPI_jll", "OpenMPI_jll", "OpenSSL_jll", "TOML", "Zlib_jll", "libaec_jll"] git-tree-sha1 = "38c8874692d48d5440d5752d6c74b0c6b0b60739" @@ -500,15 +443,10 @@ deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" [[deps.IntervalSets]] +deps = ["Random", "RecipesBase", "Statistics"] git-tree-sha1 = "dba9ddf07f77f60450fe5d2e2beb9854d9a49bd0" uuid = "8197267c-284f-5f27-9208-e0e47529a953" version = "0.7.10" -weakdeps = ["Random", "RecipesBase", "Statistics"] - - [deps.IntervalSets.extensions] - IntervalSetsRandomExt = "Random" - IntervalSetsRecipesBaseExt = "RecipesBase" - IntervalSetsStatisticsExt = "Statistics" [[deps.InverseFunctions]] deps = ["Test"] @@ -572,12 +510,6 @@ git-tree-sha1 = "cd161958e8b47f9696a6b03f563afb4e5fe8f703" uuid = "4076af6c-e467-56ae-b986-b466b2749572" version = "1.17.0" - [deps.JuMP.extensions] - JuMPDimensionalDataExt = "DimensionalData" - - [deps.JuMP.weakdeps] - DimensionalData = "0703355e-b756-11e9-17c0-8b28908087d0" - [[deps.LERC_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "bf36f528eec6634efc60d7ec062008f171071434" @@ -591,13 +523,10 @@ uuid = "1d63c593-3942-5779-bab2-d838dc0a180e" version = "15.0.7+0" [[deps.LRUCache]] +deps = ["Serialization"] git-tree-sha1 = "b3cc6698599b10e652832c2f23db3cab99d51b59" uuid = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637" version = "1.6.1" -weakdeps = ["Serialization"] - - [deps.LRUCache.extensions] - SerializationExt = ["Serialization"] [[deps.LaTeXStrings]] git-tree-sha1 = "50901ebc375ed41dbf8058da26f9de442febbbec" @@ -611,26 +540,21 @@ uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" [[deps.LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -version = "0.6.4" +version = "0.6.3" [[deps.LibCURL_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "8.4.0+0" +version = "7.84.0+0" [[deps.LibGit2]] -deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] +deps = ["Base64", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" -[[deps.LibGit2_jll]] -deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] -uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" -version = "1.6.4+0" - [[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" -version = "1.11.0+1" +version = "1.10.2+0" [[deps.Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" @@ -648,7 +572,7 @@ uuid = "bf674bac-ffe4-48d3-9f32-72124ffa9ede" version = "0.1.4" [[deps.LinearAlgebra]] -deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] +deps = ["Libdl", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" [[deps.LittleCMS_jll]] @@ -658,16 +582,10 @@ uuid = "d3a379c0-f9a3-5b72-a4c0-6bf4d2e8af0f" version = "2.12.0+0" [[deps.LogExpFunctions]] -deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] +deps = ["ChainRulesCore", "ChangesOfVariables", "DocStringExtensions", "InverseFunctions", "IrrationalConstants", "LinearAlgebra"] git-tree-sha1 = "18144f3e9cbe9b15b070288eef858f71b291ce37" uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" version = "0.3.27" -weakdeps = ["ChainRulesCore", "ChangesOfVariables", "InverseFunctions"] - - [deps.LogExpFunctions.extensions] - LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" - LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" - LogExpFunctionsInverseFunctionsExt = "InverseFunctions" [[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" @@ -744,7 +662,7 @@ version = "1.1.9" [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.2+1" +version = "2.28.0+0" [[deps.MicrosoftMPI_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -769,7 +687,7 @@ version = "0.3.4" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2023.1.10" +version = "2022.2.1" [[deps.MutableArithmetics]] deps = ["LinearAlgebra", "SparseArrays", "Test"] @@ -794,13 +712,10 @@ uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" version = "1.2.0" [[deps.OffsetArrays]] +deps = ["Adapt"] git-tree-sha1 = "6a731f2b5c03157418a20c12195eb4b74c8f8621" uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" version = "1.13.0" -weakdeps = ["Adapt"] - - [deps.OffsetArrays.extensions] - OffsetArraysAdaptExt = "Adapt" [[deps.OpenBLAS32_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] @@ -811,7 +726,7 @@ version = "0.3.17+0" [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.23+4" +version = "0.3.20+0" [[deps.OpenJpeg_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libtiff_jll", "LittleCMS_jll", "Pkg", "libpng_jll"] @@ -822,7 +737,7 @@ version = "2.4.0+0" [[deps.OpenLibm_jll]] deps = ["Artifacts", "Libdl"] uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.1+2" +version = "0.8.1+0" [[deps.OpenMPI_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Hwloc_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "PMIx_jll", "TOML", "Zlib_jll", "libevent_jll", "prrte_jll"] @@ -884,9 +799,9 @@ uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" version = "2.8.1" [[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.10.0" +version = "1.8.0" [[deps.PooledArrays]] deps = ["DataAPI", "Future"] @@ -926,14 +841,12 @@ uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.REopt]] deps = ["ArchGDAL", "CSV", "CoolProp", "DataFrames", "Dates", "DelimitedFiles", "HTTP", "JLD", "JSON", "JuMP", "LinDistFlow", "LinearAlgebra", "Logging", "MathOptInterface", "Requires", "Roots", "Statistics", "TestEnv"] -git-tree-sha1 = "d2bbcbb8344f19ed87ee8cb6a196d4ed8415255b" -repo-rev = "master" -repo-url = "https://github.com/NREL/REopt.jl.git" +git-tree-sha1 = "b8e663a9f06eb6a1085ff7de981df2a6246b2b91" uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6" -version = "0.45.0" +version = "0.44.0" [[deps.Random]] -deps = ["SHA"] +deps = ["SHA", "Serialization"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" [[deps.RangeArrays]] @@ -970,18 +883,6 @@ git-tree-sha1 = "6f6481a44ca53367383f15415dc27ab0c7422731" uuid = "f2b01f46-fcfa-551c-844a-d8ac1e96c665" version = "2.1.4" - [deps.Roots.extensions] - RootsForwardDiffExt = "ForwardDiff" - RootsIntervalRootFindingExt = "IntervalRootFinding" - RootsSymPyExt = "SymPy" - RootsSymPyPythonCallExt = "SymPyPythonCall" - - [deps.Roots.weakdeps] - ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" - IntervalRootFinding = "d2bf35a9-74e0-55ec-b149-d360ff49b807" - SymPy = "24249f21-da20-56a4-8eb1-6a02cf4ae2e6" - SymPyPythonCall = "bc8888f7-b21e-4b7c-a06a-5d9c9496438c" - [[deps.SCIP]] deps = ["Ipopt_jll", "Libdl", "LinearAlgebra", "MathOptInterface", "SCIP_PaPILO_jll", "SCIP_jll"] git-tree-sha1 = "ac0512c46cd91744f62463514f2c581025ea5b93" @@ -1040,19 +941,14 @@ uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" version = "1.2.1" [[deps.SparseArrays]] -deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] +deps = ["LinearAlgebra", "Random"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -version = "1.10.0" [[deps.SpecialFunctions]] -deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +deps = ["ChainRulesCore", "IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] git-tree-sha1 = "e2cfc4012a19088254b3950b85c3c1d8882d864d" uuid = "276daf66-3868-5448-9aa4-cd146d93841b" version = "2.3.1" -weakdeps = ["ChainRulesCore"] - - [deps.SpecialFunctions.extensions] - SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" [[deps.StackViews]] deps = ["OffsetArrays"] @@ -1061,15 +957,10 @@ uuid = "cae243ae-269e-4f55-b966-ac2d0dc13c15" version = "0.1.1" [[deps.StaticArrays]] -deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] +deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore", "Statistics"] git-tree-sha1 = "bf074c045d3d5ffd956fa0a461da38a44685d6b2" uuid = "90137ffa-7385-5640-81b9-e52037218182" version = "1.9.3" -weakdeps = ["ChainRulesCore", "Statistics"] - - [deps.StaticArrays.extensions] - StaticArraysChainRulesCoreExt = "ChainRulesCore" - StaticArraysStatisticsExt = "Statistics" [[deps.StaticArraysCore]] git-tree-sha1 = "36b3d696ce6366023a0ea192b4cd442268995a0d" @@ -1079,7 +970,6 @@ version = "1.4.2" [[deps.Statistics]] deps = ["LinearAlgebra", "SparseArrays"] uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.10.0" [[deps.StringManipulation]] deps = ["PrecompileTools"] @@ -1087,15 +977,10 @@ git-tree-sha1 = "a04cabe79c5f01f4d723cc6704070ada0b9d46d5" uuid = "892a3eda-7b42-436c-8928-eab12a02cf0e" version = "0.3.4" -[[deps.SuiteSparse_jll]] -deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] -uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "7.2.1+1" - [[deps.TOML]] deps = ["Dates"] uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -version = "1.0.3" +version = "1.0.0" [[deps.TableTraits]] deps = ["IteratorInterfaceExtensions"] @@ -1112,7 +997,7 @@ version = "1.11.1" [[deps.Tar]] deps = ["ArgTools", "SHA"] uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" -version = "1.10.0" +version = "1.10.1" [[deps.TensorCore]] deps = ["LinearAlgebra"] @@ -1131,13 +1016,10 @@ uuid = "1e6cf692-eddd-4d53-88a5-2d735e33781b" version = "1.101.1" [[deps.TranscodingStreams]] +deps = ["Random", "Test"] git-tree-sha1 = "3caa21522e7efac1ba21834a03734c57b4611c7e" uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" version = "0.10.4" -weakdeps = ["Random", "Test"] - - [deps.TranscodingStreams.extensions] - TestExt = ["Test", "Random"] [[deps.URIs]] git-tree-sha1 = "67db6cc7b3821e19ebe75791a9dd19c9b1188f2b" @@ -1152,15 +1034,10 @@ uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" [[deps.Unitful]] -deps = ["Dates", "LinearAlgebra", "Random"] +deps = ["ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "Random"] git-tree-sha1 = "3c793be6df9dd77a0cf49d80984ef9ff996948fa" uuid = "1986cc42-f94f-5a68-af5c-568840ba703d" version = "1.19.0" -weakdeps = ["ConstructionBase", "InverseFunctions"] - - [deps.Unitful.extensions] - ConstructionBaseUnitfulExt = "ConstructionBase" - InverseFunctionsUnitfulExt = "InverseFunctions" [[deps.WeakRefStrings]] deps = ["DataAPI", "InlineStrings", "Parsers"] @@ -1182,7 +1059,7 @@ version = "0.16.2" [[deps.Zlib_jll]] deps = ["Libdl"] uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.2.13+1" +version = "1.2.12+3" [[deps.Zstd_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -1209,9 +1086,9 @@ uuid = "477f73a3-ac25-53e9-8cc3-50b2fa2566f0" version = "1.1.2+0" [[deps.libblastrampoline_jll]] -deps = ["Artifacts", "Libdl"] +deps = ["Artifacts", "Libdl", "OpenBLAS_jll"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.8.0+1" +version = "5.1.1+0" [[deps.libevent_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "OpenSSL_jll"] @@ -1234,7 +1111,7 @@ version = "1.6.43+1" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.52.0+1" +version = "1.48.0+0" [[deps.oneTBB_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -1245,7 +1122,7 @@ version = "2021.9.0+0" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.4.0+2" +version = "17.4.0+0" [[deps.prrte_jll]] deps = ["Artifacts", "Hwloc_jll", "JLLWrappers", "Libdl", "PMIx_jll", "libevent_jll"] From 89e4df610ead0fbc0e7772daad04d21996bd50d1 Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Mon, 22 Apr 2024 17:30:34 -0700 Subject: [PATCH 031/142] point to latest reopt version --- julia_src/Manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index 875d0f87e..366432e49 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -843,7 +843,7 @@ uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" deps = ["ArchGDAL", "CSV", "CoolProp", "DataFrames", "Dates", "DelimitedFiles", "HTTP", "JLD", "JSON", "JuMP", "LinDistFlow", "LinearAlgebra", "Logging", "MathOptInterface", "Requires", "Roots", "Statistics", "TestEnv"] git-tree-sha1 = "b8e663a9f06eb6a1085ff7de981df2a6246b2b91" uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6" -version = "0.44.0" +version = "0.45.0" [[deps.Random]] deps = ["SHA", "Serialization"] From ebc5bf0d0b1ebcde69ed51b1cee12841c6baf357 Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Mon, 22 Apr 2024 17:47:31 -0700 Subject: [PATCH 032/142] debug --- reoptjl/test/test_job_endpoint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reoptjl/test/test_job_endpoint.py b/reoptjl/test/test_job_endpoint.py index ba58ffb0b..fffc49931 100644 --- a/reoptjl/test/test_job_endpoint.py +++ b/reoptjl/test/test_job_endpoint.py @@ -227,7 +227,7 @@ def test_superset_input_fields(self): r = json.loads(resp.content) results = r["outputs"] - print(results) + self.assertEqual(results, {}) self.assertAlmostEqual(results["Financial"]["npv"], -258533.19, places=-3) assert(resp.status_code==200) From 638bb93331d22255d54b8940c131b2396daea76b Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Mon, 22 Apr 2024 22:33:31 -0700 Subject: [PATCH 033/142] debug --- reoptjl/test/test_job_endpoint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reoptjl/test/test_job_endpoint.py b/reoptjl/test/test_job_endpoint.py index fffc49931..d91006a14 100644 --- a/reoptjl/test/test_job_endpoint.py +++ b/reoptjl/test/test_job_endpoint.py @@ -227,7 +227,7 @@ def test_superset_input_fields(self): r = json.loads(resp.content) results = r["outputs"] - self.assertEqual(results, {}) + self.assertEqual(r, {}) self.assertAlmostEqual(results["Financial"]["npv"], -258533.19, places=-3) assert(resp.status_code==200) From fe64e669a178c1849f8051ae826f45087790efdd Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Mon, 22 Apr 2024 22:55:10 -0700 Subject: [PATCH 034/142] debug --- reoptjl/test/test_job_endpoint.py | 1 + 1 file changed, 1 insertion(+) diff --git a/reoptjl/test/test_job_endpoint.py b/reoptjl/test/test_job_endpoint.py index d91006a14..82dd143b5 100644 --- a/reoptjl/test/test_job_endpoint.py +++ b/reoptjl/test/test_job_endpoint.py @@ -227,6 +227,7 @@ def test_superset_input_fields(self): r = json.loads(resp.content) results = r["outputs"] + self.maxDiff = None self.assertEqual(r, {}) self.assertAlmostEqual(results["Financial"]["npv"], -258533.19, places=-3) assert(resp.status_code==200) From 86cfa2ed346c2800e6d707d9991dea7252723183 Mon Sep 17 00:00:00 2001 From: Byron Pullutasig <115118857+bpulluta@users.noreply.github.com> Date: Tue, 23 Apr 2024 11:56:02 -0600 Subject: [PATCH 035/142] pv update migrations --- .../migrations/0057_alter_pvinputs_tilt.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 reoptjl/migrations/0057_alter_pvinputs_tilt.py diff --git a/reoptjl/migrations/0057_alter_pvinputs_tilt.py b/reoptjl/migrations/0057_alter_pvinputs_tilt.py new file mode 100644 index 000000000..6dcec9c9c --- /dev/null +++ b/reoptjl/migrations/0057_alter_pvinputs_tilt.py @@ -0,0 +1,19 @@ +# Generated by Django 4.0.7 on 2024-04-23 17:45 + +import django.core.validators +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('reoptjl', '0056_alter_electricloadinputs_annual_kwh_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='pvinputs', + name='tilt', + field=models.FloatField(blank=True, help_text='PV system tilt: Set tilt angle to 20 degrees for fixed arrays (rooftop or ground-mounted). Set tilt angle to 0 degrees for axis-tracking systems.', null=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(90)]), + ), + ] From e12d1a4bc7bdfe0eca4c949222ba998572392012 Mon Sep 17 00:00:00 2001 From: Byron Pullutasig <115118857+bpulluta@users.noreply.github.com> Date: Tue, 23 Apr 2024 12:04:35 -0600 Subject: [PATCH 036/142] changelog update --- CHANGELOG.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cc14417e..feeb7fceb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,8 +31,6 @@ Classify the change according to the following categories: #### Changed - In `core/pv.jl` a change was made to make sure we are using the same assumptions as PVWatts guidelines, the default `tilt` angle for a fixed array should be 20 degrees, irrespective of it being a rooftop `(0)` or ground-mounted (open-rack)`(1)` system. By default the `tilt` will be set to 20 degrees for fixed ground-mount and rooftop, and 0 degrees for axis-tracking (`array_type = (2), (3), or (4)`) -> "The PVWatts® default value for the tilt angle depends on the array type: For a fixed array, the default value is 20 degrees, and for one-axis tracking the default value is zero. A common rule of thumb for fixed arrays is to set the tilt angle to the latitude of the system's location to maximize the system's total electrical output over the year. Use a lower tilt angle favor peak production in the summer months when the sun is high in the sky, or a higher tilt angle to increase output during winter months. Higher tilt angles tend to cost more for racking and mounting hardware, and may increase the risk of wind damage to the array." - ## v3.7.0 ### Minor Updates #### Changed From 0a9ef52e2405df523426325cea182e83477b0946 Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Tue, 23 Apr 2024 11:30:27 -0700 Subject: [PATCH 037/142] update reopt_version in meta_dict --- reoptjl/api.py | 2 +- resilience_stats/api.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/reoptjl/api.py b/reoptjl/api.py index ea4348210..e0c911c50 100644 --- a/reoptjl/api.py +++ b/reoptjl/api.py @@ -98,7 +98,7 @@ def obj_create(self, bundle, **kwargs): meta = { "run_uuid": run_uuid, "api_version": 3, - "reopt_version": "0.44.0", + "reopt_version": "0.45.0", "status": "Validating..." } bundle.data.update({"APIMeta": meta}) diff --git a/resilience_stats/api.py b/resilience_stats/api.py index fc87de070..fbe66104b 100644 --- a/resilience_stats/api.py +++ b/resilience_stats/api.py @@ -62,7 +62,7 @@ def obj_create(self, bundle, **kwargs): meta_dict = { "run_uuid": erp_run_uuid, - "reopt_version": "0.41.0", + "reopt_version": "0.45.0", "status": "Validating..." } From 787b300cee90bc523bb95d991ae6930004c36c01 Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Tue, 23 Apr 2024 11:39:20 -0700 Subject: [PATCH 038/142] Update Manifest.toml --- julia_src/Manifest.toml | 197 ++++++++++++++++++++++++++++++++-------- 1 file changed, 159 insertions(+), 38 deletions(-) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index 366432e49..6d912780c 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -1,6 +1,6 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.8.5" +julia_version = "1.10.2" manifest_format = "2.0" project_hash = "b3c6037c53375dada9e36c23f668bcd0efac8f34" @@ -11,22 +11,46 @@ uuid = "ae81ac8f-d209-56e5-92de-9978fef736f9" version = "0.1.3+0" [[deps.AbstractFFTs]] -deps = ["ChainRulesCore", "LinearAlgebra", "Test"] +deps = ["LinearAlgebra"] git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef" uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" version = "1.5.0" +weakdeps = ["ChainRulesCore", "Test"] + + [deps.AbstractFFTs.extensions] + AbstractFFTsChainRulesCoreExt = "ChainRulesCore" + AbstractFFTsTestExt = "Test" [[deps.Accessors]] -deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "MacroTools", "Markdown", "Requires", "Test"] +deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "MacroTools", "Markdown", "Test"] git-tree-sha1 = "c0d491ef0b135fd7d63cbc6404286bc633329425" uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" version = "0.1.36" + [deps.Accessors.extensions] + AccessorsAxisKeysExt = "AxisKeys" + AccessorsIntervalSetsExt = "IntervalSets" + AccessorsStaticArraysExt = "StaticArrays" + AccessorsStructArraysExt = "StructArrays" + AccessorsUnitfulExt = "Unitful" + + [deps.Accessors.weakdeps] + AxisKeys = "94b1ba4f-4ee9-5380-92f1-94cde586c3c5" + IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" + Requires = "ae029012-a4dd-5104-9daa-d747884805df" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" + Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" + [[deps.Adapt]] deps = ["LinearAlgebra", "Requires"] git-tree-sha1 = "cea4ac3f5b4bc4b3000aa55afb6e5626518948fa" uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" version = "4.0.3" +weakdeps = ["StaticArrays"] + + [deps.Adapt.extensions] + AdaptStaticArraysExt = "StaticArrays" [[deps.ArchGDAL]] deps = ["CEnum", "ColorTypes", "Dates", "DiskArrays", "Extents", "GDAL", "GDAL_jll", "GeoFormatTypes", "GeoInterface", "GeoInterfaceRecipes", "ImageCore", "Tables"] @@ -109,16 +133,24 @@ uuid = "3830e938-1dd0-5f3e-8b8e-b3ee43226782" version = "0.6000.600+0" [[deps.ChainRulesCore]] -deps = ["Compat", "LinearAlgebra", "SparseArrays"] +deps = ["Compat", "LinearAlgebra"] git-tree-sha1 = "575cd02e080939a33b6df6c5853d14924c08e35b" uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" version = "1.23.0" +weakdeps = ["SparseArrays"] + + [deps.ChainRulesCore.extensions] + ChainRulesCoreSparseArraysExt = "SparseArrays" [[deps.ChangesOfVariables]] -deps = ["InverseFunctions", "LinearAlgebra", "Test"] +deps = ["LinearAlgebra", "Test"] git-tree-sha1 = "2fba81a302a7be671aefe194f0525ef231104e7f" uuid = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" version = "0.1.8" +weakdeps = ["InverseFunctions"] + + [deps.ChangesOfVariables.extensions] + ChangesOfVariablesInverseFunctionsExt = "InverseFunctions" [[deps.Clp_jll]] deps = ["Artifacts", "CoinUtils_jll", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "METIS_jll", "MUMPS_seq_jll", "OpenBLAS32_jll", "Osi_jll", "Pkg"] @@ -174,20 +206,28 @@ uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" version = "0.3.0" [[deps.Compat]] -deps = ["Dates", "LinearAlgebra", "TOML", "UUIDs"] +deps = ["TOML", "UUIDs"] git-tree-sha1 = "c955881e3c981181362ae4088b35995446298b80" uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" version = "4.14.0" +weakdeps = ["Dates", "LinearAlgebra"] + + [deps.Compat.extensions] + CompatLinearAlgebraExt = "LinearAlgebra" [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.0.1+0" +version = "1.1.0+0" [[deps.CompositionsBase]] git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" version = "0.1.2" +weakdeps = ["InverseFunctions"] + + [deps.CompositionsBase.extensions] + CompositionsBaseInverseFunctionsExt = "InverseFunctions" [[deps.ConcurrentUtilities]] deps = ["Serialization", "Sockets"] @@ -200,6 +240,11 @@ deps = ["LinearAlgebra"] git-tree-sha1 = "c53fc348ca4d40d7b371e71fd52251839080cbc9" uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" version = "1.5.4" +weakdeps = ["IntervalSets", "StaticArrays"] + + [deps.ConstructionBase.extensions] + ConstructionBaseIntervalSetsExt = "IntervalSets" + ConstructionBaseStaticArraysExt = "StaticArrays" [[deps.CoolProp]] deps = ["CoolProp_jll", "Markdown", "Unitful"] @@ -246,7 +291,9 @@ uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" [[deps.DelimitedFiles]] deps = ["Mmap"] +git-tree-sha1 = "9e2f36d3c96a820c678f2f1f1782582fcf685bae" uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" +version = "1.9.1" [[deps.DiffResults]] deps = ["StaticArraysCore"] @@ -322,10 +369,14 @@ uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" version = "0.8.4" [[deps.ForwardDiff]] -deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions", "StaticArrays"] +deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] git-tree-sha1 = "cf0fe81336da9fb90944683b8c41984b08793dad" uuid = "f6369f11-7733-5829-9624-2563aa707210" version = "0.10.36" +weakdeps = ["StaticArrays"] + + [deps.ForwardDiff.extensions] + ForwardDiffStaticArraysExt = "StaticArrays" [[deps.Future]] deps = ["Random"] @@ -352,7 +403,7 @@ version = "3.11.2+0" [[deps.GMP_jll]] deps = ["Artifacts", "Libdl"] uuid = "781609d7-10c4-51f6-84f2-b8444358ff6d" -version = "6.2.1+2" +version = "6.2.1+6" [[deps.GeoFormatTypes]] git-tree-sha1 = "59107c179a586f0fe667024c5eb7033e81333271" @@ -396,6 +447,12 @@ git-tree-sha1 = "26407bd1c60129062cec9da63dc7d08251544d53" uuid = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f" version = "0.17.1" + [deps.HDF5.extensions] + MPIExt = "MPI" + + [deps.HDF5.weakdeps] + MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" + [[deps.HDF5_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LLVMOpenMP_jll", "LazyArtifacts", "LibCURL_jll", "Libdl", "MPICH_jll", "MPIPreferences", "MPItrampoline_jll", "MicrosoftMPI_jll", "OpenMPI_jll", "OpenSSL_jll", "TOML", "Zlib_jll", "libaec_jll"] git-tree-sha1 = "38c8874692d48d5440d5752d6c74b0c6b0b60739" @@ -443,10 +500,15 @@ deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" [[deps.IntervalSets]] -deps = ["Random", "RecipesBase", "Statistics"] git-tree-sha1 = "dba9ddf07f77f60450fe5d2e2beb9854d9a49bd0" uuid = "8197267c-284f-5f27-9208-e0e47529a953" version = "0.7.10" +weakdeps = ["Random", "RecipesBase", "Statistics"] + + [deps.IntervalSets.extensions] + IntervalSetsRandomExt = "Random" + IntervalSetsRecipesBaseExt = "RecipesBase" + IntervalSetsStatisticsExt = "Statistics" [[deps.InverseFunctions]] deps = ["Test"] @@ -510,6 +572,12 @@ git-tree-sha1 = "cd161958e8b47f9696a6b03f563afb4e5fe8f703" uuid = "4076af6c-e467-56ae-b986-b466b2749572" version = "1.17.0" + [deps.JuMP.extensions] + JuMPDimensionalDataExt = "DimensionalData" + + [deps.JuMP.weakdeps] + DimensionalData = "0703355e-b756-11e9-17c0-8b28908087d0" + [[deps.LERC_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "bf36f528eec6634efc60d7ec062008f171071434" @@ -523,10 +591,13 @@ uuid = "1d63c593-3942-5779-bab2-d838dc0a180e" version = "15.0.7+0" [[deps.LRUCache]] -deps = ["Serialization"] git-tree-sha1 = "b3cc6698599b10e652832c2f23db3cab99d51b59" uuid = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637" version = "1.6.1" +weakdeps = ["Serialization"] + + [deps.LRUCache.extensions] + SerializationExt = ["Serialization"] [[deps.LaTeXStrings]] git-tree-sha1 = "50901ebc375ed41dbf8058da26f9de442febbbec" @@ -540,21 +611,26 @@ uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" [[deps.LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -version = "0.6.3" +version = "0.6.4" [[deps.LibCURL_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "7.84.0+0" +version = "8.4.0+0" [[deps.LibGit2]] -deps = ["Base64", "NetworkOptions", "Printf", "SHA"] +deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" +[[deps.LibGit2_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] +uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" +version = "1.6.4+0" + [[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" -version = "1.10.2+0" +version = "1.11.0+1" [[deps.Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" @@ -572,7 +648,7 @@ uuid = "bf674bac-ffe4-48d3-9f32-72124ffa9ede" version = "0.1.4" [[deps.LinearAlgebra]] -deps = ["Libdl", "libblastrampoline_jll"] +deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" [[deps.LittleCMS_jll]] @@ -582,10 +658,16 @@ uuid = "d3a379c0-f9a3-5b72-a4c0-6bf4d2e8af0f" version = "2.12.0+0" [[deps.LogExpFunctions]] -deps = ["ChainRulesCore", "ChangesOfVariables", "DocStringExtensions", "InverseFunctions", "IrrationalConstants", "LinearAlgebra"] +deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] git-tree-sha1 = "18144f3e9cbe9b15b070288eef858f71b291ce37" uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" version = "0.3.27" +weakdeps = ["ChainRulesCore", "ChangesOfVariables", "InverseFunctions"] + + [deps.LogExpFunctions.extensions] + LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" + LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" + LogExpFunctionsInverseFunctionsExt = "InverseFunctions" [[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" @@ -662,7 +744,7 @@ version = "1.1.9" [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.0+0" +version = "2.28.2+1" [[deps.MicrosoftMPI_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -687,7 +769,7 @@ version = "0.3.4" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2022.2.1" +version = "2023.1.10" [[deps.MutableArithmetics]] deps = ["LinearAlgebra", "SparseArrays", "Test"] @@ -712,10 +794,13 @@ uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" version = "1.2.0" [[deps.OffsetArrays]] -deps = ["Adapt"] git-tree-sha1 = "6a731f2b5c03157418a20c12195eb4b74c8f8621" uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" version = "1.13.0" +weakdeps = ["Adapt"] + + [deps.OffsetArrays.extensions] + OffsetArraysAdaptExt = "Adapt" [[deps.OpenBLAS32_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] @@ -726,7 +811,7 @@ version = "0.3.17+0" [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.20+0" +version = "0.3.23+4" [[deps.OpenJpeg_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libtiff_jll", "LittleCMS_jll", "Pkg", "libpng_jll"] @@ -737,7 +822,7 @@ version = "2.4.0+0" [[deps.OpenLibm_jll]] deps = ["Artifacts", "Libdl"] uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.1+0" +version = "0.8.1+2" [[deps.OpenMPI_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Hwloc_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "PMIx_jll", "TOML", "Zlib_jll", "libevent_jll", "prrte_jll"] @@ -799,9 +884,9 @@ uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" version = "2.8.1" [[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.8.0" +version = "1.10.0" [[deps.PooledArrays]] deps = ["DataAPI", "Future"] @@ -841,12 +926,12 @@ uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.REopt]] deps = ["ArchGDAL", "CSV", "CoolProp", "DataFrames", "Dates", "DelimitedFiles", "HTTP", "JLD", "JSON", "JuMP", "LinDistFlow", "LinearAlgebra", "Logging", "MathOptInterface", "Requires", "Roots", "Statistics", "TestEnv"] -git-tree-sha1 = "b8e663a9f06eb6a1085ff7de981df2a6246b2b91" +git-tree-sha1 = "d2bbcbb8344f19ed87ee8cb6a196d4ed8415255b" uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6" version = "0.45.0" [[deps.Random]] -deps = ["SHA", "Serialization"] +deps = ["SHA"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" [[deps.RangeArrays]] @@ -883,6 +968,18 @@ git-tree-sha1 = "6f6481a44ca53367383f15415dc27ab0c7422731" uuid = "f2b01f46-fcfa-551c-844a-d8ac1e96c665" version = "2.1.4" + [deps.Roots.extensions] + RootsForwardDiffExt = "ForwardDiff" + RootsIntervalRootFindingExt = "IntervalRootFinding" + RootsSymPyExt = "SymPy" + RootsSymPyPythonCallExt = "SymPyPythonCall" + + [deps.Roots.weakdeps] + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + IntervalRootFinding = "d2bf35a9-74e0-55ec-b149-d360ff49b807" + SymPy = "24249f21-da20-56a4-8eb1-6a02cf4ae2e6" + SymPyPythonCall = "bc8888f7-b21e-4b7c-a06a-5d9c9496438c" + [[deps.SCIP]] deps = ["Ipopt_jll", "Libdl", "LinearAlgebra", "MathOptInterface", "SCIP_PaPILO_jll", "SCIP_jll"] git-tree-sha1 = "ac0512c46cd91744f62463514f2c581025ea5b93" @@ -941,14 +1038,19 @@ uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" version = "1.2.1" [[deps.SparseArrays]] -deps = ["LinearAlgebra", "Random"] +deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +version = "1.10.0" [[deps.SpecialFunctions]] -deps = ["ChainRulesCore", "IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] git-tree-sha1 = "e2cfc4012a19088254b3950b85c3c1d8882d864d" uuid = "276daf66-3868-5448-9aa4-cd146d93841b" version = "2.3.1" +weakdeps = ["ChainRulesCore"] + + [deps.SpecialFunctions.extensions] + SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" [[deps.StackViews]] deps = ["OffsetArrays"] @@ -957,10 +1059,15 @@ uuid = "cae243ae-269e-4f55-b966-ac2d0dc13c15" version = "0.1.1" [[deps.StaticArrays]] -deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore", "Statistics"] +deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] git-tree-sha1 = "bf074c045d3d5ffd956fa0a461da38a44685d6b2" uuid = "90137ffa-7385-5640-81b9-e52037218182" version = "1.9.3" +weakdeps = ["ChainRulesCore", "Statistics"] + + [deps.StaticArrays.extensions] + StaticArraysChainRulesCoreExt = "ChainRulesCore" + StaticArraysStatisticsExt = "Statistics" [[deps.StaticArraysCore]] git-tree-sha1 = "36b3d696ce6366023a0ea192b4cd442268995a0d" @@ -970,6 +1077,7 @@ version = "1.4.2" [[deps.Statistics]] deps = ["LinearAlgebra", "SparseArrays"] uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" +version = "1.10.0" [[deps.StringManipulation]] deps = ["PrecompileTools"] @@ -977,10 +1085,15 @@ git-tree-sha1 = "a04cabe79c5f01f4d723cc6704070ada0b9d46d5" uuid = "892a3eda-7b42-436c-8928-eab12a02cf0e" version = "0.3.4" +[[deps.SuiteSparse_jll]] +deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] +uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" +version = "7.2.1+1" + [[deps.TOML]] deps = ["Dates"] uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -version = "1.0.0" +version = "1.0.3" [[deps.TableTraits]] deps = ["IteratorInterfaceExtensions"] @@ -997,7 +1110,7 @@ version = "1.11.1" [[deps.Tar]] deps = ["ArgTools", "SHA"] uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" -version = "1.10.1" +version = "1.10.0" [[deps.TensorCore]] deps = ["LinearAlgebra"] @@ -1016,10 +1129,13 @@ uuid = "1e6cf692-eddd-4d53-88a5-2d735e33781b" version = "1.101.1" [[deps.TranscodingStreams]] -deps = ["Random", "Test"] git-tree-sha1 = "3caa21522e7efac1ba21834a03734c57b4611c7e" uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" version = "0.10.4" +weakdeps = ["Random", "Test"] + + [deps.TranscodingStreams.extensions] + TestExt = ["Test", "Random"] [[deps.URIs]] git-tree-sha1 = "67db6cc7b3821e19ebe75791a9dd19c9b1188f2b" @@ -1034,10 +1150,15 @@ uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" [[deps.Unitful]] -deps = ["ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "Random"] +deps = ["Dates", "LinearAlgebra", "Random"] git-tree-sha1 = "3c793be6df9dd77a0cf49d80984ef9ff996948fa" uuid = "1986cc42-f94f-5a68-af5c-568840ba703d" version = "1.19.0" +weakdeps = ["ConstructionBase", "InverseFunctions"] + + [deps.Unitful.extensions] + ConstructionBaseUnitfulExt = "ConstructionBase" + InverseFunctionsUnitfulExt = "InverseFunctions" [[deps.WeakRefStrings]] deps = ["DataAPI", "InlineStrings", "Parsers"] @@ -1059,7 +1180,7 @@ version = "0.16.2" [[deps.Zlib_jll]] deps = ["Libdl"] uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.2.12+3" +version = "1.2.13+1" [[deps.Zstd_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -1086,9 +1207,9 @@ uuid = "477f73a3-ac25-53e9-8cc3-50b2fa2566f0" version = "1.1.2+0" [[deps.libblastrampoline_jll]] -deps = ["Artifacts", "Libdl", "OpenBLAS_jll"] +deps = ["Artifacts", "Libdl"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.1.1+0" +version = "5.8.0+1" [[deps.libevent_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "OpenSSL_jll"] @@ -1111,7 +1232,7 @@ version = "1.6.43+1" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.48.0+0" +version = "1.52.0+1" [[deps.oneTBB_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -1122,7 +1243,7 @@ version = "2021.9.0+0" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.4.0+0" +version = "17.4.0+2" [[deps.prrte_jll]] deps = ["Artifacts", "Hwloc_jll", "JLLWrappers", "Libdl", "PMIx_jll", "libevent_jll"] From dc732e297e8ad380c6a68a2f7dffee47b581f51f Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Tue, 23 Apr 2024 11:44:50 -0700 Subject: [PATCH 039/142] Revert "Update Manifest.toml" This reverts commit 787b300cee90bc523bb95d991ae6930004c36c01. --- julia_src/Manifest.toml | 197 ++++++++-------------------------------- 1 file changed, 38 insertions(+), 159 deletions(-) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index 6d912780c..366432e49 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -1,6 +1,6 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.10.2" +julia_version = "1.8.5" manifest_format = "2.0" project_hash = "b3c6037c53375dada9e36c23f668bcd0efac8f34" @@ -11,46 +11,22 @@ uuid = "ae81ac8f-d209-56e5-92de-9978fef736f9" version = "0.1.3+0" [[deps.AbstractFFTs]] -deps = ["LinearAlgebra"] +deps = ["ChainRulesCore", "LinearAlgebra", "Test"] git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef" uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" version = "1.5.0" -weakdeps = ["ChainRulesCore", "Test"] - - [deps.AbstractFFTs.extensions] - AbstractFFTsChainRulesCoreExt = "ChainRulesCore" - AbstractFFTsTestExt = "Test" [[deps.Accessors]] -deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "MacroTools", "Markdown", "Test"] +deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "MacroTools", "Markdown", "Requires", "Test"] git-tree-sha1 = "c0d491ef0b135fd7d63cbc6404286bc633329425" uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" version = "0.1.36" - [deps.Accessors.extensions] - AccessorsAxisKeysExt = "AxisKeys" - AccessorsIntervalSetsExt = "IntervalSets" - AccessorsStaticArraysExt = "StaticArrays" - AccessorsStructArraysExt = "StructArrays" - AccessorsUnitfulExt = "Unitful" - - [deps.Accessors.weakdeps] - AxisKeys = "94b1ba4f-4ee9-5380-92f1-94cde586c3c5" - IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" - Requires = "ae029012-a4dd-5104-9daa-d747884805df" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" - Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" - [[deps.Adapt]] deps = ["LinearAlgebra", "Requires"] git-tree-sha1 = "cea4ac3f5b4bc4b3000aa55afb6e5626518948fa" uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" version = "4.0.3" -weakdeps = ["StaticArrays"] - - [deps.Adapt.extensions] - AdaptStaticArraysExt = "StaticArrays" [[deps.ArchGDAL]] deps = ["CEnum", "ColorTypes", "Dates", "DiskArrays", "Extents", "GDAL", "GDAL_jll", "GeoFormatTypes", "GeoInterface", "GeoInterfaceRecipes", "ImageCore", "Tables"] @@ -133,24 +109,16 @@ uuid = "3830e938-1dd0-5f3e-8b8e-b3ee43226782" version = "0.6000.600+0" [[deps.ChainRulesCore]] -deps = ["Compat", "LinearAlgebra"] +deps = ["Compat", "LinearAlgebra", "SparseArrays"] git-tree-sha1 = "575cd02e080939a33b6df6c5853d14924c08e35b" uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" version = "1.23.0" -weakdeps = ["SparseArrays"] - - [deps.ChainRulesCore.extensions] - ChainRulesCoreSparseArraysExt = "SparseArrays" [[deps.ChangesOfVariables]] -deps = ["LinearAlgebra", "Test"] +deps = ["InverseFunctions", "LinearAlgebra", "Test"] git-tree-sha1 = "2fba81a302a7be671aefe194f0525ef231104e7f" uuid = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" version = "0.1.8" -weakdeps = ["InverseFunctions"] - - [deps.ChangesOfVariables.extensions] - ChangesOfVariablesInverseFunctionsExt = "InverseFunctions" [[deps.Clp_jll]] deps = ["Artifacts", "CoinUtils_jll", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "METIS_jll", "MUMPS_seq_jll", "OpenBLAS32_jll", "Osi_jll", "Pkg"] @@ -206,28 +174,20 @@ uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" version = "0.3.0" [[deps.Compat]] -deps = ["TOML", "UUIDs"] +deps = ["Dates", "LinearAlgebra", "TOML", "UUIDs"] git-tree-sha1 = "c955881e3c981181362ae4088b35995446298b80" uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" version = "4.14.0" -weakdeps = ["Dates", "LinearAlgebra"] - - [deps.Compat.extensions] - CompatLinearAlgebraExt = "LinearAlgebra" [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.1.0+0" +version = "1.0.1+0" [[deps.CompositionsBase]] git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" version = "0.1.2" -weakdeps = ["InverseFunctions"] - - [deps.CompositionsBase.extensions] - CompositionsBaseInverseFunctionsExt = "InverseFunctions" [[deps.ConcurrentUtilities]] deps = ["Serialization", "Sockets"] @@ -240,11 +200,6 @@ deps = ["LinearAlgebra"] git-tree-sha1 = "c53fc348ca4d40d7b371e71fd52251839080cbc9" uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" version = "1.5.4" -weakdeps = ["IntervalSets", "StaticArrays"] - - [deps.ConstructionBase.extensions] - ConstructionBaseIntervalSetsExt = "IntervalSets" - ConstructionBaseStaticArraysExt = "StaticArrays" [[deps.CoolProp]] deps = ["CoolProp_jll", "Markdown", "Unitful"] @@ -291,9 +246,7 @@ uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" [[deps.DelimitedFiles]] deps = ["Mmap"] -git-tree-sha1 = "9e2f36d3c96a820c678f2f1f1782582fcf685bae" uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" -version = "1.9.1" [[deps.DiffResults]] deps = ["StaticArraysCore"] @@ -369,14 +322,10 @@ uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" version = "0.8.4" [[deps.ForwardDiff]] -deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] +deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions", "StaticArrays"] git-tree-sha1 = "cf0fe81336da9fb90944683b8c41984b08793dad" uuid = "f6369f11-7733-5829-9624-2563aa707210" version = "0.10.36" -weakdeps = ["StaticArrays"] - - [deps.ForwardDiff.extensions] - ForwardDiffStaticArraysExt = "StaticArrays" [[deps.Future]] deps = ["Random"] @@ -403,7 +352,7 @@ version = "3.11.2+0" [[deps.GMP_jll]] deps = ["Artifacts", "Libdl"] uuid = "781609d7-10c4-51f6-84f2-b8444358ff6d" -version = "6.2.1+6" +version = "6.2.1+2" [[deps.GeoFormatTypes]] git-tree-sha1 = "59107c179a586f0fe667024c5eb7033e81333271" @@ -447,12 +396,6 @@ git-tree-sha1 = "26407bd1c60129062cec9da63dc7d08251544d53" uuid = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f" version = "0.17.1" - [deps.HDF5.extensions] - MPIExt = "MPI" - - [deps.HDF5.weakdeps] - MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" - [[deps.HDF5_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LLVMOpenMP_jll", "LazyArtifacts", "LibCURL_jll", "Libdl", "MPICH_jll", "MPIPreferences", "MPItrampoline_jll", "MicrosoftMPI_jll", "OpenMPI_jll", "OpenSSL_jll", "TOML", "Zlib_jll", "libaec_jll"] git-tree-sha1 = "38c8874692d48d5440d5752d6c74b0c6b0b60739" @@ -500,15 +443,10 @@ deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" [[deps.IntervalSets]] +deps = ["Random", "RecipesBase", "Statistics"] git-tree-sha1 = "dba9ddf07f77f60450fe5d2e2beb9854d9a49bd0" uuid = "8197267c-284f-5f27-9208-e0e47529a953" version = "0.7.10" -weakdeps = ["Random", "RecipesBase", "Statistics"] - - [deps.IntervalSets.extensions] - IntervalSetsRandomExt = "Random" - IntervalSetsRecipesBaseExt = "RecipesBase" - IntervalSetsStatisticsExt = "Statistics" [[deps.InverseFunctions]] deps = ["Test"] @@ -572,12 +510,6 @@ git-tree-sha1 = "cd161958e8b47f9696a6b03f563afb4e5fe8f703" uuid = "4076af6c-e467-56ae-b986-b466b2749572" version = "1.17.0" - [deps.JuMP.extensions] - JuMPDimensionalDataExt = "DimensionalData" - - [deps.JuMP.weakdeps] - DimensionalData = "0703355e-b756-11e9-17c0-8b28908087d0" - [[deps.LERC_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "bf36f528eec6634efc60d7ec062008f171071434" @@ -591,13 +523,10 @@ uuid = "1d63c593-3942-5779-bab2-d838dc0a180e" version = "15.0.7+0" [[deps.LRUCache]] +deps = ["Serialization"] git-tree-sha1 = "b3cc6698599b10e652832c2f23db3cab99d51b59" uuid = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637" version = "1.6.1" -weakdeps = ["Serialization"] - - [deps.LRUCache.extensions] - SerializationExt = ["Serialization"] [[deps.LaTeXStrings]] git-tree-sha1 = "50901ebc375ed41dbf8058da26f9de442febbbec" @@ -611,26 +540,21 @@ uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" [[deps.LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -version = "0.6.4" +version = "0.6.3" [[deps.LibCURL_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "8.4.0+0" +version = "7.84.0+0" [[deps.LibGit2]] -deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] +deps = ["Base64", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" -[[deps.LibGit2_jll]] -deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] -uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" -version = "1.6.4+0" - [[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" -version = "1.11.0+1" +version = "1.10.2+0" [[deps.Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" @@ -648,7 +572,7 @@ uuid = "bf674bac-ffe4-48d3-9f32-72124ffa9ede" version = "0.1.4" [[deps.LinearAlgebra]] -deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] +deps = ["Libdl", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" [[deps.LittleCMS_jll]] @@ -658,16 +582,10 @@ uuid = "d3a379c0-f9a3-5b72-a4c0-6bf4d2e8af0f" version = "2.12.0+0" [[deps.LogExpFunctions]] -deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] +deps = ["ChainRulesCore", "ChangesOfVariables", "DocStringExtensions", "InverseFunctions", "IrrationalConstants", "LinearAlgebra"] git-tree-sha1 = "18144f3e9cbe9b15b070288eef858f71b291ce37" uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" version = "0.3.27" -weakdeps = ["ChainRulesCore", "ChangesOfVariables", "InverseFunctions"] - - [deps.LogExpFunctions.extensions] - LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" - LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" - LogExpFunctionsInverseFunctionsExt = "InverseFunctions" [[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" @@ -744,7 +662,7 @@ version = "1.1.9" [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.2+1" +version = "2.28.0+0" [[deps.MicrosoftMPI_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -769,7 +687,7 @@ version = "0.3.4" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2023.1.10" +version = "2022.2.1" [[deps.MutableArithmetics]] deps = ["LinearAlgebra", "SparseArrays", "Test"] @@ -794,13 +712,10 @@ uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" version = "1.2.0" [[deps.OffsetArrays]] +deps = ["Adapt"] git-tree-sha1 = "6a731f2b5c03157418a20c12195eb4b74c8f8621" uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" version = "1.13.0" -weakdeps = ["Adapt"] - - [deps.OffsetArrays.extensions] - OffsetArraysAdaptExt = "Adapt" [[deps.OpenBLAS32_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] @@ -811,7 +726,7 @@ version = "0.3.17+0" [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.23+4" +version = "0.3.20+0" [[deps.OpenJpeg_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libtiff_jll", "LittleCMS_jll", "Pkg", "libpng_jll"] @@ -822,7 +737,7 @@ version = "2.4.0+0" [[deps.OpenLibm_jll]] deps = ["Artifacts", "Libdl"] uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.1+2" +version = "0.8.1+0" [[deps.OpenMPI_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Hwloc_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "PMIx_jll", "TOML", "Zlib_jll", "libevent_jll", "prrte_jll"] @@ -884,9 +799,9 @@ uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" version = "2.8.1" [[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.10.0" +version = "1.8.0" [[deps.PooledArrays]] deps = ["DataAPI", "Future"] @@ -926,12 +841,12 @@ uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.REopt]] deps = ["ArchGDAL", "CSV", "CoolProp", "DataFrames", "Dates", "DelimitedFiles", "HTTP", "JLD", "JSON", "JuMP", "LinDistFlow", "LinearAlgebra", "Logging", "MathOptInterface", "Requires", "Roots", "Statistics", "TestEnv"] -git-tree-sha1 = "d2bbcbb8344f19ed87ee8cb6a196d4ed8415255b" +git-tree-sha1 = "b8e663a9f06eb6a1085ff7de981df2a6246b2b91" uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6" version = "0.45.0" [[deps.Random]] -deps = ["SHA"] +deps = ["SHA", "Serialization"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" [[deps.RangeArrays]] @@ -968,18 +883,6 @@ git-tree-sha1 = "6f6481a44ca53367383f15415dc27ab0c7422731" uuid = "f2b01f46-fcfa-551c-844a-d8ac1e96c665" version = "2.1.4" - [deps.Roots.extensions] - RootsForwardDiffExt = "ForwardDiff" - RootsIntervalRootFindingExt = "IntervalRootFinding" - RootsSymPyExt = "SymPy" - RootsSymPyPythonCallExt = "SymPyPythonCall" - - [deps.Roots.weakdeps] - ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" - IntervalRootFinding = "d2bf35a9-74e0-55ec-b149-d360ff49b807" - SymPy = "24249f21-da20-56a4-8eb1-6a02cf4ae2e6" - SymPyPythonCall = "bc8888f7-b21e-4b7c-a06a-5d9c9496438c" - [[deps.SCIP]] deps = ["Ipopt_jll", "Libdl", "LinearAlgebra", "MathOptInterface", "SCIP_PaPILO_jll", "SCIP_jll"] git-tree-sha1 = "ac0512c46cd91744f62463514f2c581025ea5b93" @@ -1038,19 +941,14 @@ uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" version = "1.2.1" [[deps.SparseArrays]] -deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] +deps = ["LinearAlgebra", "Random"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -version = "1.10.0" [[deps.SpecialFunctions]] -deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +deps = ["ChainRulesCore", "IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] git-tree-sha1 = "e2cfc4012a19088254b3950b85c3c1d8882d864d" uuid = "276daf66-3868-5448-9aa4-cd146d93841b" version = "2.3.1" -weakdeps = ["ChainRulesCore"] - - [deps.SpecialFunctions.extensions] - SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" [[deps.StackViews]] deps = ["OffsetArrays"] @@ -1059,15 +957,10 @@ uuid = "cae243ae-269e-4f55-b966-ac2d0dc13c15" version = "0.1.1" [[deps.StaticArrays]] -deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] +deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore", "Statistics"] git-tree-sha1 = "bf074c045d3d5ffd956fa0a461da38a44685d6b2" uuid = "90137ffa-7385-5640-81b9-e52037218182" version = "1.9.3" -weakdeps = ["ChainRulesCore", "Statistics"] - - [deps.StaticArrays.extensions] - StaticArraysChainRulesCoreExt = "ChainRulesCore" - StaticArraysStatisticsExt = "Statistics" [[deps.StaticArraysCore]] git-tree-sha1 = "36b3d696ce6366023a0ea192b4cd442268995a0d" @@ -1077,7 +970,6 @@ version = "1.4.2" [[deps.Statistics]] deps = ["LinearAlgebra", "SparseArrays"] uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.10.0" [[deps.StringManipulation]] deps = ["PrecompileTools"] @@ -1085,15 +977,10 @@ git-tree-sha1 = "a04cabe79c5f01f4d723cc6704070ada0b9d46d5" uuid = "892a3eda-7b42-436c-8928-eab12a02cf0e" version = "0.3.4" -[[deps.SuiteSparse_jll]] -deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] -uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "7.2.1+1" - [[deps.TOML]] deps = ["Dates"] uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -version = "1.0.3" +version = "1.0.0" [[deps.TableTraits]] deps = ["IteratorInterfaceExtensions"] @@ -1110,7 +997,7 @@ version = "1.11.1" [[deps.Tar]] deps = ["ArgTools", "SHA"] uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" -version = "1.10.0" +version = "1.10.1" [[deps.TensorCore]] deps = ["LinearAlgebra"] @@ -1129,13 +1016,10 @@ uuid = "1e6cf692-eddd-4d53-88a5-2d735e33781b" version = "1.101.1" [[deps.TranscodingStreams]] +deps = ["Random", "Test"] git-tree-sha1 = "3caa21522e7efac1ba21834a03734c57b4611c7e" uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" version = "0.10.4" -weakdeps = ["Random", "Test"] - - [deps.TranscodingStreams.extensions] - TestExt = ["Test", "Random"] [[deps.URIs]] git-tree-sha1 = "67db6cc7b3821e19ebe75791a9dd19c9b1188f2b" @@ -1150,15 +1034,10 @@ uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" [[deps.Unitful]] -deps = ["Dates", "LinearAlgebra", "Random"] +deps = ["ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "Random"] git-tree-sha1 = "3c793be6df9dd77a0cf49d80984ef9ff996948fa" uuid = "1986cc42-f94f-5a68-af5c-568840ba703d" version = "1.19.0" -weakdeps = ["ConstructionBase", "InverseFunctions"] - - [deps.Unitful.extensions] - ConstructionBaseUnitfulExt = "ConstructionBase" - InverseFunctionsUnitfulExt = "InverseFunctions" [[deps.WeakRefStrings]] deps = ["DataAPI", "InlineStrings", "Parsers"] @@ -1180,7 +1059,7 @@ version = "0.16.2" [[deps.Zlib_jll]] deps = ["Libdl"] uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.2.13+1" +version = "1.2.12+3" [[deps.Zstd_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -1207,9 +1086,9 @@ uuid = "477f73a3-ac25-53e9-8cc3-50b2fa2566f0" version = "1.1.2+0" [[deps.libblastrampoline_jll]] -deps = ["Artifacts", "Libdl"] +deps = ["Artifacts", "Libdl", "OpenBLAS_jll"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.8.0+1" +version = "5.1.1+0" [[deps.libevent_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "OpenSSL_jll"] @@ -1232,7 +1111,7 @@ version = "1.6.43+1" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.52.0+1" +version = "1.48.0+0" [[deps.oneTBB_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -1243,7 +1122,7 @@ version = "2021.9.0+0" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.4.0+2" +version = "17.4.0+0" [[deps.prrte_jll]] deps = ["Artifacts", "Hwloc_jll", "JLLWrappers", "Libdl", "PMIx_jll", "libevent_jll"] From 264b7e37e096f80e77227eaccfe1fbfbff3dad97 Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Tue, 23 Apr 2024 14:52:53 -0700 Subject: [PATCH 040/142] Delete Manifest.toml --- julia_src/Manifest.toml | 1131 --------------------------------------- 1 file changed, 1131 deletions(-) delete mode 100644 julia_src/Manifest.toml diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml deleted file mode 100644 index 366432e49..000000000 --- a/julia_src/Manifest.toml +++ /dev/null @@ -1,1131 +0,0 @@ -# This file is machine-generated - editing it directly is not advised - -julia_version = "1.8.5" -manifest_format = "2.0" -project_hash = "b3c6037c53375dada9e36c23f668bcd0efac8f34" - -[[deps.ASL_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "6252039f98492252f9e47c312c8ffda0e3b9e78d" -uuid = "ae81ac8f-d209-56e5-92de-9978fef736f9" -version = "0.1.3+0" - -[[deps.AbstractFFTs]] -deps = ["ChainRulesCore", "LinearAlgebra", "Test"] -git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef" -uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" -version = "1.5.0" - -[[deps.Accessors]] -deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "MacroTools", "Markdown", "Requires", "Test"] -git-tree-sha1 = "c0d491ef0b135fd7d63cbc6404286bc633329425" -uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" -version = "0.1.36" - -[[deps.Adapt]] -deps = ["LinearAlgebra", "Requires"] -git-tree-sha1 = "cea4ac3f5b4bc4b3000aa55afb6e5626518948fa" -uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" -version = "4.0.3" - -[[deps.ArchGDAL]] -deps = ["CEnum", "ColorTypes", "Dates", "DiskArrays", "Extents", "GDAL", "GDAL_jll", "GeoFormatTypes", "GeoInterface", "GeoInterfaceRecipes", "ImageCore", "Tables"] -git-tree-sha1 = "edfaf8e5f8d57cabcd98399b0b727bce22bb4d9c" -uuid = "c9ce4bd3-c3d5-55b8-8973-c0e20141b8c3" -version = "0.9.4" - -[[deps.ArgTools]] -uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" -version = "1.1.1" - -[[deps.Artifacts]] -uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" - -[[deps.AxisArrays]] -deps = ["Dates", "IntervalSets", "IterTools", "RangeArrays"] -git-tree-sha1 = "16351be62963a67ac4083f748fdb3cca58bfd52f" -uuid = "39de3d68-74b9-583c-8d2d-e117c070f3a9" -version = "0.4.7" - -[[deps.Base64]] -uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" - -[[deps.BenchmarkTools]] -deps = ["JSON", "Logging", "Printf", "Profile", "Statistics", "UUIDs"] -git-tree-sha1 = "f1dff6729bc61f4d49e140da1af55dcd1ac97b2f" -uuid = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" -version = "1.5.0" - -[[deps.BitFlags]] -git-tree-sha1 = "2dc09997850d68179b69dafb58ae806167a32b1b" -uuid = "d1d4a3ce-64b1-5f1a-9ba4-7e7e69966f35" -version = "0.1.8" - -[[deps.Blosc]] -deps = ["Blosc_jll"] -git-tree-sha1 = "310b77648d38c223d947ff3f50f511d08690b8d5" -uuid = "a74b3585-a348-5f62-a45c-50e91977d574" -version = "0.7.3" - -[[deps.Blosc_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Lz4_jll", "Zlib_jll", "Zstd_jll"] -git-tree-sha1 = "19b98ee7e3db3b4eff74c5c9c72bf32144e24f10" -uuid = "0b7ba130-8d10-5ba8-a3d6-c5182647fed9" -version = "1.21.5+0" - -[[deps.Bzip2_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "9e2a6b69137e6969bab0152632dcb3bc108c8bdd" -uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0" -version = "1.0.8+1" - -[[deps.CEnum]] -git-tree-sha1 = "eb4cb44a499229b3b8426dcfb5dd85333951ff90" -uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82" -version = "0.4.2" - -[[deps.CSV]] -deps = ["CodecZlib", "Dates", "FilePathsBase", "InlineStrings", "Mmap", "Parsers", "PooledArrays", "PrecompileTools", "SentinelArrays", "Tables", "Unicode", "WeakRefStrings", "WorkerUtilities"] -git-tree-sha1 = "a44910ceb69b0d44fe262dd451ab11ead3ed0be8" -uuid = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" -version = "0.10.13" - -[[deps.Cbc]] -deps = ["Cbc_jll", "MathOptInterface", "SparseArrays"] -git-tree-sha1 = "53748bbb94ce592cfd5394528abc822f774f0d38" -uuid = "9961bab8-2fa3-5c5a-9d89-47fab24efd76" -version = "1.2.0" - -[[deps.Cbc_jll]] -deps = ["ASL_jll", "Artifacts", "Cgl_jll", "Clp_jll", "CoinUtils_jll", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "OpenBLAS32_jll", "Osi_jll", "Pkg"] -git-tree-sha1 = "1d12b6aa435f30bd5619e0144f4c815c854a91b6" -uuid = "38041ee0-ae04-5750-a4d2-bb4d0d83d27d" -version = "200.1000.800+0" - -[[deps.Cgl_jll]] -deps = ["Artifacts", "Clp_jll", "CoinUtils_jll", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Osi_jll", "Pkg"] -git-tree-sha1 = "3e53a23c0bf96e8c0115777e351a04d5b0f52529" -uuid = "3830e938-1dd0-5f3e-8b8e-b3ee43226782" -version = "0.6000.600+0" - -[[deps.ChainRulesCore]] -deps = ["Compat", "LinearAlgebra", "SparseArrays"] -git-tree-sha1 = "575cd02e080939a33b6df6c5853d14924c08e35b" -uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" -version = "1.23.0" - -[[deps.ChangesOfVariables]] -deps = ["InverseFunctions", "LinearAlgebra", "Test"] -git-tree-sha1 = "2fba81a302a7be671aefe194f0525ef231104e7f" -uuid = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" -version = "0.1.8" - -[[deps.Clp_jll]] -deps = ["Artifacts", "CoinUtils_jll", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "METIS_jll", "MUMPS_seq_jll", "OpenBLAS32_jll", "Osi_jll", "Pkg"] -git-tree-sha1 = "51861cd16c6c4e0018ad401b2afb36e51c7d4bcd" -uuid = "06985876-5285-5a41-9fcb-8948a742cc53" -version = "100.1700.700+1" - -[[deps.CodecBzip2]] -deps = ["Bzip2_jll", "Libdl", "TranscodingStreams"] -git-tree-sha1 = "9b1ca1aa6ce3f71b3d1840c538a8210a043625eb" -uuid = "523fee87-0ab8-5b00-afb7-3ecf72e48cfd" -version = "0.8.2" - -[[deps.CodecZlib]] -deps = ["TranscodingStreams", "Zlib_jll"] -git-tree-sha1 = "59939d8a997469ee05c4b4944560a820f9ba0d73" -uuid = "944b1d66-785c-5afd-91f1-9de20f533193" -version = "0.7.4" - -[[deps.CoinUtils_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "OpenBLAS32_jll", "Pkg"] -git-tree-sha1 = "5e9852361e31af66143665e780535df262fa3407" -uuid = "be027038-0da8-5614-b30d-e42594cb92df" -version = "200.1100.600+0" - -[[deps.ColorTypes]] -deps = ["FixedPointNumbers", "Random"] -git-tree-sha1 = "eb7f0f8307f71fac7c606984ea5fb2817275d6e4" -uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" -version = "0.11.4" - -[[deps.ColorVectorSpace]] -deps = ["ColorTypes", "FixedPointNumbers", "LinearAlgebra", "SpecialFunctions", "Statistics", "TensorCore"] -git-tree-sha1 = "600cc5508d66b78aae350f7accdb58763ac18589" -uuid = "c3611d14-8923-5661-9e6a-0046d554d3a4" -version = "0.9.10" - -[[deps.Colors]] -deps = ["ColorTypes", "FixedPointNumbers", "Reexport"] -git-tree-sha1 = "fc08e5930ee9a4e03f84bfb5211cb54e7769758a" -uuid = "5ae59095-9a9b-59fe-a467-6f913c188581" -version = "0.12.10" - -[[deps.CommonSolve]] -git-tree-sha1 = "0eee5eb66b1cf62cd6ad1b460238e60e4b09400c" -uuid = "38540f10-b2f7-11e9-35d8-d573e4eb0ff2" -version = "0.2.4" - -[[deps.CommonSubexpressions]] -deps = ["MacroTools", "Test"] -git-tree-sha1 = "7b8a93dba8af7e3b42fecabf646260105ac373f7" -uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" -version = "0.3.0" - -[[deps.Compat]] -deps = ["Dates", "LinearAlgebra", "TOML", "UUIDs"] -git-tree-sha1 = "c955881e3c981181362ae4088b35995446298b80" -uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.14.0" - -[[deps.CompilerSupportLibraries_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.0.1+0" - -[[deps.CompositionsBase]] -git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" -uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" -version = "0.1.2" - -[[deps.ConcurrentUtilities]] -deps = ["Serialization", "Sockets"] -git-tree-sha1 = "6cbbd4d241d7e6579ab354737f4dd95ca43946e1" -uuid = "f0e56b4a-5159-44fe-b623-3e5288b988bb" -version = "2.4.1" - -[[deps.ConstructionBase]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "c53fc348ca4d40d7b371e71fd52251839080cbc9" -uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" -version = "1.5.4" - -[[deps.CoolProp]] -deps = ["CoolProp_jll", "Markdown", "Unitful"] -git-tree-sha1 = "94062163b5656b1351f7f7a784341b8fe13c1ca1" -uuid = "e084ae63-2819-5025-826e-f8e611a84251" -version = "0.1.0" - -[[deps.CoolProp_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "f0f70a17d132d2ab5bf2b61993db36ac1099f6c7" -uuid = "3351c21f-4feb-5f29-afb9-f4fcb0e27549" -version = "6.6.0+0" - -[[deps.Crayons]] -git-tree-sha1 = "249fe38abf76d48563e2f4556bebd215aa317e15" -uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f" -version = "4.1.1" - -[[deps.DataAPI]] -git-tree-sha1 = "abe83f3a2f1b857aac70ef8b269080af17764bbe" -uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" -version = "1.16.0" - -[[deps.DataFrames]] -deps = ["Compat", "DataAPI", "DataStructures", "Future", "InlineStrings", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "Markdown", "Missings", "PooledArrays", "PrecompileTools", "PrettyTables", "Printf", "REPL", "Random", "Reexport", "SentinelArrays", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"] -git-tree-sha1 = "04c738083f29f86e62c8afc341f0967d8717bdb8" -uuid = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" -version = "1.6.1" - -[[deps.DataStructures]] -deps = ["Compat", "InteractiveUtils", "OrderedCollections"] -git-tree-sha1 = "0f4b5d62a88d8f59003e43c25a8a90de9eb76317" -uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" -version = "0.18.18" - -[[deps.DataValueInterfaces]] -git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" -uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" -version = "1.0.0" - -[[deps.Dates]] -deps = ["Printf"] -uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" - -[[deps.DelimitedFiles]] -deps = ["Mmap"] -uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" - -[[deps.DiffResults]] -deps = ["StaticArraysCore"] -git-tree-sha1 = "782dd5f4561f5d267313f23853baaaa4c52ea621" -uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" -version = "1.1.0" - -[[deps.DiffRules]] -deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"] -git-tree-sha1 = "23163d55f885173722d1e4cf0f6110cdbaf7e272" -uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" -version = "1.15.1" - -[[deps.DiskArrays]] -deps = ["LRUCache", "OffsetArrays"] -git-tree-sha1 = "ef25c513cad08d7ebbed158c91768ae32f308336" -uuid = "3c3547ce-8d99-4f5e-a174-61eb10b00ae3" -version = "0.3.23" - -[[deps.DocStringExtensions]] -deps = ["LibGit2"] -git-tree-sha1 = "2fb1e02f2b635d0845df5d7c167fec4dd739b00d" -uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" -version = "0.9.3" - -[[deps.DotEnv]] -deps = ["PrecompileTools"] -git-tree-sha1 = "92e88cb68a5b10545234f46dfaeb2fa8a8a50c45" -uuid = "4dc1fcf4-5e3b-5448-94ab-0c38ec0385c1" -version = "1.0.0" - -[[deps.Downloads]] -deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] -uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" -version = "1.6.0" - -[[deps.ExceptionUnwrapping]] -deps = ["Test"] -git-tree-sha1 = "dcb08a0d93ec0b1cdc4af184b26b591e9695423a" -uuid = "460bff9d-24e4-43bc-9d9f-a8973cb893f4" -version = "0.1.10" - -[[deps.Expat_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "4558ab818dcceaab612d1bb8c19cee87eda2b83c" -uuid = "2e619515-83b5-522b-bb60-26c02a35a201" -version = "2.5.0+0" - -[[deps.Extents]] -git-tree-sha1 = "2140cd04483da90b2da7f99b2add0750504fc39c" -uuid = "411431e0-e8b7-467b-b5e0-f676ba4f2910" -version = "0.1.2" - -[[deps.FileIO]] -deps = ["Pkg", "Requires", "UUIDs"] -git-tree-sha1 = "c5c28c245101bd59154f649e19b038d15901b5dc" -uuid = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" -version = "1.16.2" - -[[deps.FilePathsBase]] -deps = ["Compat", "Dates", "Mmap", "Printf", "Test", "UUIDs"] -git-tree-sha1 = "9f00e42f8d99fdde64d40c8ea5d14269a2e2c1aa" -uuid = "48062228-2e41-5def-b9a4-89aafe57970f" -version = "0.9.21" - -[[deps.FileWatching]] -uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" - -[[deps.FixedPointNumbers]] -deps = ["Statistics"] -git-tree-sha1 = "335bfdceacc84c5cdf16aadc768aa5ddfc5383cc" -uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" -version = "0.8.4" - -[[deps.ForwardDiff]] -deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions", "StaticArrays"] -git-tree-sha1 = "cf0fe81336da9fb90944683b8c41984b08793dad" -uuid = "f6369f11-7733-5829-9624-2563aa707210" -version = "0.10.36" - -[[deps.Future]] -deps = ["Random"] -uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" - -[[deps.GDAL]] -deps = ["CEnum", "GDAL_jll", "NetworkOptions", "PROJ_jll"] -git-tree-sha1 = "9ce70502472a9f23f8889f0f9e2be8451413fe7b" -uuid = "add2ef01-049f-52c4-9ee2-e494f65e021a" -version = "1.4.0" - -[[deps.GDAL_jll]] -deps = ["Artifacts", "Expat_jll", "GEOS_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "Libtiff_jll", "OpenJpeg_jll", "PROJ_jll", "Pkg", "SQLite_jll", "Zlib_jll", "Zstd_jll", "libgeotiff_jll"] -git-tree-sha1 = "e9604365601f34d669dac3609fa4870803bdea9b" -uuid = "a7073274-a066-55f0-b90d-d619367d196c" -version = "300.500.101+0" - -[[deps.GEOS_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "818ab247de98d8848a022c7be084b1283d912326" -uuid = "d604d12d-fa86-5845-992e-78dc15976526" -version = "3.11.2+0" - -[[deps.GMP_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "781609d7-10c4-51f6-84f2-b8444358ff6d" -version = "6.2.1+2" - -[[deps.GeoFormatTypes]] -git-tree-sha1 = "59107c179a586f0fe667024c5eb7033e81333271" -uuid = "68eda718-8dee-11e9-39e7-89f7f65f511f" -version = "0.4.2" - -[[deps.GeoInterface]] -deps = ["Extents"] -git-tree-sha1 = "d4f85701f569584f2cff7ba67a137d03f0cfb7d0" -uuid = "cf35fbd7-0cd7-5166-be24-54bfbe79505f" -version = "1.3.3" - -[[deps.GeoInterfaceRecipes]] -deps = ["GeoInterface", "RecipesBase"] -git-tree-sha1 = "fb1156076f24f1dfee45b3feadb31d05730a49ac" -uuid = "0329782f-3d07-4b52-b9f6-d3137cf03c7a" -version = "1.0.2" - -[[deps.GhpGhx]] -git-tree-sha1 = "bddcbcddc9a4ae7ae4f1ea7d4d8ccf38507d4071" -repo-rev = "main" -repo-url = "https://github.com/NREL/GhpGhx.jl.git" -uuid = "7ce85f02-24a8-4d69-a3f0-14b5daa7d30c" -version = "0.1.0" - -[[deps.Graphics]] -deps = ["Colors", "LinearAlgebra", "NaNMath"] -git-tree-sha1 = "d61890399bc535850c4bf08e4e0d3a7ad0f21cbd" -uuid = "a2bd30eb-e257-5431-a919-1863eab51364" -version = "1.1.2" - -[[deps.H5Zblosc]] -deps = ["Blosc", "HDF5"] -git-tree-sha1 = "d778420e524bcf56066e8c63c7aa315ae7269da2" -uuid = "c8ec2601-a99c-407f-b158-e79c03c2f5f7" -version = "0.1.2" - -[[deps.HDF5]] -deps = ["Compat", "HDF5_jll", "Libdl", "MPIPreferences", "Mmap", "Preferences", "Printf", "Random", "Requires", "UUIDs"] -git-tree-sha1 = "26407bd1c60129062cec9da63dc7d08251544d53" -uuid = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f" -version = "0.17.1" - -[[deps.HDF5_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LLVMOpenMP_jll", "LazyArtifacts", "LibCURL_jll", "Libdl", "MPICH_jll", "MPIPreferences", "MPItrampoline_jll", "MicrosoftMPI_jll", "OpenMPI_jll", "OpenSSL_jll", "TOML", "Zlib_jll", "libaec_jll"] -git-tree-sha1 = "38c8874692d48d5440d5752d6c74b0c6b0b60739" -uuid = "0234f1f7-429e-5d53-9886-15a909be8d59" -version = "1.14.2+1" - -[[deps.HTTP]] -deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "ExceptionUnwrapping", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] -git-tree-sha1 = "abbbb9ec3afd783a7cbd82ef01dcd088ea051398" -uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" -version = "1.10.1" - -[[deps.HiGHS]] -deps = ["HiGHS_jll", "MathOptInterface", "PrecompileTools", "SparseArrays"] -git-tree-sha1 = "fce13308f09771b160232903cad57be39a8a0ebb" -uuid = "87dc4568-4c63-4d18-b0c0-bb2238e4078b" -version = "1.7.5" - -[[deps.HiGHS_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Zlib_jll"] -git-tree-sha1 = "f596ee3668df8587158bcaef1ae47bf75bc0fe39" -uuid = "8fd58aa0-07eb-5a78-9b36-339c94fd15ea" -version = "1.6.0+1" - -[[deps.Hwloc_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "ca0f6bf568b4bfc807e7537f081c81e35ceca114" -uuid = "e33a78d0-f292-5ffc-b300-72abe9b543c8" -version = "2.10.0+0" - -[[deps.ImageCore]] -deps = ["AbstractFFTs", "ColorVectorSpace", "Colors", "FixedPointNumbers", "Graphics", "MappedArrays", "MosaicViews", "OffsetArrays", "PaddedViews", "Reexport"] -git-tree-sha1 = "acf614720ef026d38400b3817614c45882d75500" -uuid = "a09fc81d-aa75-5fe9-8630-4744c3626534" -version = "0.9.4" - -[[deps.InlineStrings]] -deps = ["Parsers"] -git-tree-sha1 = "9cc2baf75c6d09f9da536ddf58eb2f29dedaf461" -uuid = "842dd82b-1e85-43dc-bf29-5d0ee9dffc48" -version = "1.4.0" - -[[deps.InteractiveUtils]] -deps = ["Markdown"] -uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" - -[[deps.IntervalSets]] -deps = ["Random", "RecipesBase", "Statistics"] -git-tree-sha1 = "dba9ddf07f77f60450fe5d2e2beb9854d9a49bd0" -uuid = "8197267c-284f-5f27-9208-e0e47529a953" -version = "0.7.10" - -[[deps.InverseFunctions]] -deps = ["Test"] -git-tree-sha1 = "68772f49f54b479fa88ace904f6127f0a3bb2e46" -uuid = "3587e190-3f89-42d0-90ee-14403ec27112" -version = "0.1.12" - -[[deps.InvertedIndices]] -git-tree-sha1 = "0dc7b50b8d436461be01300fd8cd45aa0274b038" -uuid = "41ab1584-1d38-5bbf-9106-f11c6c58b48f" -version = "1.3.0" - -[[deps.Ipopt_jll]] -deps = ["ASL_jll", "Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "MUMPS_seq_jll", "OpenBLAS32_jll", "libblastrampoline_jll"] -git-tree-sha1 = "0d3939fb672b84082f3ee930b51de03df935be31" -uuid = "9cc047cb-c261-5740-88fc-0cf96f7bdcc7" -version = "300.1400.1200+0" - -[[deps.IrrationalConstants]] -git-tree-sha1 = "630b497eafcc20001bba38a4651b327dcfc491d2" -uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" -version = "0.2.2" - -[[deps.IterTools]] -git-tree-sha1 = "42d5f897009e7ff2cf88db414a389e5ed1bdd023" -uuid = "c8e1da08-722c-5040-9ed9-7db0dc04731e" -version = "1.10.0" - -[[deps.IteratorInterfaceExtensions]] -git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" -uuid = "82899510-4779-5014-852e-03e436cf321d" -version = "1.0.0" - -[[deps.JLD]] -deps = ["Compat", "FileIO", "H5Zblosc", "HDF5", "Printf"] -git-tree-sha1 = "9e46670950251e88316a421b3bfa8f1190abe43a" -uuid = "4138dd39-2aa7-5051-a626-17a0bb65d9c8" -version = "0.13.4" - -[[deps.JLLWrappers]] -deps = ["Artifacts", "Preferences"] -git-tree-sha1 = "7e5d6779a1e09a36db2a7b6cff50942a0a7d0fca" -uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.5.0" - -[[deps.JSON]] -deps = ["Dates", "Mmap", "Parsers", "Unicode"] -git-tree-sha1 = "31e996f0a15c7b280ba9f76636b3ff9e2ae58c9a" -uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" -version = "0.21.4" - -[[deps.JpegTurbo_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "3336abae9a713d2210bb57ab484b1e065edd7d23" -uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" -version = "3.0.2+0" - -[[deps.JuMP]] -deps = ["LinearAlgebra", "MacroTools", "MathOptInterface", "MutableArithmetics", "OrderedCollections", "Printf", "SnoopPrecompile", "SparseArrays"] -git-tree-sha1 = "cd161958e8b47f9696a6b03f563afb4e5fe8f703" -uuid = "4076af6c-e467-56ae-b986-b466b2749572" -version = "1.17.0" - -[[deps.LERC_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "bf36f528eec6634efc60d7ec062008f171071434" -uuid = "88015f11-f218-50d7-93a8-a6af411a945d" -version = "3.0.0+1" - -[[deps.LLVMOpenMP_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "d986ce2d884d49126836ea94ed5bfb0f12679713" -uuid = "1d63c593-3942-5779-bab2-d838dc0a180e" -version = "15.0.7+0" - -[[deps.LRUCache]] -deps = ["Serialization"] -git-tree-sha1 = "b3cc6698599b10e652832c2f23db3cab99d51b59" -uuid = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637" -version = "1.6.1" - -[[deps.LaTeXStrings]] -git-tree-sha1 = "50901ebc375ed41dbf8058da26f9de442febbbec" -uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" -version = "1.3.1" - -[[deps.LazyArtifacts]] -deps = ["Artifacts", "Pkg"] -uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" - -[[deps.LibCURL]] -deps = ["LibCURL_jll", "MozillaCACerts_jll"] -uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -version = "0.6.3" - -[[deps.LibCURL_jll]] -deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] -uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "7.84.0+0" - -[[deps.LibGit2]] -deps = ["Base64", "NetworkOptions", "Printf", "SHA"] -uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" - -[[deps.LibSSH2_jll]] -deps = ["Artifacts", "Libdl", "MbedTLS_jll"] -uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" -version = "1.10.2+0" - -[[deps.Libdl]] -uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" - -[[deps.Libtiff_jll]] -deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "LERC_jll", "Libdl", "Pkg", "Zlib_jll", "Zstd_jll"] -git-tree-sha1 = "3eb79b0ca5764d4799c06699573fd8f533259713" -uuid = "89763e89-9b03-5906-acba-b20f662cd828" -version = "4.4.0+0" - -[[deps.LinDistFlow]] -deps = ["JuMP", "LinearAlgebra", "Logging", "SparseArrays"] -git-tree-sha1 = "ad15878e716a18b82325cacc02af4533bb9777e7" -uuid = "bf674bac-ffe4-48d3-9f32-72124ffa9ede" -version = "0.1.4" - -[[deps.LinearAlgebra]] -deps = ["Libdl", "libblastrampoline_jll"] -uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - -[[deps.LittleCMS_jll]] -deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pkg"] -git-tree-sha1 = "110897e7db2d6836be22c18bffd9422218ee6284" -uuid = "d3a379c0-f9a3-5b72-a4c0-6bf4d2e8af0f" -version = "2.12.0+0" - -[[deps.LogExpFunctions]] -deps = ["ChainRulesCore", "ChangesOfVariables", "DocStringExtensions", "InverseFunctions", "IrrationalConstants", "LinearAlgebra"] -git-tree-sha1 = "18144f3e9cbe9b15b070288eef858f71b291ce37" -uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" -version = "0.3.27" - -[[deps.Logging]] -uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" - -[[deps.LoggingExtras]] -deps = ["Dates", "Logging"] -git-tree-sha1 = "c1dd6d7978c12545b4179fb6153b9250c96b0075" -uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" -version = "1.0.3" - -[[deps.Lz4_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "6c26c5e8a4203d43b5497be3ec5d4e0c3cde240a" -uuid = "5ced341a-0733-55b8-9ab6-a4889d929147" -version = "1.9.4+0" - -[[deps.METIS_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "1fd0a97409e418b78c53fac671cf4622efdf0f21" -uuid = "d00139f3-1899-568f-a2f0-47f597d42d70" -version = "5.1.2+0" - -[[deps.MPICH_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "Hwloc_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] -git-tree-sha1 = "656036b9ed6f942d35e536e249600bc31d0f9df8" -uuid = "7cb0a576-ebde-5e09-9194-50597f1243b4" -version = "4.2.0+0" - -[[deps.MPIPreferences]] -deps = ["Libdl", "Preferences"] -git-tree-sha1 = "8f6af051b9e8ec597fa09d8885ed79fd582f33c9" -uuid = "3da0fdf6-3ccc-4f1b-acd9-58baa6c99267" -version = "0.1.10" - -[[deps.MPItrampoline_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "Hwloc_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] -git-tree-sha1 = "77c3bd69fdb024d75af38713e883d0f249ce19c2" -uuid = "f1f71cc9-e9ae-5b93-9b94-4fe0e1ad3748" -version = "5.3.2+0" - -[[deps.MUMPS_seq_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "METIS_jll", "OpenBLAS32_jll", "Pkg", "libblastrampoline_jll"] -git-tree-sha1 = "f429d6bbe9ad015a2477077c9e89b978b8c26558" -uuid = "d7ed1dd3-d0ae-5e8e-bfb4-87a502085b8d" -version = "500.500.101+0" - -[[deps.MacroTools]] -deps = ["Markdown", "Random"] -git-tree-sha1 = "2fa9ee3e63fd3a4f7a9a4f4744a52f4856de82df" -uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" -version = "0.5.13" - -[[deps.MappedArrays]] -git-tree-sha1 = "2dab0221fe2b0f2cb6754eaa743cc266339f527e" -uuid = "dbb5928d-eab1-5f90-85c2-b9b0edb7c900" -version = "0.4.2" - -[[deps.Markdown]] -deps = ["Base64"] -uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" - -[[deps.MathOptInterface]] -deps = ["BenchmarkTools", "CodecBzip2", "CodecZlib", "DataStructures", "ForwardDiff", "JSON", "LinearAlgebra", "MutableArithmetics", "NaNMath", "OrderedCollections", "PrecompileTools", "Printf", "SparseArrays", "SpecialFunctions", "Test", "Unicode"] -git-tree-sha1 = "362ae34a5291a79e16b8eb87b5738532c5e799ff" -uuid = "b8f27783-ece8-5eb3-8dc8-9495eed66fee" -version = "1.23.0" - -[[deps.MbedTLS]] -deps = ["Dates", "MbedTLS_jll", "MozillaCACerts_jll", "NetworkOptions", "Random", "Sockets"] -git-tree-sha1 = "c067a280ddc25f196b5e7df3877c6b226d390aaf" -uuid = "739be429-bea8-5141-9913-cc70e7f3736d" -version = "1.1.9" - -[[deps.MbedTLS_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.0+0" - -[[deps.MicrosoftMPI_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "f12a29c4400ba812841c6ace3f4efbb6dbb3ba01" -uuid = "9237b28f-5490-5468-be7b-bb81f5f5e6cf" -version = "10.1.4+2" - -[[deps.Missings]] -deps = ["DataAPI"] -git-tree-sha1 = "f66bdc5de519e8f8ae43bdc598782d35a25b1272" -uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" -version = "1.1.0" - -[[deps.Mmap]] -uuid = "a63ad114-7e13-5084-954f-fe012c677804" - -[[deps.MosaicViews]] -deps = ["MappedArrays", "OffsetArrays", "PaddedViews", "StackViews"] -git-tree-sha1 = "7b86a5d4d70a9f5cdf2dacb3cbe6d251d1a61dbe" -uuid = "e94cdb99-869f-56ef-bcf0-1ae2bcbe0389" -version = "0.3.4" - -[[deps.MozillaCACerts_jll]] -uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2022.2.1" - -[[deps.MutableArithmetics]] -deps = ["LinearAlgebra", "SparseArrays", "Test"] -git-tree-sha1 = "806eea990fb41f9b36f1253e5697aa645bf6a9f8" -uuid = "d8a4904e-b15c-11e9-3269-09a3773c0cb0" -version = "1.4.0" - -[[deps.NaNMath]] -deps = ["OpenLibm_jll"] -git-tree-sha1 = "0877504529a3e5c3343c6f8b4c0381e57e4387e4" -uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" -version = "1.0.2" - -[[deps.Ncurses_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "bd4eb207e17878ceec404e74130639b6dda8b63b" -uuid = "68e3532b-a499-55ff-9963-d1c0c0748b3a" -version = "6.4.1+0" - -[[deps.NetworkOptions]] -uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" -version = "1.2.0" - -[[deps.OffsetArrays]] -deps = ["Adapt"] -git-tree-sha1 = "6a731f2b5c03157418a20c12195eb4b74c8f8621" -uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" -version = "1.13.0" - -[[deps.OpenBLAS32_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "9c6c2ed4b7acd2137b878eb96c68e63b76199d0f" -uuid = "656ef2d0-ae68-5445-9ca0-591084a874a2" -version = "0.3.17+0" - -[[deps.OpenBLAS_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] -uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.20+0" - -[[deps.OpenJpeg_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Libtiff_jll", "LittleCMS_jll", "Pkg", "libpng_jll"] -git-tree-sha1 = "76374b6e7f632c130e78100b166e5a48464256f8" -uuid = "643b3616-a352-519d-856d-80112ee9badc" -version = "2.4.0+0" - -[[deps.OpenLibm_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.1+0" - -[[deps.OpenMPI_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "Hwloc_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "PMIx_jll", "TOML", "Zlib_jll", "libevent_jll", "prrte_jll"] -git-tree-sha1 = "f46caf663e069027a06942d00dced37f1eb3d8ad" -uuid = "fe0851c0-eecd-5654-98d4-656369965a5c" -version = "5.0.2+0" - -[[deps.OpenSSL]] -deps = ["BitFlags", "Dates", "MozillaCACerts_jll", "OpenSSL_jll", "Sockets"] -git-tree-sha1 = "af81a32750ebc831ee28bdaaba6e1067decef51e" -uuid = "4d8831e6-92b7-49fb-bdf8-b643e874388c" -version = "1.4.2" - -[[deps.OpenSSL_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "60e3045590bd104a16fefb12836c00c0ef8c7f8c" -uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" -version = "3.0.13+0" - -[[deps.OpenSpecFun_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1" -uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" -version = "0.5.5+0" - -[[deps.OrderedCollections]] -git-tree-sha1 = "dfdf5519f235516220579f949664f1bf44e741c5" -uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.6.3" - -[[deps.Osi_jll]] -deps = ["Artifacts", "CoinUtils_jll", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "OpenBLAS32_jll", "Pkg"] -git-tree-sha1 = "4f00d103782fb742e50886924eeea2fe722d3f7a" -uuid = "7da25872-d9ce-5375-a4d3-7a845f58efdd" -version = "0.10800.700+0" - -[[deps.PMIx_jll]] -deps = ["Artifacts", "Hwloc_jll", "JLLWrappers", "Libdl", "Zlib_jll", "libevent_jll"] -git-tree-sha1 = "8b3b19351fa24791f94d7ae85faf845ca1362541" -uuid = "32165bc3-0280-59bc-8c0b-c33b6203efab" -version = "4.2.7+0" - -[[deps.PROJ_jll]] -deps = ["Artifacts", "JLLWrappers", "LibCURL_jll", "Libdl", "Libtiff_jll", "Pkg", "SQLite_jll"] -git-tree-sha1 = "fcb3f39ae1184a056ecc415863d46d2109aa6947" -uuid = "58948b4f-47e0-5654-a9ad-f609743f8632" -version = "900.100.0+0" - -[[deps.PaddedViews]] -deps = ["OffsetArrays"] -git-tree-sha1 = "0fac6313486baae819364c52b4f483450a9d793f" -uuid = "5432bcbf-9aad-5242-b902-cca2824c8663" -version = "0.5.12" - -[[deps.Parsers]] -deps = ["Dates", "PrecompileTools", "UUIDs"] -git-tree-sha1 = "8489905bcdbcfac64d1daa51ca07c0d8f0283821" -uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "2.8.1" - -[[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] -uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.8.0" - -[[deps.PooledArrays]] -deps = ["DataAPI", "Future"] -git-tree-sha1 = "36d8b4b899628fb92c2749eb488d884a926614d3" -uuid = "2dfb63ee-cc39-5dd5-95bd-886bf059d720" -version = "1.4.3" - -[[deps.PrecompileTools]] -deps = ["Preferences"] -git-tree-sha1 = "5aa36f7049a63a1528fe8f7c3f2113413ffd4e1f" -uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" -version = "1.2.1" - -[[deps.Preferences]] -deps = ["TOML"] -git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6" -uuid = "21216c6a-2e73-6563-6e65-726566657250" -version = "1.4.3" - -[[deps.PrettyTables]] -deps = ["Crayons", "LaTeXStrings", "Markdown", "PrecompileTools", "Printf", "Reexport", "StringManipulation", "Tables"] -git-tree-sha1 = "88b895d13d53b5577fd53379d913b9ab9ac82660" -uuid = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d" -version = "2.3.1" - -[[deps.Printf]] -deps = ["Unicode"] -uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" - -[[deps.Profile]] -deps = ["Printf"] -uuid = "9abbd945-dff8-562f-b5e8-e1ebf5ef1b79" - -[[deps.REPL]] -deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] -uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" - -[[deps.REopt]] -deps = ["ArchGDAL", "CSV", "CoolProp", "DataFrames", "Dates", "DelimitedFiles", "HTTP", "JLD", "JSON", "JuMP", "LinDistFlow", "LinearAlgebra", "Logging", "MathOptInterface", "Requires", "Roots", "Statistics", "TestEnv"] -git-tree-sha1 = "b8e663a9f06eb6a1085ff7de981df2a6246b2b91" -uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6" -version = "0.45.0" - -[[deps.Random]] -deps = ["SHA", "Serialization"] -uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" - -[[deps.RangeArrays]] -git-tree-sha1 = "b9039e93773ddcfc828f12aadf7115b4b4d225f5" -uuid = "b3c3ace0-ae52-54e7-9d0b-2c1406fd6b9d" -version = "0.3.2" - -[[deps.Readline_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Ncurses_jll"] -git-tree-sha1 = "9d70e0c890a6c7ca3eb1ca0eaabba4d34795b7fb" -uuid = "05236dd9-4125-5232-aa7c-9ec0c9b2c25a" -version = "8.2.1+0" - -[[deps.RecipesBase]] -deps = ["PrecompileTools"] -git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" -uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" -version = "1.3.4" - -[[deps.Reexport]] -git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" -uuid = "189a3867-3050-52da-a836-e630ba90ab69" -version = "1.2.2" - -[[deps.Requires]] -deps = ["UUIDs"] -git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7" -uuid = "ae029012-a4dd-5104-9daa-d747884805df" -version = "1.3.0" - -[[deps.Roots]] -deps = ["Accessors", "ChainRulesCore", "CommonSolve", "Printf"] -git-tree-sha1 = "6f6481a44ca53367383f15415dc27ab0c7422731" -uuid = "f2b01f46-fcfa-551c-844a-d8ac1e96c665" -version = "2.1.4" - -[[deps.SCIP]] -deps = ["Ipopt_jll", "Libdl", "LinearAlgebra", "MathOptInterface", "SCIP_PaPILO_jll", "SCIP_jll"] -git-tree-sha1 = "ac0512c46cd91744f62463514f2c581025ea5b93" -uuid = "82193955-e24f-5292-bf16-6f2c5261a85f" -version = "0.11.6" - -[[deps.SCIP_PaPILO_jll]] -deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "GMP_jll", "Ipopt_jll", "JLLWrappers", "Libdl", "OpenBLAS32_jll", "Pkg", "Readline_jll", "Zlib_jll", "bliss_jll", "boost_jll", "oneTBB_jll"] -git-tree-sha1 = "7705b5779724f35d78351548f24c7f7656e61bc2" -uuid = "fc9abe76-a5e6-5fed-b0b7-a12f309cf031" -version = "0.1.0+3" - -[[deps.SCIP_jll]] -deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "GMP_jll", "Ipopt_jll", "JLLWrappers", "Libdl", "Pkg", "Readline_jll", "Zlib_jll", "bliss_jll", "boost_jll"] -git-tree-sha1 = "4a23f926d711535640963aea90a3f5d931ae52c7" -uuid = "e5ac4fe4-a920-5659-9bf8-f9f73e9e79ce" -version = "0.2.1+0" - -[[deps.SHA]] -uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" -version = "0.7.0" - -[[deps.SQLite_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll"] -git-tree-sha1 = "75e28667a36b5650b5cc4baa266c5760c3672275" -uuid = "76ed43ae-9a5d-5a62-8c75-30186b810ce8" -version = "3.45.0+0" - -[[deps.SentinelArrays]] -deps = ["Dates", "Random"] -git-tree-sha1 = "0e7508ff27ba32f26cd459474ca2ede1bc10991f" -uuid = "91c51154-3ec4-41a3-a24f-3f23e20d615c" -version = "1.4.1" - -[[deps.Serialization]] -uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" - -[[deps.SimpleBufferStream]] -git-tree-sha1 = "874e8867b33a00e784c8a7e4b60afe9e037b74e1" -uuid = "777ac1f9-54b0-4bf8-805c-2214025038e7" -version = "1.1.0" - -[[deps.SnoopPrecompile]] -deps = ["Preferences"] -git-tree-sha1 = "e760a70afdcd461cf01a575947738d359234665c" -uuid = "66db9d55-30c0-4569-8b51-7e840670fc0c" -version = "1.0.3" - -[[deps.Sockets]] -uuid = "6462fe0b-24de-5631-8697-dd941f90decc" - -[[deps.SortingAlgorithms]] -deps = ["DataStructures"] -git-tree-sha1 = "66e0a8e672a0bdfca2c3f5937efb8538b9ddc085" -uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" -version = "1.2.1" - -[[deps.SparseArrays]] -deps = ["LinearAlgebra", "Random"] -uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - -[[deps.SpecialFunctions]] -deps = ["ChainRulesCore", "IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] -git-tree-sha1 = "e2cfc4012a19088254b3950b85c3c1d8882d864d" -uuid = "276daf66-3868-5448-9aa4-cd146d93841b" -version = "2.3.1" - -[[deps.StackViews]] -deps = ["OffsetArrays"] -git-tree-sha1 = "46e589465204cd0c08b4bd97385e4fa79a0c770c" -uuid = "cae243ae-269e-4f55-b966-ac2d0dc13c15" -version = "0.1.1" - -[[deps.StaticArrays]] -deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore", "Statistics"] -git-tree-sha1 = "bf074c045d3d5ffd956fa0a461da38a44685d6b2" -uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.9.3" - -[[deps.StaticArraysCore]] -git-tree-sha1 = "36b3d696ce6366023a0ea192b4cd442268995a0d" -uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" -version = "1.4.2" - -[[deps.Statistics]] -deps = ["LinearAlgebra", "SparseArrays"] -uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" - -[[deps.StringManipulation]] -deps = ["PrecompileTools"] -git-tree-sha1 = "a04cabe79c5f01f4d723cc6704070ada0b9d46d5" -uuid = "892a3eda-7b42-436c-8928-eab12a02cf0e" -version = "0.3.4" - -[[deps.TOML]] -deps = ["Dates"] -uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -version = "1.0.0" - -[[deps.TableTraits]] -deps = ["IteratorInterfaceExtensions"] -git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" -uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" -version = "1.0.1" - -[[deps.Tables]] -deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "OrderedCollections", "TableTraits"] -git-tree-sha1 = "cb76cf677714c095e535e3501ac7954732aeea2d" -uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" -version = "1.11.1" - -[[deps.Tar]] -deps = ["ArgTools", "SHA"] -uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" -version = "1.10.1" - -[[deps.TensorCore]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "1feb45f88d133a655e001435632f019a9a1bcdb6" -uuid = "62fd8b95-f654-4bbd-a8a5-9c27f68ccd50" -version = "0.1.1" - -[[deps.Test]] -deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] -uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - -[[deps.TestEnv]] -deps = ["Pkg"] -git-tree-sha1 = "c35f69c951ac4f74b8b074f62dfb1e169b351497" -uuid = "1e6cf692-eddd-4d53-88a5-2d735e33781b" -version = "1.101.1" - -[[deps.TranscodingStreams]] -deps = ["Random", "Test"] -git-tree-sha1 = "3caa21522e7efac1ba21834a03734c57b4611c7e" -uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" -version = "0.10.4" - -[[deps.URIs]] -git-tree-sha1 = "67db6cc7b3821e19ebe75791a9dd19c9b1188f2b" -uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" -version = "1.5.1" - -[[deps.UUIDs]] -deps = ["Random", "SHA"] -uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" - -[[deps.Unicode]] -uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" - -[[deps.Unitful]] -deps = ["ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "Random"] -git-tree-sha1 = "3c793be6df9dd77a0cf49d80984ef9ff996948fa" -uuid = "1986cc42-f94f-5a68-af5c-568840ba703d" -version = "1.19.0" - -[[deps.WeakRefStrings]] -deps = ["DataAPI", "InlineStrings", "Parsers"] -git-tree-sha1 = "b1be2855ed9ed8eac54e5caff2afcdb442d52c23" -uuid = "ea10d353-3f73-51f8-a26c-33c1cb351aa5" -version = "1.4.2" - -[[deps.WorkerUtilities]] -git-tree-sha1 = "cd1659ba0d57b71a464a29e64dbc67cfe83d54e7" -uuid = "76eceee3-57b5-4d4a-8e66-0e911cebbf60" -version = "1.6.1" - -[[deps.Xpress]] -deps = ["Libdl", "LinearAlgebra", "MathOptInterface", "SparseArrays"] -git-tree-sha1 = "29c47b54b6938852a598fc6761ed927aad61f10e" -uuid = "9e70acf3-d6c9-5be6-b5bd-4e2c73e3e054" -version = "0.16.2" - -[[deps.Zlib_jll]] -deps = ["Libdl"] -uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.2.12+3" - -[[deps.Zstd_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "49ce682769cd5de6c72dcf1b94ed7790cd08974c" -uuid = "3161d3a3-bdf6-5164-811a-617609db77b4" -version = "1.5.5+0" - -[[deps.bliss_jll]] -deps = ["Artifacts", "GMP_jll", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "f8b75e896a326a162a4f6e998990521d8302c810" -uuid = "508c9074-7a14-5c94-9582-3d4bc1871065" -version = "0.77.0+1" - -[[deps.boost_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] -git-tree-sha1 = "7a89efe0137720ca82f99e8daa526d23120d0d37" -uuid = "28df3c45-c428-5900-9ff8-a3135698ca75" -version = "1.76.0+1" - -[[deps.libaec_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "46bf7be2917b59b761247be3f317ddf75e50e997" -uuid = "477f73a3-ac25-53e9-8cc3-50b2fa2566f0" -version = "1.1.2+0" - -[[deps.libblastrampoline_jll]] -deps = ["Artifacts", "Libdl", "OpenBLAS_jll"] -uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.1.1+0" - -[[deps.libevent_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "OpenSSL_jll"] -git-tree-sha1 = "f04ec6d9a186115fb38f858f05c0c4e1b7fc9dcb" -uuid = "1080aeaf-3a6a-583e-a51c-c537b09f60ec" -version = "2.1.13+1" - -[[deps.libgeotiff_jll]] -deps = ["Artifacts", "JLLWrappers", "LibCURL_jll", "Libdl", "Libtiff_jll", "PROJ_jll", "Pkg"] -git-tree-sha1 = "13dfba87a1fe301c4b40f991d0ec990bbee59bbe" -uuid = "06c338fa-64ff-565b-ac2f-249532af990e" -version = "100.700.100+0" - -[[deps.libpng_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll"] -git-tree-sha1 = "d7015d2e18a5fd9a4f47de711837e980519781a4" -uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f" -version = "1.6.43+1" - -[[deps.nghttp2_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.48.0+0" - -[[deps.oneTBB_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "f1dd5788210dae437db10a24ea0c660cf70d6412" -uuid = "1317d2d5-d96f-522e-a858-c73665f53c3e" -version = "2021.9.0+0" - -[[deps.p7zip_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.4.0+0" - -[[deps.prrte_jll]] -deps = ["Artifacts", "Hwloc_jll", "JLLWrappers", "Libdl", "PMIx_jll", "libevent_jll"] -git-tree-sha1 = "5adb2d7a18a30280feb66cad6f1a1dfdca2dc7b0" -uuid = "eb928a42-fffd-568d-ab9c-3f5d54fc65b9" -version = "3.0.2+0" From 7b92733a3b5a923d4b23f8eae8d006a0f343ade5 Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Tue, 23 Apr 2024 15:03:24 -0700 Subject: [PATCH 041/142] Revert "Delete Manifest.toml" This reverts commit 264b7e37e096f80e77227eaccfe1fbfbff3dad97. --- julia_src/Manifest.toml | 1131 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 1131 insertions(+) create mode 100644 julia_src/Manifest.toml diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml new file mode 100644 index 000000000..366432e49 --- /dev/null +++ b/julia_src/Manifest.toml @@ -0,0 +1,1131 @@ +# This file is machine-generated - editing it directly is not advised + +julia_version = "1.8.5" +manifest_format = "2.0" +project_hash = "b3c6037c53375dada9e36c23f668bcd0efac8f34" + +[[deps.ASL_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "6252039f98492252f9e47c312c8ffda0e3b9e78d" +uuid = "ae81ac8f-d209-56e5-92de-9978fef736f9" +version = "0.1.3+0" + +[[deps.AbstractFFTs]] +deps = ["ChainRulesCore", "LinearAlgebra", "Test"] +git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef" +uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" +version = "1.5.0" + +[[deps.Accessors]] +deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "MacroTools", "Markdown", "Requires", "Test"] +git-tree-sha1 = "c0d491ef0b135fd7d63cbc6404286bc633329425" +uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" +version = "0.1.36" + +[[deps.Adapt]] +deps = ["LinearAlgebra", "Requires"] +git-tree-sha1 = "cea4ac3f5b4bc4b3000aa55afb6e5626518948fa" +uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" +version = "4.0.3" + +[[deps.ArchGDAL]] +deps = ["CEnum", "ColorTypes", "Dates", "DiskArrays", "Extents", "GDAL", "GDAL_jll", "GeoFormatTypes", "GeoInterface", "GeoInterfaceRecipes", "ImageCore", "Tables"] +git-tree-sha1 = "edfaf8e5f8d57cabcd98399b0b727bce22bb4d9c" +uuid = "c9ce4bd3-c3d5-55b8-8973-c0e20141b8c3" +version = "0.9.4" + +[[deps.ArgTools]] +uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" +version = "1.1.1" + +[[deps.Artifacts]] +uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[[deps.AxisArrays]] +deps = ["Dates", "IntervalSets", "IterTools", "RangeArrays"] +git-tree-sha1 = "16351be62963a67ac4083f748fdb3cca58bfd52f" +uuid = "39de3d68-74b9-583c-8d2d-e117c070f3a9" +version = "0.4.7" + +[[deps.Base64]] +uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" + +[[deps.BenchmarkTools]] +deps = ["JSON", "Logging", "Printf", "Profile", "Statistics", "UUIDs"] +git-tree-sha1 = "f1dff6729bc61f4d49e140da1af55dcd1ac97b2f" +uuid = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" +version = "1.5.0" + +[[deps.BitFlags]] +git-tree-sha1 = "2dc09997850d68179b69dafb58ae806167a32b1b" +uuid = "d1d4a3ce-64b1-5f1a-9ba4-7e7e69966f35" +version = "0.1.8" + +[[deps.Blosc]] +deps = ["Blosc_jll"] +git-tree-sha1 = "310b77648d38c223d947ff3f50f511d08690b8d5" +uuid = "a74b3585-a348-5f62-a45c-50e91977d574" +version = "0.7.3" + +[[deps.Blosc_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Lz4_jll", "Zlib_jll", "Zstd_jll"] +git-tree-sha1 = "19b98ee7e3db3b4eff74c5c9c72bf32144e24f10" +uuid = "0b7ba130-8d10-5ba8-a3d6-c5182647fed9" +version = "1.21.5+0" + +[[deps.Bzip2_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "9e2a6b69137e6969bab0152632dcb3bc108c8bdd" +uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0" +version = "1.0.8+1" + +[[deps.CEnum]] +git-tree-sha1 = "eb4cb44a499229b3b8426dcfb5dd85333951ff90" +uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82" +version = "0.4.2" + +[[deps.CSV]] +deps = ["CodecZlib", "Dates", "FilePathsBase", "InlineStrings", "Mmap", "Parsers", "PooledArrays", "PrecompileTools", "SentinelArrays", "Tables", "Unicode", "WeakRefStrings", "WorkerUtilities"] +git-tree-sha1 = "a44910ceb69b0d44fe262dd451ab11ead3ed0be8" +uuid = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" +version = "0.10.13" + +[[deps.Cbc]] +deps = ["Cbc_jll", "MathOptInterface", "SparseArrays"] +git-tree-sha1 = "53748bbb94ce592cfd5394528abc822f774f0d38" +uuid = "9961bab8-2fa3-5c5a-9d89-47fab24efd76" +version = "1.2.0" + +[[deps.Cbc_jll]] +deps = ["ASL_jll", "Artifacts", "Cgl_jll", "Clp_jll", "CoinUtils_jll", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "OpenBLAS32_jll", "Osi_jll", "Pkg"] +git-tree-sha1 = "1d12b6aa435f30bd5619e0144f4c815c854a91b6" +uuid = "38041ee0-ae04-5750-a4d2-bb4d0d83d27d" +version = "200.1000.800+0" + +[[deps.Cgl_jll]] +deps = ["Artifacts", "Clp_jll", "CoinUtils_jll", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Osi_jll", "Pkg"] +git-tree-sha1 = "3e53a23c0bf96e8c0115777e351a04d5b0f52529" +uuid = "3830e938-1dd0-5f3e-8b8e-b3ee43226782" +version = "0.6000.600+0" + +[[deps.ChainRulesCore]] +deps = ["Compat", "LinearAlgebra", "SparseArrays"] +git-tree-sha1 = "575cd02e080939a33b6df6c5853d14924c08e35b" +uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" +version = "1.23.0" + +[[deps.ChangesOfVariables]] +deps = ["InverseFunctions", "LinearAlgebra", "Test"] +git-tree-sha1 = "2fba81a302a7be671aefe194f0525ef231104e7f" +uuid = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" +version = "0.1.8" + +[[deps.Clp_jll]] +deps = ["Artifacts", "CoinUtils_jll", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "METIS_jll", "MUMPS_seq_jll", "OpenBLAS32_jll", "Osi_jll", "Pkg"] +git-tree-sha1 = "51861cd16c6c4e0018ad401b2afb36e51c7d4bcd" +uuid = "06985876-5285-5a41-9fcb-8948a742cc53" +version = "100.1700.700+1" + +[[deps.CodecBzip2]] +deps = ["Bzip2_jll", "Libdl", "TranscodingStreams"] +git-tree-sha1 = "9b1ca1aa6ce3f71b3d1840c538a8210a043625eb" +uuid = "523fee87-0ab8-5b00-afb7-3ecf72e48cfd" +version = "0.8.2" + +[[deps.CodecZlib]] +deps = ["TranscodingStreams", "Zlib_jll"] +git-tree-sha1 = "59939d8a997469ee05c4b4944560a820f9ba0d73" +uuid = "944b1d66-785c-5afd-91f1-9de20f533193" +version = "0.7.4" + +[[deps.CoinUtils_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "OpenBLAS32_jll", "Pkg"] +git-tree-sha1 = "5e9852361e31af66143665e780535df262fa3407" +uuid = "be027038-0da8-5614-b30d-e42594cb92df" +version = "200.1100.600+0" + +[[deps.ColorTypes]] +deps = ["FixedPointNumbers", "Random"] +git-tree-sha1 = "eb7f0f8307f71fac7c606984ea5fb2817275d6e4" +uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" +version = "0.11.4" + +[[deps.ColorVectorSpace]] +deps = ["ColorTypes", "FixedPointNumbers", "LinearAlgebra", "SpecialFunctions", "Statistics", "TensorCore"] +git-tree-sha1 = "600cc5508d66b78aae350f7accdb58763ac18589" +uuid = "c3611d14-8923-5661-9e6a-0046d554d3a4" +version = "0.9.10" + +[[deps.Colors]] +deps = ["ColorTypes", "FixedPointNumbers", "Reexport"] +git-tree-sha1 = "fc08e5930ee9a4e03f84bfb5211cb54e7769758a" +uuid = "5ae59095-9a9b-59fe-a467-6f913c188581" +version = "0.12.10" + +[[deps.CommonSolve]] +git-tree-sha1 = "0eee5eb66b1cf62cd6ad1b460238e60e4b09400c" +uuid = "38540f10-b2f7-11e9-35d8-d573e4eb0ff2" +version = "0.2.4" + +[[deps.CommonSubexpressions]] +deps = ["MacroTools", "Test"] +git-tree-sha1 = "7b8a93dba8af7e3b42fecabf646260105ac373f7" +uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" +version = "0.3.0" + +[[deps.Compat]] +deps = ["Dates", "LinearAlgebra", "TOML", "UUIDs"] +git-tree-sha1 = "c955881e3c981181362ae4088b35995446298b80" +uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" +version = "4.14.0" + +[[deps.CompilerSupportLibraries_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" +version = "1.0.1+0" + +[[deps.CompositionsBase]] +git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" +uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" +version = "0.1.2" + +[[deps.ConcurrentUtilities]] +deps = ["Serialization", "Sockets"] +git-tree-sha1 = "6cbbd4d241d7e6579ab354737f4dd95ca43946e1" +uuid = "f0e56b4a-5159-44fe-b623-3e5288b988bb" +version = "2.4.1" + +[[deps.ConstructionBase]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "c53fc348ca4d40d7b371e71fd52251839080cbc9" +uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" +version = "1.5.4" + +[[deps.CoolProp]] +deps = ["CoolProp_jll", "Markdown", "Unitful"] +git-tree-sha1 = "94062163b5656b1351f7f7a784341b8fe13c1ca1" +uuid = "e084ae63-2819-5025-826e-f8e611a84251" +version = "0.1.0" + +[[deps.CoolProp_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "f0f70a17d132d2ab5bf2b61993db36ac1099f6c7" +uuid = "3351c21f-4feb-5f29-afb9-f4fcb0e27549" +version = "6.6.0+0" + +[[deps.Crayons]] +git-tree-sha1 = "249fe38abf76d48563e2f4556bebd215aa317e15" +uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f" +version = "4.1.1" + +[[deps.DataAPI]] +git-tree-sha1 = "abe83f3a2f1b857aac70ef8b269080af17764bbe" +uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" +version = "1.16.0" + +[[deps.DataFrames]] +deps = ["Compat", "DataAPI", "DataStructures", "Future", "InlineStrings", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "Markdown", "Missings", "PooledArrays", "PrecompileTools", "PrettyTables", "Printf", "REPL", "Random", "Reexport", "SentinelArrays", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"] +git-tree-sha1 = "04c738083f29f86e62c8afc341f0967d8717bdb8" +uuid = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" +version = "1.6.1" + +[[deps.DataStructures]] +deps = ["Compat", "InteractiveUtils", "OrderedCollections"] +git-tree-sha1 = "0f4b5d62a88d8f59003e43c25a8a90de9eb76317" +uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" +version = "0.18.18" + +[[deps.DataValueInterfaces]] +git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" +uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" +version = "1.0.0" + +[[deps.Dates]] +deps = ["Printf"] +uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" + +[[deps.DelimitedFiles]] +deps = ["Mmap"] +uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" + +[[deps.DiffResults]] +deps = ["StaticArraysCore"] +git-tree-sha1 = "782dd5f4561f5d267313f23853baaaa4c52ea621" +uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" +version = "1.1.0" + +[[deps.DiffRules]] +deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"] +git-tree-sha1 = "23163d55f885173722d1e4cf0f6110cdbaf7e272" +uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" +version = "1.15.1" + +[[deps.DiskArrays]] +deps = ["LRUCache", "OffsetArrays"] +git-tree-sha1 = "ef25c513cad08d7ebbed158c91768ae32f308336" +uuid = "3c3547ce-8d99-4f5e-a174-61eb10b00ae3" +version = "0.3.23" + +[[deps.DocStringExtensions]] +deps = ["LibGit2"] +git-tree-sha1 = "2fb1e02f2b635d0845df5d7c167fec4dd739b00d" +uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" +version = "0.9.3" + +[[deps.DotEnv]] +deps = ["PrecompileTools"] +git-tree-sha1 = "92e88cb68a5b10545234f46dfaeb2fa8a8a50c45" +uuid = "4dc1fcf4-5e3b-5448-94ab-0c38ec0385c1" +version = "1.0.0" + +[[deps.Downloads]] +deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] +uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" +version = "1.6.0" + +[[deps.ExceptionUnwrapping]] +deps = ["Test"] +git-tree-sha1 = "dcb08a0d93ec0b1cdc4af184b26b591e9695423a" +uuid = "460bff9d-24e4-43bc-9d9f-a8973cb893f4" +version = "0.1.10" + +[[deps.Expat_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "4558ab818dcceaab612d1bb8c19cee87eda2b83c" +uuid = "2e619515-83b5-522b-bb60-26c02a35a201" +version = "2.5.0+0" + +[[deps.Extents]] +git-tree-sha1 = "2140cd04483da90b2da7f99b2add0750504fc39c" +uuid = "411431e0-e8b7-467b-b5e0-f676ba4f2910" +version = "0.1.2" + +[[deps.FileIO]] +deps = ["Pkg", "Requires", "UUIDs"] +git-tree-sha1 = "c5c28c245101bd59154f649e19b038d15901b5dc" +uuid = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" +version = "1.16.2" + +[[deps.FilePathsBase]] +deps = ["Compat", "Dates", "Mmap", "Printf", "Test", "UUIDs"] +git-tree-sha1 = "9f00e42f8d99fdde64d40c8ea5d14269a2e2c1aa" +uuid = "48062228-2e41-5def-b9a4-89aafe57970f" +version = "0.9.21" + +[[deps.FileWatching]] +uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" + +[[deps.FixedPointNumbers]] +deps = ["Statistics"] +git-tree-sha1 = "335bfdceacc84c5cdf16aadc768aa5ddfc5383cc" +uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" +version = "0.8.4" + +[[deps.ForwardDiff]] +deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions", "StaticArrays"] +git-tree-sha1 = "cf0fe81336da9fb90944683b8c41984b08793dad" +uuid = "f6369f11-7733-5829-9624-2563aa707210" +version = "0.10.36" + +[[deps.Future]] +deps = ["Random"] +uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" + +[[deps.GDAL]] +deps = ["CEnum", "GDAL_jll", "NetworkOptions", "PROJ_jll"] +git-tree-sha1 = "9ce70502472a9f23f8889f0f9e2be8451413fe7b" +uuid = "add2ef01-049f-52c4-9ee2-e494f65e021a" +version = "1.4.0" + +[[deps.GDAL_jll]] +deps = ["Artifacts", "Expat_jll", "GEOS_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "Libtiff_jll", "OpenJpeg_jll", "PROJ_jll", "Pkg", "SQLite_jll", "Zlib_jll", "Zstd_jll", "libgeotiff_jll"] +git-tree-sha1 = "e9604365601f34d669dac3609fa4870803bdea9b" +uuid = "a7073274-a066-55f0-b90d-d619367d196c" +version = "300.500.101+0" + +[[deps.GEOS_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "818ab247de98d8848a022c7be084b1283d912326" +uuid = "d604d12d-fa86-5845-992e-78dc15976526" +version = "3.11.2+0" + +[[deps.GMP_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "781609d7-10c4-51f6-84f2-b8444358ff6d" +version = "6.2.1+2" + +[[deps.GeoFormatTypes]] +git-tree-sha1 = "59107c179a586f0fe667024c5eb7033e81333271" +uuid = "68eda718-8dee-11e9-39e7-89f7f65f511f" +version = "0.4.2" + +[[deps.GeoInterface]] +deps = ["Extents"] +git-tree-sha1 = "d4f85701f569584f2cff7ba67a137d03f0cfb7d0" +uuid = "cf35fbd7-0cd7-5166-be24-54bfbe79505f" +version = "1.3.3" + +[[deps.GeoInterfaceRecipes]] +deps = ["GeoInterface", "RecipesBase"] +git-tree-sha1 = "fb1156076f24f1dfee45b3feadb31d05730a49ac" +uuid = "0329782f-3d07-4b52-b9f6-d3137cf03c7a" +version = "1.0.2" + +[[deps.GhpGhx]] +git-tree-sha1 = "bddcbcddc9a4ae7ae4f1ea7d4d8ccf38507d4071" +repo-rev = "main" +repo-url = "https://github.com/NREL/GhpGhx.jl.git" +uuid = "7ce85f02-24a8-4d69-a3f0-14b5daa7d30c" +version = "0.1.0" + +[[deps.Graphics]] +deps = ["Colors", "LinearAlgebra", "NaNMath"] +git-tree-sha1 = "d61890399bc535850c4bf08e4e0d3a7ad0f21cbd" +uuid = "a2bd30eb-e257-5431-a919-1863eab51364" +version = "1.1.2" + +[[deps.H5Zblosc]] +deps = ["Blosc", "HDF5"] +git-tree-sha1 = "d778420e524bcf56066e8c63c7aa315ae7269da2" +uuid = "c8ec2601-a99c-407f-b158-e79c03c2f5f7" +version = "0.1.2" + +[[deps.HDF5]] +deps = ["Compat", "HDF5_jll", "Libdl", "MPIPreferences", "Mmap", "Preferences", "Printf", "Random", "Requires", "UUIDs"] +git-tree-sha1 = "26407bd1c60129062cec9da63dc7d08251544d53" +uuid = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f" +version = "0.17.1" + +[[deps.HDF5_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LLVMOpenMP_jll", "LazyArtifacts", "LibCURL_jll", "Libdl", "MPICH_jll", "MPIPreferences", "MPItrampoline_jll", "MicrosoftMPI_jll", "OpenMPI_jll", "OpenSSL_jll", "TOML", "Zlib_jll", "libaec_jll"] +git-tree-sha1 = "38c8874692d48d5440d5752d6c74b0c6b0b60739" +uuid = "0234f1f7-429e-5d53-9886-15a909be8d59" +version = "1.14.2+1" + +[[deps.HTTP]] +deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "ExceptionUnwrapping", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] +git-tree-sha1 = "abbbb9ec3afd783a7cbd82ef01dcd088ea051398" +uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" +version = "1.10.1" + +[[deps.HiGHS]] +deps = ["HiGHS_jll", "MathOptInterface", "PrecompileTools", "SparseArrays"] +git-tree-sha1 = "fce13308f09771b160232903cad57be39a8a0ebb" +uuid = "87dc4568-4c63-4d18-b0c0-bb2238e4078b" +version = "1.7.5" + +[[deps.HiGHS_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Zlib_jll"] +git-tree-sha1 = "f596ee3668df8587158bcaef1ae47bf75bc0fe39" +uuid = "8fd58aa0-07eb-5a78-9b36-339c94fd15ea" +version = "1.6.0+1" + +[[deps.Hwloc_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "ca0f6bf568b4bfc807e7537f081c81e35ceca114" +uuid = "e33a78d0-f292-5ffc-b300-72abe9b543c8" +version = "2.10.0+0" + +[[deps.ImageCore]] +deps = ["AbstractFFTs", "ColorVectorSpace", "Colors", "FixedPointNumbers", "Graphics", "MappedArrays", "MosaicViews", "OffsetArrays", "PaddedViews", "Reexport"] +git-tree-sha1 = "acf614720ef026d38400b3817614c45882d75500" +uuid = "a09fc81d-aa75-5fe9-8630-4744c3626534" +version = "0.9.4" + +[[deps.InlineStrings]] +deps = ["Parsers"] +git-tree-sha1 = "9cc2baf75c6d09f9da536ddf58eb2f29dedaf461" +uuid = "842dd82b-1e85-43dc-bf29-5d0ee9dffc48" +version = "1.4.0" + +[[deps.InteractiveUtils]] +deps = ["Markdown"] +uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" + +[[deps.IntervalSets]] +deps = ["Random", "RecipesBase", "Statistics"] +git-tree-sha1 = "dba9ddf07f77f60450fe5d2e2beb9854d9a49bd0" +uuid = "8197267c-284f-5f27-9208-e0e47529a953" +version = "0.7.10" + +[[deps.InverseFunctions]] +deps = ["Test"] +git-tree-sha1 = "68772f49f54b479fa88ace904f6127f0a3bb2e46" +uuid = "3587e190-3f89-42d0-90ee-14403ec27112" +version = "0.1.12" + +[[deps.InvertedIndices]] +git-tree-sha1 = "0dc7b50b8d436461be01300fd8cd45aa0274b038" +uuid = "41ab1584-1d38-5bbf-9106-f11c6c58b48f" +version = "1.3.0" + +[[deps.Ipopt_jll]] +deps = ["ASL_jll", "Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "MUMPS_seq_jll", "OpenBLAS32_jll", "libblastrampoline_jll"] +git-tree-sha1 = "0d3939fb672b84082f3ee930b51de03df935be31" +uuid = "9cc047cb-c261-5740-88fc-0cf96f7bdcc7" +version = "300.1400.1200+0" + +[[deps.IrrationalConstants]] +git-tree-sha1 = "630b497eafcc20001bba38a4651b327dcfc491d2" +uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" +version = "0.2.2" + +[[deps.IterTools]] +git-tree-sha1 = "42d5f897009e7ff2cf88db414a389e5ed1bdd023" +uuid = "c8e1da08-722c-5040-9ed9-7db0dc04731e" +version = "1.10.0" + +[[deps.IteratorInterfaceExtensions]] +git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" +uuid = "82899510-4779-5014-852e-03e436cf321d" +version = "1.0.0" + +[[deps.JLD]] +deps = ["Compat", "FileIO", "H5Zblosc", "HDF5", "Printf"] +git-tree-sha1 = "9e46670950251e88316a421b3bfa8f1190abe43a" +uuid = "4138dd39-2aa7-5051-a626-17a0bb65d9c8" +version = "0.13.4" + +[[deps.JLLWrappers]] +deps = ["Artifacts", "Preferences"] +git-tree-sha1 = "7e5d6779a1e09a36db2a7b6cff50942a0a7d0fca" +uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" +version = "1.5.0" + +[[deps.JSON]] +deps = ["Dates", "Mmap", "Parsers", "Unicode"] +git-tree-sha1 = "31e996f0a15c7b280ba9f76636b3ff9e2ae58c9a" +uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" +version = "0.21.4" + +[[deps.JpegTurbo_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "3336abae9a713d2210bb57ab484b1e065edd7d23" +uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" +version = "3.0.2+0" + +[[deps.JuMP]] +deps = ["LinearAlgebra", "MacroTools", "MathOptInterface", "MutableArithmetics", "OrderedCollections", "Printf", "SnoopPrecompile", "SparseArrays"] +git-tree-sha1 = "cd161958e8b47f9696a6b03f563afb4e5fe8f703" +uuid = "4076af6c-e467-56ae-b986-b466b2749572" +version = "1.17.0" + +[[deps.LERC_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "bf36f528eec6634efc60d7ec062008f171071434" +uuid = "88015f11-f218-50d7-93a8-a6af411a945d" +version = "3.0.0+1" + +[[deps.LLVMOpenMP_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "d986ce2d884d49126836ea94ed5bfb0f12679713" +uuid = "1d63c593-3942-5779-bab2-d838dc0a180e" +version = "15.0.7+0" + +[[deps.LRUCache]] +deps = ["Serialization"] +git-tree-sha1 = "b3cc6698599b10e652832c2f23db3cab99d51b59" +uuid = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637" +version = "1.6.1" + +[[deps.LaTeXStrings]] +git-tree-sha1 = "50901ebc375ed41dbf8058da26f9de442febbbec" +uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" +version = "1.3.1" + +[[deps.LazyArtifacts]] +deps = ["Artifacts", "Pkg"] +uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" + +[[deps.LibCURL]] +deps = ["LibCURL_jll", "MozillaCACerts_jll"] +uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" +version = "0.6.3" + +[[deps.LibCURL_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] +uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" +version = "7.84.0+0" + +[[deps.LibGit2]] +deps = ["Base64", "NetworkOptions", "Printf", "SHA"] +uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" + +[[deps.LibSSH2_jll]] +deps = ["Artifacts", "Libdl", "MbedTLS_jll"] +uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" +version = "1.10.2+0" + +[[deps.Libdl]] +uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" + +[[deps.Libtiff_jll]] +deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "LERC_jll", "Libdl", "Pkg", "Zlib_jll", "Zstd_jll"] +git-tree-sha1 = "3eb79b0ca5764d4799c06699573fd8f533259713" +uuid = "89763e89-9b03-5906-acba-b20f662cd828" +version = "4.4.0+0" + +[[deps.LinDistFlow]] +deps = ["JuMP", "LinearAlgebra", "Logging", "SparseArrays"] +git-tree-sha1 = "ad15878e716a18b82325cacc02af4533bb9777e7" +uuid = "bf674bac-ffe4-48d3-9f32-72124ffa9ede" +version = "0.1.4" + +[[deps.LinearAlgebra]] +deps = ["Libdl", "libblastrampoline_jll"] +uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + +[[deps.LittleCMS_jll]] +deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pkg"] +git-tree-sha1 = "110897e7db2d6836be22c18bffd9422218ee6284" +uuid = "d3a379c0-f9a3-5b72-a4c0-6bf4d2e8af0f" +version = "2.12.0+0" + +[[deps.LogExpFunctions]] +deps = ["ChainRulesCore", "ChangesOfVariables", "DocStringExtensions", "InverseFunctions", "IrrationalConstants", "LinearAlgebra"] +git-tree-sha1 = "18144f3e9cbe9b15b070288eef858f71b291ce37" +uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" +version = "0.3.27" + +[[deps.Logging]] +uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" + +[[deps.LoggingExtras]] +deps = ["Dates", "Logging"] +git-tree-sha1 = "c1dd6d7978c12545b4179fb6153b9250c96b0075" +uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" +version = "1.0.3" + +[[deps.Lz4_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "6c26c5e8a4203d43b5497be3ec5d4e0c3cde240a" +uuid = "5ced341a-0733-55b8-9ab6-a4889d929147" +version = "1.9.4+0" + +[[deps.METIS_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "1fd0a97409e418b78c53fac671cf4622efdf0f21" +uuid = "d00139f3-1899-568f-a2f0-47f597d42d70" +version = "5.1.2+0" + +[[deps.MPICH_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Hwloc_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] +git-tree-sha1 = "656036b9ed6f942d35e536e249600bc31d0f9df8" +uuid = "7cb0a576-ebde-5e09-9194-50597f1243b4" +version = "4.2.0+0" + +[[deps.MPIPreferences]] +deps = ["Libdl", "Preferences"] +git-tree-sha1 = "8f6af051b9e8ec597fa09d8885ed79fd582f33c9" +uuid = "3da0fdf6-3ccc-4f1b-acd9-58baa6c99267" +version = "0.1.10" + +[[deps.MPItrampoline_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Hwloc_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] +git-tree-sha1 = "77c3bd69fdb024d75af38713e883d0f249ce19c2" +uuid = "f1f71cc9-e9ae-5b93-9b94-4fe0e1ad3748" +version = "5.3.2+0" + +[[deps.MUMPS_seq_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "METIS_jll", "OpenBLAS32_jll", "Pkg", "libblastrampoline_jll"] +git-tree-sha1 = "f429d6bbe9ad015a2477077c9e89b978b8c26558" +uuid = "d7ed1dd3-d0ae-5e8e-bfb4-87a502085b8d" +version = "500.500.101+0" + +[[deps.MacroTools]] +deps = ["Markdown", "Random"] +git-tree-sha1 = "2fa9ee3e63fd3a4f7a9a4f4744a52f4856de82df" +uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" +version = "0.5.13" + +[[deps.MappedArrays]] +git-tree-sha1 = "2dab0221fe2b0f2cb6754eaa743cc266339f527e" +uuid = "dbb5928d-eab1-5f90-85c2-b9b0edb7c900" +version = "0.4.2" + +[[deps.Markdown]] +deps = ["Base64"] +uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" + +[[deps.MathOptInterface]] +deps = ["BenchmarkTools", "CodecBzip2", "CodecZlib", "DataStructures", "ForwardDiff", "JSON", "LinearAlgebra", "MutableArithmetics", "NaNMath", "OrderedCollections", "PrecompileTools", "Printf", "SparseArrays", "SpecialFunctions", "Test", "Unicode"] +git-tree-sha1 = "362ae34a5291a79e16b8eb87b5738532c5e799ff" +uuid = "b8f27783-ece8-5eb3-8dc8-9495eed66fee" +version = "1.23.0" + +[[deps.MbedTLS]] +deps = ["Dates", "MbedTLS_jll", "MozillaCACerts_jll", "NetworkOptions", "Random", "Sockets"] +git-tree-sha1 = "c067a280ddc25f196b5e7df3877c6b226d390aaf" +uuid = "739be429-bea8-5141-9913-cc70e7f3736d" +version = "1.1.9" + +[[deps.MbedTLS_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" +version = "2.28.0+0" + +[[deps.MicrosoftMPI_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "f12a29c4400ba812841c6ace3f4efbb6dbb3ba01" +uuid = "9237b28f-5490-5468-be7b-bb81f5f5e6cf" +version = "10.1.4+2" + +[[deps.Missings]] +deps = ["DataAPI"] +git-tree-sha1 = "f66bdc5de519e8f8ae43bdc598782d35a25b1272" +uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" +version = "1.1.0" + +[[deps.Mmap]] +uuid = "a63ad114-7e13-5084-954f-fe012c677804" + +[[deps.MosaicViews]] +deps = ["MappedArrays", "OffsetArrays", "PaddedViews", "StackViews"] +git-tree-sha1 = "7b86a5d4d70a9f5cdf2dacb3cbe6d251d1a61dbe" +uuid = "e94cdb99-869f-56ef-bcf0-1ae2bcbe0389" +version = "0.3.4" + +[[deps.MozillaCACerts_jll]] +uuid = "14a3606d-f60d-562e-9121-12d972cd8159" +version = "2022.2.1" + +[[deps.MutableArithmetics]] +deps = ["LinearAlgebra", "SparseArrays", "Test"] +git-tree-sha1 = "806eea990fb41f9b36f1253e5697aa645bf6a9f8" +uuid = "d8a4904e-b15c-11e9-3269-09a3773c0cb0" +version = "1.4.0" + +[[deps.NaNMath]] +deps = ["OpenLibm_jll"] +git-tree-sha1 = "0877504529a3e5c3343c6f8b4c0381e57e4387e4" +uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" +version = "1.0.2" + +[[deps.Ncurses_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "bd4eb207e17878ceec404e74130639b6dda8b63b" +uuid = "68e3532b-a499-55ff-9963-d1c0c0748b3a" +version = "6.4.1+0" + +[[deps.NetworkOptions]] +uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" +version = "1.2.0" + +[[deps.OffsetArrays]] +deps = ["Adapt"] +git-tree-sha1 = "6a731f2b5c03157418a20c12195eb4b74c8f8621" +uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" +version = "1.13.0" + +[[deps.OpenBLAS32_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "9c6c2ed4b7acd2137b878eb96c68e63b76199d0f" +uuid = "656ef2d0-ae68-5445-9ca0-591084a874a2" +version = "0.3.17+0" + +[[deps.OpenBLAS_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] +uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" +version = "0.3.20+0" + +[[deps.OpenJpeg_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libtiff_jll", "LittleCMS_jll", "Pkg", "libpng_jll"] +git-tree-sha1 = "76374b6e7f632c130e78100b166e5a48464256f8" +uuid = "643b3616-a352-519d-856d-80112ee9badc" +version = "2.4.0+0" + +[[deps.OpenLibm_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "05823500-19ac-5b8b-9628-191a04bc5112" +version = "0.8.1+0" + +[[deps.OpenMPI_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Hwloc_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "PMIx_jll", "TOML", "Zlib_jll", "libevent_jll", "prrte_jll"] +git-tree-sha1 = "f46caf663e069027a06942d00dced37f1eb3d8ad" +uuid = "fe0851c0-eecd-5654-98d4-656369965a5c" +version = "5.0.2+0" + +[[deps.OpenSSL]] +deps = ["BitFlags", "Dates", "MozillaCACerts_jll", "OpenSSL_jll", "Sockets"] +git-tree-sha1 = "af81a32750ebc831ee28bdaaba6e1067decef51e" +uuid = "4d8831e6-92b7-49fb-bdf8-b643e874388c" +version = "1.4.2" + +[[deps.OpenSSL_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "60e3045590bd104a16fefb12836c00c0ef8c7f8c" +uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" +version = "3.0.13+0" + +[[deps.OpenSpecFun_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1" +uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" +version = "0.5.5+0" + +[[deps.OrderedCollections]] +git-tree-sha1 = "dfdf5519f235516220579f949664f1bf44e741c5" +uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" +version = "1.6.3" + +[[deps.Osi_jll]] +deps = ["Artifacts", "CoinUtils_jll", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "OpenBLAS32_jll", "Pkg"] +git-tree-sha1 = "4f00d103782fb742e50886924eeea2fe722d3f7a" +uuid = "7da25872-d9ce-5375-a4d3-7a845f58efdd" +version = "0.10800.700+0" + +[[deps.PMIx_jll]] +deps = ["Artifacts", "Hwloc_jll", "JLLWrappers", "Libdl", "Zlib_jll", "libevent_jll"] +git-tree-sha1 = "8b3b19351fa24791f94d7ae85faf845ca1362541" +uuid = "32165bc3-0280-59bc-8c0b-c33b6203efab" +version = "4.2.7+0" + +[[deps.PROJ_jll]] +deps = ["Artifacts", "JLLWrappers", "LibCURL_jll", "Libdl", "Libtiff_jll", "Pkg", "SQLite_jll"] +git-tree-sha1 = "fcb3f39ae1184a056ecc415863d46d2109aa6947" +uuid = "58948b4f-47e0-5654-a9ad-f609743f8632" +version = "900.100.0+0" + +[[deps.PaddedViews]] +deps = ["OffsetArrays"] +git-tree-sha1 = "0fac6313486baae819364c52b4f483450a9d793f" +uuid = "5432bcbf-9aad-5242-b902-cca2824c8663" +version = "0.5.12" + +[[deps.Parsers]] +deps = ["Dates", "PrecompileTools", "UUIDs"] +git-tree-sha1 = "8489905bcdbcfac64d1daa51ca07c0d8f0283821" +uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" +version = "2.8.1" + +[[deps.Pkg]] +deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" +version = "1.8.0" + +[[deps.PooledArrays]] +deps = ["DataAPI", "Future"] +git-tree-sha1 = "36d8b4b899628fb92c2749eb488d884a926614d3" +uuid = "2dfb63ee-cc39-5dd5-95bd-886bf059d720" +version = "1.4.3" + +[[deps.PrecompileTools]] +deps = ["Preferences"] +git-tree-sha1 = "5aa36f7049a63a1528fe8f7c3f2113413ffd4e1f" +uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" +version = "1.2.1" + +[[deps.Preferences]] +deps = ["TOML"] +git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6" +uuid = "21216c6a-2e73-6563-6e65-726566657250" +version = "1.4.3" + +[[deps.PrettyTables]] +deps = ["Crayons", "LaTeXStrings", "Markdown", "PrecompileTools", "Printf", "Reexport", "StringManipulation", "Tables"] +git-tree-sha1 = "88b895d13d53b5577fd53379d913b9ab9ac82660" +uuid = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d" +version = "2.3.1" + +[[deps.Printf]] +deps = ["Unicode"] +uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" + +[[deps.Profile]] +deps = ["Printf"] +uuid = "9abbd945-dff8-562f-b5e8-e1ebf5ef1b79" + +[[deps.REPL]] +deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] +uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" + +[[deps.REopt]] +deps = ["ArchGDAL", "CSV", "CoolProp", "DataFrames", "Dates", "DelimitedFiles", "HTTP", "JLD", "JSON", "JuMP", "LinDistFlow", "LinearAlgebra", "Logging", "MathOptInterface", "Requires", "Roots", "Statistics", "TestEnv"] +git-tree-sha1 = "b8e663a9f06eb6a1085ff7de981df2a6246b2b91" +uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6" +version = "0.45.0" + +[[deps.Random]] +deps = ["SHA", "Serialization"] +uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" + +[[deps.RangeArrays]] +git-tree-sha1 = "b9039e93773ddcfc828f12aadf7115b4b4d225f5" +uuid = "b3c3ace0-ae52-54e7-9d0b-2c1406fd6b9d" +version = "0.3.2" + +[[deps.Readline_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Ncurses_jll"] +git-tree-sha1 = "9d70e0c890a6c7ca3eb1ca0eaabba4d34795b7fb" +uuid = "05236dd9-4125-5232-aa7c-9ec0c9b2c25a" +version = "8.2.1+0" + +[[deps.RecipesBase]] +deps = ["PrecompileTools"] +git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" +uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" +version = "1.3.4" + +[[deps.Reexport]] +git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" +uuid = "189a3867-3050-52da-a836-e630ba90ab69" +version = "1.2.2" + +[[deps.Requires]] +deps = ["UUIDs"] +git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7" +uuid = "ae029012-a4dd-5104-9daa-d747884805df" +version = "1.3.0" + +[[deps.Roots]] +deps = ["Accessors", "ChainRulesCore", "CommonSolve", "Printf"] +git-tree-sha1 = "6f6481a44ca53367383f15415dc27ab0c7422731" +uuid = "f2b01f46-fcfa-551c-844a-d8ac1e96c665" +version = "2.1.4" + +[[deps.SCIP]] +deps = ["Ipopt_jll", "Libdl", "LinearAlgebra", "MathOptInterface", "SCIP_PaPILO_jll", "SCIP_jll"] +git-tree-sha1 = "ac0512c46cd91744f62463514f2c581025ea5b93" +uuid = "82193955-e24f-5292-bf16-6f2c5261a85f" +version = "0.11.6" + +[[deps.SCIP_PaPILO_jll]] +deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "GMP_jll", "Ipopt_jll", "JLLWrappers", "Libdl", "OpenBLAS32_jll", "Pkg", "Readline_jll", "Zlib_jll", "bliss_jll", "boost_jll", "oneTBB_jll"] +git-tree-sha1 = "7705b5779724f35d78351548f24c7f7656e61bc2" +uuid = "fc9abe76-a5e6-5fed-b0b7-a12f309cf031" +version = "0.1.0+3" + +[[deps.SCIP_jll]] +deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "GMP_jll", "Ipopt_jll", "JLLWrappers", "Libdl", "Pkg", "Readline_jll", "Zlib_jll", "bliss_jll", "boost_jll"] +git-tree-sha1 = "4a23f926d711535640963aea90a3f5d931ae52c7" +uuid = "e5ac4fe4-a920-5659-9bf8-f9f73e9e79ce" +version = "0.2.1+0" + +[[deps.SHA]] +uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" +version = "0.7.0" + +[[deps.SQLite_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll"] +git-tree-sha1 = "75e28667a36b5650b5cc4baa266c5760c3672275" +uuid = "76ed43ae-9a5d-5a62-8c75-30186b810ce8" +version = "3.45.0+0" + +[[deps.SentinelArrays]] +deps = ["Dates", "Random"] +git-tree-sha1 = "0e7508ff27ba32f26cd459474ca2ede1bc10991f" +uuid = "91c51154-3ec4-41a3-a24f-3f23e20d615c" +version = "1.4.1" + +[[deps.Serialization]] +uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" + +[[deps.SimpleBufferStream]] +git-tree-sha1 = "874e8867b33a00e784c8a7e4b60afe9e037b74e1" +uuid = "777ac1f9-54b0-4bf8-805c-2214025038e7" +version = "1.1.0" + +[[deps.SnoopPrecompile]] +deps = ["Preferences"] +git-tree-sha1 = "e760a70afdcd461cf01a575947738d359234665c" +uuid = "66db9d55-30c0-4569-8b51-7e840670fc0c" +version = "1.0.3" + +[[deps.Sockets]] +uuid = "6462fe0b-24de-5631-8697-dd941f90decc" + +[[deps.SortingAlgorithms]] +deps = ["DataStructures"] +git-tree-sha1 = "66e0a8e672a0bdfca2c3f5937efb8538b9ddc085" +uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" +version = "1.2.1" + +[[deps.SparseArrays]] +deps = ["LinearAlgebra", "Random"] +uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + +[[deps.SpecialFunctions]] +deps = ["ChainRulesCore", "IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +git-tree-sha1 = "e2cfc4012a19088254b3950b85c3c1d8882d864d" +uuid = "276daf66-3868-5448-9aa4-cd146d93841b" +version = "2.3.1" + +[[deps.StackViews]] +deps = ["OffsetArrays"] +git-tree-sha1 = "46e589465204cd0c08b4bd97385e4fa79a0c770c" +uuid = "cae243ae-269e-4f55-b966-ac2d0dc13c15" +version = "0.1.1" + +[[deps.StaticArrays]] +deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore", "Statistics"] +git-tree-sha1 = "bf074c045d3d5ffd956fa0a461da38a44685d6b2" +uuid = "90137ffa-7385-5640-81b9-e52037218182" +version = "1.9.3" + +[[deps.StaticArraysCore]] +git-tree-sha1 = "36b3d696ce6366023a0ea192b4cd442268995a0d" +uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" +version = "1.4.2" + +[[deps.Statistics]] +deps = ["LinearAlgebra", "SparseArrays"] +uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" + +[[deps.StringManipulation]] +deps = ["PrecompileTools"] +git-tree-sha1 = "a04cabe79c5f01f4d723cc6704070ada0b9d46d5" +uuid = "892a3eda-7b42-436c-8928-eab12a02cf0e" +version = "0.3.4" + +[[deps.TOML]] +deps = ["Dates"] +uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" +version = "1.0.0" + +[[deps.TableTraits]] +deps = ["IteratorInterfaceExtensions"] +git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" +uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" +version = "1.0.1" + +[[deps.Tables]] +deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "OrderedCollections", "TableTraits"] +git-tree-sha1 = "cb76cf677714c095e535e3501ac7954732aeea2d" +uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" +version = "1.11.1" + +[[deps.Tar]] +deps = ["ArgTools", "SHA"] +uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" +version = "1.10.1" + +[[deps.TensorCore]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "1feb45f88d133a655e001435632f019a9a1bcdb6" +uuid = "62fd8b95-f654-4bbd-a8a5-9c27f68ccd50" +version = "0.1.1" + +[[deps.Test]] +deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] +uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[deps.TestEnv]] +deps = ["Pkg"] +git-tree-sha1 = "c35f69c951ac4f74b8b074f62dfb1e169b351497" +uuid = "1e6cf692-eddd-4d53-88a5-2d735e33781b" +version = "1.101.1" + +[[deps.TranscodingStreams]] +deps = ["Random", "Test"] +git-tree-sha1 = "3caa21522e7efac1ba21834a03734c57b4611c7e" +uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" +version = "0.10.4" + +[[deps.URIs]] +git-tree-sha1 = "67db6cc7b3821e19ebe75791a9dd19c9b1188f2b" +uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" +version = "1.5.1" + +[[deps.UUIDs]] +deps = ["Random", "SHA"] +uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" + +[[deps.Unicode]] +uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" + +[[deps.Unitful]] +deps = ["ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "Random"] +git-tree-sha1 = "3c793be6df9dd77a0cf49d80984ef9ff996948fa" +uuid = "1986cc42-f94f-5a68-af5c-568840ba703d" +version = "1.19.0" + +[[deps.WeakRefStrings]] +deps = ["DataAPI", "InlineStrings", "Parsers"] +git-tree-sha1 = "b1be2855ed9ed8eac54e5caff2afcdb442d52c23" +uuid = "ea10d353-3f73-51f8-a26c-33c1cb351aa5" +version = "1.4.2" + +[[deps.WorkerUtilities]] +git-tree-sha1 = "cd1659ba0d57b71a464a29e64dbc67cfe83d54e7" +uuid = "76eceee3-57b5-4d4a-8e66-0e911cebbf60" +version = "1.6.1" + +[[deps.Xpress]] +deps = ["Libdl", "LinearAlgebra", "MathOptInterface", "SparseArrays"] +git-tree-sha1 = "29c47b54b6938852a598fc6761ed927aad61f10e" +uuid = "9e70acf3-d6c9-5be6-b5bd-4e2c73e3e054" +version = "0.16.2" + +[[deps.Zlib_jll]] +deps = ["Libdl"] +uuid = "83775a58-1f1d-513f-b197-d71354ab007a" +version = "1.2.12+3" + +[[deps.Zstd_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "49ce682769cd5de6c72dcf1b94ed7790cd08974c" +uuid = "3161d3a3-bdf6-5164-811a-617609db77b4" +version = "1.5.5+0" + +[[deps.bliss_jll]] +deps = ["Artifacts", "GMP_jll", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "f8b75e896a326a162a4f6e998990521d8302c810" +uuid = "508c9074-7a14-5c94-9582-3d4bc1871065" +version = "0.77.0+1" + +[[deps.boost_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] +git-tree-sha1 = "7a89efe0137720ca82f99e8daa526d23120d0d37" +uuid = "28df3c45-c428-5900-9ff8-a3135698ca75" +version = "1.76.0+1" + +[[deps.libaec_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "46bf7be2917b59b761247be3f317ddf75e50e997" +uuid = "477f73a3-ac25-53e9-8cc3-50b2fa2566f0" +version = "1.1.2+0" + +[[deps.libblastrampoline_jll]] +deps = ["Artifacts", "Libdl", "OpenBLAS_jll"] +uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" +version = "5.1.1+0" + +[[deps.libevent_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "OpenSSL_jll"] +git-tree-sha1 = "f04ec6d9a186115fb38f858f05c0c4e1b7fc9dcb" +uuid = "1080aeaf-3a6a-583e-a51c-c537b09f60ec" +version = "2.1.13+1" + +[[deps.libgeotiff_jll]] +deps = ["Artifacts", "JLLWrappers", "LibCURL_jll", "Libdl", "Libtiff_jll", "PROJ_jll", "Pkg"] +git-tree-sha1 = "13dfba87a1fe301c4b40f991d0ec990bbee59bbe" +uuid = "06c338fa-64ff-565b-ac2f-249532af990e" +version = "100.700.100+0" + +[[deps.libpng_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll"] +git-tree-sha1 = "d7015d2e18a5fd9a4f47de711837e980519781a4" +uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f" +version = "1.6.43+1" + +[[deps.nghttp2_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" +version = "1.48.0+0" + +[[deps.oneTBB_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "f1dd5788210dae437db10a24ea0c660cf70d6412" +uuid = "1317d2d5-d96f-522e-a858-c73665f53c3e" +version = "2021.9.0+0" + +[[deps.p7zip_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" +version = "17.4.0+0" + +[[deps.prrte_jll]] +deps = ["Artifacts", "Hwloc_jll", "JLLWrappers", "Libdl", "PMIx_jll", "libevent_jll"] +git-tree-sha1 = "5adb2d7a18a30280feb66cad6f1a1dfdca2dc7b0" +uuid = "eb928a42-fffd-568d-ab9c-3f5d54fc65b9" +version = "3.0.2+0" From 83e4fdd5ada5c895bfa3b0b056d2cbc6361cb098 Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Tue, 23 Apr 2024 15:11:34 -0700 Subject: [PATCH 042/142] Revert "point to latest reopt version" This reverts commit 89e4df610ead0fbc0e7772daad04d21996bd50d1. --- julia_src/Manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index 366432e49..875d0f87e 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -843,7 +843,7 @@ uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" deps = ["ArchGDAL", "CSV", "CoolProp", "DataFrames", "Dates", "DelimitedFiles", "HTTP", "JLD", "JSON", "JuMP", "LinDistFlow", "LinearAlgebra", "Logging", "MathOptInterface", "Requires", "Roots", "Statistics", "TestEnv"] git-tree-sha1 = "b8e663a9f06eb6a1085ff7de981df2a6246b2b91" uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6" -version = "0.45.0" +version = "0.44.0" [[deps.Random]] deps = ["SHA", "Serialization"] From fa3fc02e1fc6596d2af080ac59de4dcfc1e33665 Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Tue, 23 Apr 2024 15:18:32 -0700 Subject: [PATCH 043/142] Update Manifest.toml --- julia_src/Manifest.toml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index 875d0f87e..be3292149 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -839,11 +839,10 @@ uuid = "9abbd945-dff8-562f-b5e8-e1ebf5ef1b79" deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" -[[deps.REopt]] deps = ["ArchGDAL", "CSV", "CoolProp", "DataFrames", "Dates", "DelimitedFiles", "HTTP", "JLD", "JSON", "JuMP", "LinDistFlow", "LinearAlgebra", "Logging", "MathOptInterface", "Requires", "Roots", "Statistics", "TestEnv"] -git-tree-sha1 = "b8e663a9f06eb6a1085ff7de981df2a6246b2b91" +git-tree-sha1 = "d2bbcbb8344f19ed87ee8cb6a196d4ed8415255b" uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6" -version = "0.44.0" +version = "0.45.0" [[deps.Random]] deps = ["SHA", "Serialization"] From 3bc7a3f726644d1eb1e0b8efa95b2233b3b6814f Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Tue, 23 Apr 2024 15:27:24 -0700 Subject: [PATCH 044/142] Update Manifest.toml --- julia_src/Manifest.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index be3292149..d7a4e2047 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -839,6 +839,7 @@ uuid = "9abbd945-dff8-562f-b5e8-e1ebf5ef1b79" deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" +[[deps.REopt]] deps = ["ArchGDAL", "CSV", "CoolProp", "DataFrames", "Dates", "DelimitedFiles", "HTTP", "JLD", "JSON", "JuMP", "LinDistFlow", "LinearAlgebra", "Logging", "MathOptInterface", "Requires", "Roots", "Statistics", "TestEnv"] git-tree-sha1 = "d2bbcbb8344f19ed87ee8cb6a196d4ed8415255b" uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6" From d24100d6135fb98a2cab086ef91ed97580976c94 Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Tue, 23 Apr 2024 15:31:32 -0700 Subject: [PATCH 045/142] hack Statistics into IntervalSets deps in manifest --- julia_src/Manifest.toml | 196 ++++++++++++++++++++++++++++++++-------- 1 file changed, 159 insertions(+), 37 deletions(-) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index d7a4e2047..2db9d406c 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -1,6 +1,6 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.8.5" +julia_version = "1.10.2" manifest_format = "2.0" project_hash = "b3c6037c53375dada9e36c23f668bcd0efac8f34" @@ -11,22 +11,46 @@ uuid = "ae81ac8f-d209-56e5-92de-9978fef736f9" version = "0.1.3+0" [[deps.AbstractFFTs]] -deps = ["ChainRulesCore", "LinearAlgebra", "Test"] +deps = ["LinearAlgebra"] git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef" uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" version = "1.5.0" +weakdeps = ["ChainRulesCore", "Test"] + + [deps.AbstractFFTs.extensions] + AbstractFFTsChainRulesCoreExt = "ChainRulesCore" + AbstractFFTsTestExt = "Test" [[deps.Accessors]] -deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "MacroTools", "Markdown", "Requires", "Test"] +deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "MacroTools", "Markdown", "Test"] git-tree-sha1 = "c0d491ef0b135fd7d63cbc6404286bc633329425" uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" version = "0.1.36" + [deps.Accessors.extensions] + AccessorsAxisKeysExt = "AxisKeys" + AccessorsIntervalSetsExt = "IntervalSets" + AccessorsStaticArraysExt = "StaticArrays" + AccessorsStructArraysExt = "StructArrays" + AccessorsUnitfulExt = "Unitful" + + [deps.Accessors.weakdeps] + AxisKeys = "94b1ba4f-4ee9-5380-92f1-94cde586c3c5" + IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" + Requires = "ae029012-a4dd-5104-9daa-d747884805df" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" + Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" + [[deps.Adapt]] deps = ["LinearAlgebra", "Requires"] git-tree-sha1 = "cea4ac3f5b4bc4b3000aa55afb6e5626518948fa" uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" version = "4.0.3" +weakdeps = ["StaticArrays"] + + [deps.Adapt.extensions] + AdaptStaticArraysExt = "StaticArrays" [[deps.ArchGDAL]] deps = ["CEnum", "ColorTypes", "Dates", "DiskArrays", "Extents", "GDAL", "GDAL_jll", "GeoFormatTypes", "GeoInterface", "GeoInterfaceRecipes", "ImageCore", "Tables"] @@ -109,16 +133,24 @@ uuid = "3830e938-1dd0-5f3e-8b8e-b3ee43226782" version = "0.6000.600+0" [[deps.ChainRulesCore]] -deps = ["Compat", "LinearAlgebra", "SparseArrays"] +deps = ["Compat", "LinearAlgebra"] git-tree-sha1 = "575cd02e080939a33b6df6c5853d14924c08e35b" uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" version = "1.23.0" +weakdeps = ["SparseArrays"] + + [deps.ChainRulesCore.extensions] + ChainRulesCoreSparseArraysExt = "SparseArrays" [[deps.ChangesOfVariables]] -deps = ["InverseFunctions", "LinearAlgebra", "Test"] +deps = ["LinearAlgebra", "Test"] git-tree-sha1 = "2fba81a302a7be671aefe194f0525ef231104e7f" uuid = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" version = "0.1.8" +weakdeps = ["InverseFunctions"] + + [deps.ChangesOfVariables.extensions] + ChangesOfVariablesInverseFunctionsExt = "InverseFunctions" [[deps.Clp_jll]] deps = ["Artifacts", "CoinUtils_jll", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "METIS_jll", "MUMPS_seq_jll", "OpenBLAS32_jll", "Osi_jll", "Pkg"] @@ -174,20 +206,28 @@ uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" version = "0.3.0" [[deps.Compat]] -deps = ["Dates", "LinearAlgebra", "TOML", "UUIDs"] +deps = ["TOML", "UUIDs"] git-tree-sha1 = "c955881e3c981181362ae4088b35995446298b80" uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" version = "4.14.0" +weakdeps = ["Dates", "LinearAlgebra"] + + [deps.Compat.extensions] + CompatLinearAlgebraExt = "LinearAlgebra" [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.0.1+0" +version = "1.1.0+0" [[deps.CompositionsBase]] git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" version = "0.1.2" +weakdeps = ["InverseFunctions"] + + [deps.CompositionsBase.extensions] + CompositionsBaseInverseFunctionsExt = "InverseFunctions" [[deps.ConcurrentUtilities]] deps = ["Serialization", "Sockets"] @@ -200,6 +240,11 @@ deps = ["LinearAlgebra"] git-tree-sha1 = "c53fc348ca4d40d7b371e71fd52251839080cbc9" uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" version = "1.5.4" +weakdeps = ["IntervalSets", "StaticArrays"] + + [deps.ConstructionBase.extensions] + ConstructionBaseIntervalSetsExt = "IntervalSets" + ConstructionBaseStaticArraysExt = "StaticArrays" [[deps.CoolProp]] deps = ["CoolProp_jll", "Markdown", "Unitful"] @@ -246,7 +291,9 @@ uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" [[deps.DelimitedFiles]] deps = ["Mmap"] +git-tree-sha1 = "9e2f36d3c96a820c678f2f1f1782582fcf685bae" uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" +version = "1.9.1" [[deps.DiffResults]] deps = ["StaticArraysCore"] @@ -322,10 +369,14 @@ uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" version = "0.8.4" [[deps.ForwardDiff]] -deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions", "StaticArrays"] +deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] git-tree-sha1 = "cf0fe81336da9fb90944683b8c41984b08793dad" uuid = "f6369f11-7733-5829-9624-2563aa707210" version = "0.10.36" +weakdeps = ["StaticArrays"] + + [deps.ForwardDiff.extensions] + ForwardDiffStaticArraysExt = "StaticArrays" [[deps.Future]] deps = ["Random"] @@ -352,7 +403,7 @@ version = "3.11.2+0" [[deps.GMP_jll]] deps = ["Artifacts", "Libdl"] uuid = "781609d7-10c4-51f6-84f2-b8444358ff6d" -version = "6.2.1+2" +version = "6.2.1+6" [[deps.GeoFormatTypes]] git-tree-sha1 = "59107c179a586f0fe667024c5eb7033e81333271" @@ -396,6 +447,12 @@ git-tree-sha1 = "26407bd1c60129062cec9da63dc7d08251544d53" uuid = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f" version = "0.17.1" + [deps.HDF5.extensions] + MPIExt = "MPI" + + [deps.HDF5.weakdeps] + MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" + [[deps.HDF5_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LLVMOpenMP_jll", "LazyArtifacts", "LibCURL_jll", "Libdl", "MPICH_jll", "MPIPreferences", "MPItrampoline_jll", "MicrosoftMPI_jll", "OpenMPI_jll", "OpenSSL_jll", "TOML", "Zlib_jll", "libaec_jll"] git-tree-sha1 = "38c8874692d48d5440d5752d6c74b0c6b0b60739" @@ -443,10 +500,16 @@ deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" [[deps.IntervalSets]] -deps = ["Random", "RecipesBase", "Statistics"] +deps = ["Statistics"] git-tree-sha1 = "dba9ddf07f77f60450fe5d2e2beb9854d9a49bd0" uuid = "8197267c-284f-5f27-9208-e0e47529a953" version = "0.7.10" +weakdeps = ["Random", "RecipesBase"] + + [deps.IntervalSets.extensions] + IntervalSetsRandomExt = "Random" + IntervalSetsRecipesBaseExt = "RecipesBase" + IntervalSetsStatisticsExt = "Statistics" [[deps.InverseFunctions]] deps = ["Test"] @@ -510,6 +573,12 @@ git-tree-sha1 = "cd161958e8b47f9696a6b03f563afb4e5fe8f703" uuid = "4076af6c-e467-56ae-b986-b466b2749572" version = "1.17.0" + [deps.JuMP.extensions] + JuMPDimensionalDataExt = "DimensionalData" + + [deps.JuMP.weakdeps] + DimensionalData = "0703355e-b756-11e9-17c0-8b28908087d0" + [[deps.LERC_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "bf36f528eec6634efc60d7ec062008f171071434" @@ -523,10 +592,13 @@ uuid = "1d63c593-3942-5779-bab2-d838dc0a180e" version = "15.0.7+0" [[deps.LRUCache]] -deps = ["Serialization"] git-tree-sha1 = "b3cc6698599b10e652832c2f23db3cab99d51b59" uuid = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637" version = "1.6.1" +weakdeps = ["Serialization"] + + [deps.LRUCache.extensions] + SerializationExt = ["Serialization"] [[deps.LaTeXStrings]] git-tree-sha1 = "50901ebc375ed41dbf8058da26f9de442febbbec" @@ -540,21 +612,26 @@ uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" [[deps.LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -version = "0.6.3" +version = "0.6.4" [[deps.LibCURL_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "7.84.0+0" +version = "8.4.0+0" [[deps.LibGit2]] -deps = ["Base64", "NetworkOptions", "Printf", "SHA"] +deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" +[[deps.LibGit2_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] +uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" +version = "1.6.4+0" + [[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" -version = "1.10.2+0" +version = "1.11.0+1" [[deps.Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" @@ -572,7 +649,7 @@ uuid = "bf674bac-ffe4-48d3-9f32-72124ffa9ede" version = "0.1.4" [[deps.LinearAlgebra]] -deps = ["Libdl", "libblastrampoline_jll"] +deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" [[deps.LittleCMS_jll]] @@ -582,10 +659,16 @@ uuid = "d3a379c0-f9a3-5b72-a4c0-6bf4d2e8af0f" version = "2.12.0+0" [[deps.LogExpFunctions]] -deps = ["ChainRulesCore", "ChangesOfVariables", "DocStringExtensions", "InverseFunctions", "IrrationalConstants", "LinearAlgebra"] +deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] git-tree-sha1 = "18144f3e9cbe9b15b070288eef858f71b291ce37" uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" version = "0.3.27" +weakdeps = ["ChainRulesCore", "ChangesOfVariables", "InverseFunctions"] + + [deps.LogExpFunctions.extensions] + LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" + LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" + LogExpFunctionsInverseFunctionsExt = "InverseFunctions" [[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" @@ -662,7 +745,7 @@ version = "1.1.9" [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.0+0" +version = "2.28.2+1" [[deps.MicrosoftMPI_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -687,7 +770,7 @@ version = "0.3.4" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2022.2.1" +version = "2023.1.10" [[deps.MutableArithmetics]] deps = ["LinearAlgebra", "SparseArrays", "Test"] @@ -712,10 +795,13 @@ uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" version = "1.2.0" [[deps.OffsetArrays]] -deps = ["Adapt"] git-tree-sha1 = "6a731f2b5c03157418a20c12195eb4b74c8f8621" uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" version = "1.13.0" +weakdeps = ["Adapt"] + + [deps.OffsetArrays.extensions] + OffsetArraysAdaptExt = "Adapt" [[deps.OpenBLAS32_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] @@ -726,7 +812,7 @@ version = "0.3.17+0" [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.20+0" +version = "0.3.23+4" [[deps.OpenJpeg_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libtiff_jll", "LittleCMS_jll", "Pkg", "libpng_jll"] @@ -737,7 +823,7 @@ version = "2.4.0+0" [[deps.OpenLibm_jll]] deps = ["Artifacts", "Libdl"] uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.1+0" +version = "0.8.1+2" [[deps.OpenMPI_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Hwloc_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "PMIx_jll", "TOML", "Zlib_jll", "libevent_jll", "prrte_jll"] @@ -799,9 +885,9 @@ uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" version = "2.8.1" [[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.8.0" +version = "1.10.0" [[deps.PooledArrays]] deps = ["DataAPI", "Future"] @@ -846,7 +932,7 @@ uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6" version = "0.45.0" [[deps.Random]] -deps = ["SHA", "Serialization"] +deps = ["SHA"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" [[deps.RangeArrays]] @@ -883,6 +969,18 @@ git-tree-sha1 = "6f6481a44ca53367383f15415dc27ab0c7422731" uuid = "f2b01f46-fcfa-551c-844a-d8ac1e96c665" version = "2.1.4" + [deps.Roots.extensions] + RootsForwardDiffExt = "ForwardDiff" + RootsIntervalRootFindingExt = "IntervalRootFinding" + RootsSymPyExt = "SymPy" + RootsSymPyPythonCallExt = "SymPyPythonCall" + + [deps.Roots.weakdeps] + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + IntervalRootFinding = "d2bf35a9-74e0-55ec-b149-d360ff49b807" + SymPy = "24249f21-da20-56a4-8eb1-6a02cf4ae2e6" + SymPyPythonCall = "bc8888f7-b21e-4b7c-a06a-5d9c9496438c" + [[deps.SCIP]] deps = ["Ipopt_jll", "Libdl", "LinearAlgebra", "MathOptInterface", "SCIP_PaPILO_jll", "SCIP_jll"] git-tree-sha1 = "ac0512c46cd91744f62463514f2c581025ea5b93" @@ -941,14 +1039,19 @@ uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" version = "1.2.1" [[deps.SparseArrays]] -deps = ["LinearAlgebra", "Random"] +deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +version = "1.10.0" [[deps.SpecialFunctions]] -deps = ["ChainRulesCore", "IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] git-tree-sha1 = "e2cfc4012a19088254b3950b85c3c1d8882d864d" uuid = "276daf66-3868-5448-9aa4-cd146d93841b" version = "2.3.1" +weakdeps = ["ChainRulesCore"] + + [deps.SpecialFunctions.extensions] + SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" [[deps.StackViews]] deps = ["OffsetArrays"] @@ -957,10 +1060,15 @@ uuid = "cae243ae-269e-4f55-b966-ac2d0dc13c15" version = "0.1.1" [[deps.StaticArrays]] -deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore", "Statistics"] +deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] git-tree-sha1 = "bf074c045d3d5ffd956fa0a461da38a44685d6b2" uuid = "90137ffa-7385-5640-81b9-e52037218182" version = "1.9.3" +weakdeps = ["ChainRulesCore", "Statistics"] + + [deps.StaticArrays.extensions] + StaticArraysChainRulesCoreExt = "ChainRulesCore" + StaticArraysStatisticsExt = "Statistics" [[deps.StaticArraysCore]] git-tree-sha1 = "36b3d696ce6366023a0ea192b4cd442268995a0d" @@ -970,6 +1078,7 @@ version = "1.4.2" [[deps.Statistics]] deps = ["LinearAlgebra", "SparseArrays"] uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" +version = "1.10.0" [[deps.StringManipulation]] deps = ["PrecompileTools"] @@ -977,10 +1086,15 @@ git-tree-sha1 = "a04cabe79c5f01f4d723cc6704070ada0b9d46d5" uuid = "892a3eda-7b42-436c-8928-eab12a02cf0e" version = "0.3.4" +[[deps.SuiteSparse_jll]] +deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] +uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" +version = "7.2.1+1" + [[deps.TOML]] deps = ["Dates"] uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -version = "1.0.0" +version = "1.0.3" [[deps.TableTraits]] deps = ["IteratorInterfaceExtensions"] @@ -997,7 +1111,7 @@ version = "1.11.1" [[deps.Tar]] deps = ["ArgTools", "SHA"] uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" -version = "1.10.1" +version = "1.10.0" [[deps.TensorCore]] deps = ["LinearAlgebra"] @@ -1016,10 +1130,13 @@ uuid = "1e6cf692-eddd-4d53-88a5-2d735e33781b" version = "1.101.1" [[deps.TranscodingStreams]] -deps = ["Random", "Test"] git-tree-sha1 = "3caa21522e7efac1ba21834a03734c57b4611c7e" uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" version = "0.10.4" +weakdeps = ["Random", "Test"] + + [deps.TranscodingStreams.extensions] + TestExt = ["Test", "Random"] [[deps.URIs]] git-tree-sha1 = "67db6cc7b3821e19ebe75791a9dd19c9b1188f2b" @@ -1034,10 +1151,15 @@ uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" [[deps.Unitful]] -deps = ["ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "Random"] +deps = ["Dates", "LinearAlgebra", "Random"] git-tree-sha1 = "3c793be6df9dd77a0cf49d80984ef9ff996948fa" uuid = "1986cc42-f94f-5a68-af5c-568840ba703d" version = "1.19.0" +weakdeps = ["ConstructionBase", "InverseFunctions"] + + [deps.Unitful.extensions] + ConstructionBaseUnitfulExt = "ConstructionBase" + InverseFunctionsUnitfulExt = "InverseFunctions" [[deps.WeakRefStrings]] deps = ["DataAPI", "InlineStrings", "Parsers"] @@ -1059,7 +1181,7 @@ version = "0.16.2" [[deps.Zlib_jll]] deps = ["Libdl"] uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.2.12+3" +version = "1.2.13+1" [[deps.Zstd_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -1086,9 +1208,9 @@ uuid = "477f73a3-ac25-53e9-8cc3-50b2fa2566f0" version = "1.1.2+0" [[deps.libblastrampoline_jll]] -deps = ["Artifacts", "Libdl", "OpenBLAS_jll"] +deps = ["Artifacts", "Libdl"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.1.1+0" +version = "5.8.0+1" [[deps.libevent_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "OpenSSL_jll"] @@ -1111,7 +1233,7 @@ version = "1.6.43+1" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.48.0+0" +version = "1.52.0+1" [[deps.oneTBB_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -1122,7 +1244,7 @@ version = "2021.9.0+0" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.4.0+0" +version = "17.4.0+2" [[deps.prrte_jll]] deps = ["Artifacts", "Hwloc_jll", "JLLWrappers", "Libdl", "PMIx_jll", "libevent_jll"] From 55983c07c2f180bb52df8e39c1ca7045ec5c89f5 Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Tue, 23 Apr 2024 15:38:04 -0700 Subject: [PATCH 046/142] hack Randon and RecipesBase into IntervalSets deps --- julia_src/Manifest.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index 2db9d406c..9010adfc3 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -500,11 +500,10 @@ deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" [[deps.IntervalSets]] -deps = ["Statistics"] +deps = ["Statistics", "Random", "RecipesBase"] git-tree-sha1 = "dba9ddf07f77f60450fe5d2e2beb9854d9a49bd0" uuid = "8197267c-284f-5f27-9208-e0e47529a953" version = "0.7.10" -weakdeps = ["Random", "RecipesBase"] [deps.IntervalSets.extensions] IntervalSetsRandomExt = "Random" From edb37360249943fafd5c8ae966ba97e5a52dcb5e Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Tue, 23 Apr 2024 15:55:57 -0700 Subject: [PATCH 047/142] hack TranscodingStreams deps --- julia_src/Manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index 9010adfc3..4fbf73a28 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -1132,7 +1132,7 @@ version = "1.101.1" git-tree-sha1 = "3caa21522e7efac1ba21834a03734c57b4611c7e" uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" version = "0.10.4" -weakdeps = ["Random", "Test"] +deps = ["Random", "Test"] [deps.TranscodingStreams.extensions] TestExt = ["Test", "Random"] From f2f18a661e1f36fcacc8b9b55f834230b4771723 Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Tue, 23 Apr 2024 19:08:57 -0700 Subject: [PATCH 048/142] hack some more problematic weakdeps --- julia_src/Manifest.toml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index 4fbf73a28..05529bd69 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -11,11 +11,10 @@ uuid = "ae81ac8f-d209-56e5-92de-9978fef736f9" version = "0.1.3+0" [[deps.AbstractFFTs]] -deps = ["LinearAlgebra"] +deps = ["LinearAlgebra", "ChainRulesCore", "Test"] git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef" uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" version = "1.5.0" -weakdeps = ["ChainRulesCore", "Test"] [deps.AbstractFFTs.extensions] AbstractFFTsChainRulesCoreExt = "ChainRulesCore" @@ -133,21 +132,19 @@ uuid = "3830e938-1dd0-5f3e-8b8e-b3ee43226782" version = "0.6000.600+0" [[deps.ChainRulesCore]] -deps = ["Compat", "LinearAlgebra"] +deps = ["Compat", "LinearAlgebra", "SparseArrays"] git-tree-sha1 = "575cd02e080939a33b6df6c5853d14924c08e35b" uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" version = "1.23.0" -weakdeps = ["SparseArrays"] [deps.ChainRulesCore.extensions] ChainRulesCoreSparseArraysExt = "SparseArrays" [[deps.ChangesOfVariables]] -deps = ["LinearAlgebra", "Test"] +deps = ["LinearAlgebra", "Test", "InverseFunctions"] git-tree-sha1 = "2fba81a302a7be671aefe194f0525ef231104e7f" uuid = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" version = "0.1.8" -weakdeps = ["InverseFunctions"] [deps.ChangesOfVariables.extensions] ChangesOfVariablesInverseFunctionsExt = "InverseFunctions" @@ -658,11 +655,10 @@ uuid = "d3a379c0-f9a3-5b72-a4c0-6bf4d2e8af0f" version = "2.12.0+0" [[deps.LogExpFunctions]] -deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] +deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra", "ChainRulesCore", "ChangesOfVariables", "InverseFunctions"] git-tree-sha1 = "18144f3e9cbe9b15b070288eef858f71b291ce37" uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" version = "0.3.27" -weakdeps = ["ChainRulesCore", "ChangesOfVariables", "InverseFunctions"] [deps.LogExpFunctions.extensions] LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" @@ -1150,11 +1146,10 @@ uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" [[deps.Unitful]] -deps = ["Dates", "LinearAlgebra", "Random"] +deps = ["Dates", "LinearAlgebra", "Random", "ConstructionBase", "InverseFunctions"] git-tree-sha1 = "3c793be6df9dd77a0cf49d80984ef9ff996948fa" uuid = "1986cc42-f94f-5a68-af5c-568840ba703d" version = "1.19.0" -weakdeps = ["ConstructionBase", "InverseFunctions"] [deps.Unitful.extensions] ConstructionBaseUnitfulExt = "ConstructionBase" From 80fac0772dcf16cbe37b48d446c6d062e7bf58c0 Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Tue, 23 Apr 2024 19:09:51 -0700 Subject: [PATCH 049/142] Revert "hack some more problematic weakdeps" This reverts commit f2f18a661e1f36fcacc8b9b55f834230b4771723. --- julia_src/Manifest.toml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index 05529bd69..4fbf73a28 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -11,10 +11,11 @@ uuid = "ae81ac8f-d209-56e5-92de-9978fef736f9" version = "0.1.3+0" [[deps.AbstractFFTs]] -deps = ["LinearAlgebra", "ChainRulesCore", "Test"] +deps = ["LinearAlgebra"] git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef" uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" version = "1.5.0" +weakdeps = ["ChainRulesCore", "Test"] [deps.AbstractFFTs.extensions] AbstractFFTsChainRulesCoreExt = "ChainRulesCore" @@ -132,19 +133,21 @@ uuid = "3830e938-1dd0-5f3e-8b8e-b3ee43226782" version = "0.6000.600+0" [[deps.ChainRulesCore]] -deps = ["Compat", "LinearAlgebra", "SparseArrays"] +deps = ["Compat", "LinearAlgebra"] git-tree-sha1 = "575cd02e080939a33b6df6c5853d14924c08e35b" uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" version = "1.23.0" +weakdeps = ["SparseArrays"] [deps.ChainRulesCore.extensions] ChainRulesCoreSparseArraysExt = "SparseArrays" [[deps.ChangesOfVariables]] -deps = ["LinearAlgebra", "Test", "InverseFunctions"] +deps = ["LinearAlgebra", "Test"] git-tree-sha1 = "2fba81a302a7be671aefe194f0525ef231104e7f" uuid = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" version = "0.1.8" +weakdeps = ["InverseFunctions"] [deps.ChangesOfVariables.extensions] ChangesOfVariablesInverseFunctionsExt = "InverseFunctions" @@ -655,10 +658,11 @@ uuid = "d3a379c0-f9a3-5b72-a4c0-6bf4d2e8af0f" version = "2.12.0+0" [[deps.LogExpFunctions]] -deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra", "ChainRulesCore", "ChangesOfVariables", "InverseFunctions"] +deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] git-tree-sha1 = "18144f3e9cbe9b15b070288eef858f71b291ce37" uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" version = "0.3.27" +weakdeps = ["ChainRulesCore", "ChangesOfVariables", "InverseFunctions"] [deps.LogExpFunctions.extensions] LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" @@ -1146,10 +1150,11 @@ uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" [[deps.Unitful]] -deps = ["Dates", "LinearAlgebra", "Random", "ConstructionBase", "InverseFunctions"] +deps = ["Dates", "LinearAlgebra", "Random"] git-tree-sha1 = "3c793be6df9dd77a0cf49d80984ef9ff996948fa" uuid = "1986cc42-f94f-5a68-af5c-568840ba703d" version = "1.19.0" +weakdeps = ["ConstructionBase", "InverseFunctions"] [deps.Unitful.extensions] ConstructionBaseUnitfulExt = "ConstructionBase" From 9e5e7a90df29c8b42c7c082a90b0b15e6e78c79f Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Tue, 23 Apr 2024 19:09:55 -0700 Subject: [PATCH 050/142] Revert "hack TranscodingStreams deps" This reverts commit edb37360249943fafd5c8ae966ba97e5a52dcb5e. --- julia_src/Manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index 4fbf73a28..9010adfc3 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -1132,7 +1132,7 @@ version = "1.101.1" git-tree-sha1 = "3caa21522e7efac1ba21834a03734c57b4611c7e" uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" version = "0.10.4" -deps = ["Random", "Test"] +weakdeps = ["Random", "Test"] [deps.TranscodingStreams.extensions] TestExt = ["Test", "Random"] From c5b75b445fb06c37e9afce0c13d3be682503a455 Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Tue, 23 Apr 2024 19:09:58 -0700 Subject: [PATCH 051/142] Revert "hack Randon and RecipesBase into IntervalSets deps" This reverts commit 55983c07c2f180bb52df8e39c1ca7045ec5c89f5. --- julia_src/Manifest.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index 9010adfc3..2db9d406c 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -500,10 +500,11 @@ deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" [[deps.IntervalSets]] -deps = ["Statistics", "Random", "RecipesBase"] +deps = ["Statistics"] git-tree-sha1 = "dba9ddf07f77f60450fe5d2e2beb9854d9a49bd0" uuid = "8197267c-284f-5f27-9208-e0e47529a953" version = "0.7.10" +weakdeps = ["Random", "RecipesBase"] [deps.IntervalSets.extensions] IntervalSetsRandomExt = "Random" From 143926d2a54b0b8504fe53506262a313069b49a9 Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Tue, 23 Apr 2024 19:10:01 -0700 Subject: [PATCH 052/142] Revert "hack Statistics into IntervalSets deps in manifest" This reverts commit d24100d6135fb98a2cab086ef91ed97580976c94. --- julia_src/Manifest.toml | 196 ++++++++-------------------------------- 1 file changed, 37 insertions(+), 159 deletions(-) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index 2db9d406c..d7a4e2047 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -1,6 +1,6 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.10.2" +julia_version = "1.8.5" manifest_format = "2.0" project_hash = "b3c6037c53375dada9e36c23f668bcd0efac8f34" @@ -11,46 +11,22 @@ uuid = "ae81ac8f-d209-56e5-92de-9978fef736f9" version = "0.1.3+0" [[deps.AbstractFFTs]] -deps = ["LinearAlgebra"] +deps = ["ChainRulesCore", "LinearAlgebra", "Test"] git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef" uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" version = "1.5.0" -weakdeps = ["ChainRulesCore", "Test"] - - [deps.AbstractFFTs.extensions] - AbstractFFTsChainRulesCoreExt = "ChainRulesCore" - AbstractFFTsTestExt = "Test" [[deps.Accessors]] -deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "MacroTools", "Markdown", "Test"] +deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "MacroTools", "Markdown", "Requires", "Test"] git-tree-sha1 = "c0d491ef0b135fd7d63cbc6404286bc633329425" uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" version = "0.1.36" - [deps.Accessors.extensions] - AccessorsAxisKeysExt = "AxisKeys" - AccessorsIntervalSetsExt = "IntervalSets" - AccessorsStaticArraysExt = "StaticArrays" - AccessorsStructArraysExt = "StructArrays" - AccessorsUnitfulExt = "Unitful" - - [deps.Accessors.weakdeps] - AxisKeys = "94b1ba4f-4ee9-5380-92f1-94cde586c3c5" - IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" - Requires = "ae029012-a4dd-5104-9daa-d747884805df" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" - Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" - [[deps.Adapt]] deps = ["LinearAlgebra", "Requires"] git-tree-sha1 = "cea4ac3f5b4bc4b3000aa55afb6e5626518948fa" uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" version = "4.0.3" -weakdeps = ["StaticArrays"] - - [deps.Adapt.extensions] - AdaptStaticArraysExt = "StaticArrays" [[deps.ArchGDAL]] deps = ["CEnum", "ColorTypes", "Dates", "DiskArrays", "Extents", "GDAL", "GDAL_jll", "GeoFormatTypes", "GeoInterface", "GeoInterfaceRecipes", "ImageCore", "Tables"] @@ -133,24 +109,16 @@ uuid = "3830e938-1dd0-5f3e-8b8e-b3ee43226782" version = "0.6000.600+0" [[deps.ChainRulesCore]] -deps = ["Compat", "LinearAlgebra"] +deps = ["Compat", "LinearAlgebra", "SparseArrays"] git-tree-sha1 = "575cd02e080939a33b6df6c5853d14924c08e35b" uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" version = "1.23.0" -weakdeps = ["SparseArrays"] - - [deps.ChainRulesCore.extensions] - ChainRulesCoreSparseArraysExt = "SparseArrays" [[deps.ChangesOfVariables]] -deps = ["LinearAlgebra", "Test"] +deps = ["InverseFunctions", "LinearAlgebra", "Test"] git-tree-sha1 = "2fba81a302a7be671aefe194f0525ef231104e7f" uuid = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" version = "0.1.8" -weakdeps = ["InverseFunctions"] - - [deps.ChangesOfVariables.extensions] - ChangesOfVariablesInverseFunctionsExt = "InverseFunctions" [[deps.Clp_jll]] deps = ["Artifacts", "CoinUtils_jll", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "METIS_jll", "MUMPS_seq_jll", "OpenBLAS32_jll", "Osi_jll", "Pkg"] @@ -206,28 +174,20 @@ uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" version = "0.3.0" [[deps.Compat]] -deps = ["TOML", "UUIDs"] +deps = ["Dates", "LinearAlgebra", "TOML", "UUIDs"] git-tree-sha1 = "c955881e3c981181362ae4088b35995446298b80" uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" version = "4.14.0" -weakdeps = ["Dates", "LinearAlgebra"] - - [deps.Compat.extensions] - CompatLinearAlgebraExt = "LinearAlgebra" [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.1.0+0" +version = "1.0.1+0" [[deps.CompositionsBase]] git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" version = "0.1.2" -weakdeps = ["InverseFunctions"] - - [deps.CompositionsBase.extensions] - CompositionsBaseInverseFunctionsExt = "InverseFunctions" [[deps.ConcurrentUtilities]] deps = ["Serialization", "Sockets"] @@ -240,11 +200,6 @@ deps = ["LinearAlgebra"] git-tree-sha1 = "c53fc348ca4d40d7b371e71fd52251839080cbc9" uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" version = "1.5.4" -weakdeps = ["IntervalSets", "StaticArrays"] - - [deps.ConstructionBase.extensions] - ConstructionBaseIntervalSetsExt = "IntervalSets" - ConstructionBaseStaticArraysExt = "StaticArrays" [[deps.CoolProp]] deps = ["CoolProp_jll", "Markdown", "Unitful"] @@ -291,9 +246,7 @@ uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" [[deps.DelimitedFiles]] deps = ["Mmap"] -git-tree-sha1 = "9e2f36d3c96a820c678f2f1f1782582fcf685bae" uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" -version = "1.9.1" [[deps.DiffResults]] deps = ["StaticArraysCore"] @@ -369,14 +322,10 @@ uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" version = "0.8.4" [[deps.ForwardDiff]] -deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] +deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions", "StaticArrays"] git-tree-sha1 = "cf0fe81336da9fb90944683b8c41984b08793dad" uuid = "f6369f11-7733-5829-9624-2563aa707210" version = "0.10.36" -weakdeps = ["StaticArrays"] - - [deps.ForwardDiff.extensions] - ForwardDiffStaticArraysExt = "StaticArrays" [[deps.Future]] deps = ["Random"] @@ -403,7 +352,7 @@ version = "3.11.2+0" [[deps.GMP_jll]] deps = ["Artifacts", "Libdl"] uuid = "781609d7-10c4-51f6-84f2-b8444358ff6d" -version = "6.2.1+6" +version = "6.2.1+2" [[deps.GeoFormatTypes]] git-tree-sha1 = "59107c179a586f0fe667024c5eb7033e81333271" @@ -447,12 +396,6 @@ git-tree-sha1 = "26407bd1c60129062cec9da63dc7d08251544d53" uuid = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f" version = "0.17.1" - [deps.HDF5.extensions] - MPIExt = "MPI" - - [deps.HDF5.weakdeps] - MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" - [[deps.HDF5_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LLVMOpenMP_jll", "LazyArtifacts", "LibCURL_jll", "Libdl", "MPICH_jll", "MPIPreferences", "MPItrampoline_jll", "MicrosoftMPI_jll", "OpenMPI_jll", "OpenSSL_jll", "TOML", "Zlib_jll", "libaec_jll"] git-tree-sha1 = "38c8874692d48d5440d5752d6c74b0c6b0b60739" @@ -500,16 +443,10 @@ deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" [[deps.IntervalSets]] -deps = ["Statistics"] +deps = ["Random", "RecipesBase", "Statistics"] git-tree-sha1 = "dba9ddf07f77f60450fe5d2e2beb9854d9a49bd0" uuid = "8197267c-284f-5f27-9208-e0e47529a953" version = "0.7.10" -weakdeps = ["Random", "RecipesBase"] - - [deps.IntervalSets.extensions] - IntervalSetsRandomExt = "Random" - IntervalSetsRecipesBaseExt = "RecipesBase" - IntervalSetsStatisticsExt = "Statistics" [[deps.InverseFunctions]] deps = ["Test"] @@ -573,12 +510,6 @@ git-tree-sha1 = "cd161958e8b47f9696a6b03f563afb4e5fe8f703" uuid = "4076af6c-e467-56ae-b986-b466b2749572" version = "1.17.0" - [deps.JuMP.extensions] - JuMPDimensionalDataExt = "DimensionalData" - - [deps.JuMP.weakdeps] - DimensionalData = "0703355e-b756-11e9-17c0-8b28908087d0" - [[deps.LERC_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "bf36f528eec6634efc60d7ec062008f171071434" @@ -592,13 +523,10 @@ uuid = "1d63c593-3942-5779-bab2-d838dc0a180e" version = "15.0.7+0" [[deps.LRUCache]] +deps = ["Serialization"] git-tree-sha1 = "b3cc6698599b10e652832c2f23db3cab99d51b59" uuid = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637" version = "1.6.1" -weakdeps = ["Serialization"] - - [deps.LRUCache.extensions] - SerializationExt = ["Serialization"] [[deps.LaTeXStrings]] git-tree-sha1 = "50901ebc375ed41dbf8058da26f9de442febbbec" @@ -612,26 +540,21 @@ uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" [[deps.LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -version = "0.6.4" +version = "0.6.3" [[deps.LibCURL_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "8.4.0+0" +version = "7.84.0+0" [[deps.LibGit2]] -deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] +deps = ["Base64", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" -[[deps.LibGit2_jll]] -deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] -uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" -version = "1.6.4+0" - [[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" -version = "1.11.0+1" +version = "1.10.2+0" [[deps.Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" @@ -649,7 +572,7 @@ uuid = "bf674bac-ffe4-48d3-9f32-72124ffa9ede" version = "0.1.4" [[deps.LinearAlgebra]] -deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] +deps = ["Libdl", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" [[deps.LittleCMS_jll]] @@ -659,16 +582,10 @@ uuid = "d3a379c0-f9a3-5b72-a4c0-6bf4d2e8af0f" version = "2.12.0+0" [[deps.LogExpFunctions]] -deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] +deps = ["ChainRulesCore", "ChangesOfVariables", "DocStringExtensions", "InverseFunctions", "IrrationalConstants", "LinearAlgebra"] git-tree-sha1 = "18144f3e9cbe9b15b070288eef858f71b291ce37" uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" version = "0.3.27" -weakdeps = ["ChainRulesCore", "ChangesOfVariables", "InverseFunctions"] - - [deps.LogExpFunctions.extensions] - LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" - LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" - LogExpFunctionsInverseFunctionsExt = "InverseFunctions" [[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" @@ -745,7 +662,7 @@ version = "1.1.9" [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.2+1" +version = "2.28.0+0" [[deps.MicrosoftMPI_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -770,7 +687,7 @@ version = "0.3.4" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2023.1.10" +version = "2022.2.1" [[deps.MutableArithmetics]] deps = ["LinearAlgebra", "SparseArrays", "Test"] @@ -795,13 +712,10 @@ uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" version = "1.2.0" [[deps.OffsetArrays]] +deps = ["Adapt"] git-tree-sha1 = "6a731f2b5c03157418a20c12195eb4b74c8f8621" uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" version = "1.13.0" -weakdeps = ["Adapt"] - - [deps.OffsetArrays.extensions] - OffsetArraysAdaptExt = "Adapt" [[deps.OpenBLAS32_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] @@ -812,7 +726,7 @@ version = "0.3.17+0" [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.23+4" +version = "0.3.20+0" [[deps.OpenJpeg_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libtiff_jll", "LittleCMS_jll", "Pkg", "libpng_jll"] @@ -823,7 +737,7 @@ version = "2.4.0+0" [[deps.OpenLibm_jll]] deps = ["Artifacts", "Libdl"] uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.1+2" +version = "0.8.1+0" [[deps.OpenMPI_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Hwloc_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "PMIx_jll", "TOML", "Zlib_jll", "libevent_jll", "prrte_jll"] @@ -885,9 +799,9 @@ uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" version = "2.8.1" [[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.10.0" +version = "1.8.0" [[deps.PooledArrays]] deps = ["DataAPI", "Future"] @@ -932,7 +846,7 @@ uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6" version = "0.45.0" [[deps.Random]] -deps = ["SHA"] +deps = ["SHA", "Serialization"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" [[deps.RangeArrays]] @@ -969,18 +883,6 @@ git-tree-sha1 = "6f6481a44ca53367383f15415dc27ab0c7422731" uuid = "f2b01f46-fcfa-551c-844a-d8ac1e96c665" version = "2.1.4" - [deps.Roots.extensions] - RootsForwardDiffExt = "ForwardDiff" - RootsIntervalRootFindingExt = "IntervalRootFinding" - RootsSymPyExt = "SymPy" - RootsSymPyPythonCallExt = "SymPyPythonCall" - - [deps.Roots.weakdeps] - ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" - IntervalRootFinding = "d2bf35a9-74e0-55ec-b149-d360ff49b807" - SymPy = "24249f21-da20-56a4-8eb1-6a02cf4ae2e6" - SymPyPythonCall = "bc8888f7-b21e-4b7c-a06a-5d9c9496438c" - [[deps.SCIP]] deps = ["Ipopt_jll", "Libdl", "LinearAlgebra", "MathOptInterface", "SCIP_PaPILO_jll", "SCIP_jll"] git-tree-sha1 = "ac0512c46cd91744f62463514f2c581025ea5b93" @@ -1039,19 +941,14 @@ uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" version = "1.2.1" [[deps.SparseArrays]] -deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] +deps = ["LinearAlgebra", "Random"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -version = "1.10.0" [[deps.SpecialFunctions]] -deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +deps = ["ChainRulesCore", "IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] git-tree-sha1 = "e2cfc4012a19088254b3950b85c3c1d8882d864d" uuid = "276daf66-3868-5448-9aa4-cd146d93841b" version = "2.3.1" -weakdeps = ["ChainRulesCore"] - - [deps.SpecialFunctions.extensions] - SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" [[deps.StackViews]] deps = ["OffsetArrays"] @@ -1060,15 +957,10 @@ uuid = "cae243ae-269e-4f55-b966-ac2d0dc13c15" version = "0.1.1" [[deps.StaticArrays]] -deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] +deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore", "Statistics"] git-tree-sha1 = "bf074c045d3d5ffd956fa0a461da38a44685d6b2" uuid = "90137ffa-7385-5640-81b9-e52037218182" version = "1.9.3" -weakdeps = ["ChainRulesCore", "Statistics"] - - [deps.StaticArrays.extensions] - StaticArraysChainRulesCoreExt = "ChainRulesCore" - StaticArraysStatisticsExt = "Statistics" [[deps.StaticArraysCore]] git-tree-sha1 = "36b3d696ce6366023a0ea192b4cd442268995a0d" @@ -1078,7 +970,6 @@ version = "1.4.2" [[deps.Statistics]] deps = ["LinearAlgebra", "SparseArrays"] uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.10.0" [[deps.StringManipulation]] deps = ["PrecompileTools"] @@ -1086,15 +977,10 @@ git-tree-sha1 = "a04cabe79c5f01f4d723cc6704070ada0b9d46d5" uuid = "892a3eda-7b42-436c-8928-eab12a02cf0e" version = "0.3.4" -[[deps.SuiteSparse_jll]] -deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] -uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "7.2.1+1" - [[deps.TOML]] deps = ["Dates"] uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -version = "1.0.3" +version = "1.0.0" [[deps.TableTraits]] deps = ["IteratorInterfaceExtensions"] @@ -1111,7 +997,7 @@ version = "1.11.1" [[deps.Tar]] deps = ["ArgTools", "SHA"] uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" -version = "1.10.0" +version = "1.10.1" [[deps.TensorCore]] deps = ["LinearAlgebra"] @@ -1130,13 +1016,10 @@ uuid = "1e6cf692-eddd-4d53-88a5-2d735e33781b" version = "1.101.1" [[deps.TranscodingStreams]] +deps = ["Random", "Test"] git-tree-sha1 = "3caa21522e7efac1ba21834a03734c57b4611c7e" uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" version = "0.10.4" -weakdeps = ["Random", "Test"] - - [deps.TranscodingStreams.extensions] - TestExt = ["Test", "Random"] [[deps.URIs]] git-tree-sha1 = "67db6cc7b3821e19ebe75791a9dd19c9b1188f2b" @@ -1151,15 +1034,10 @@ uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" [[deps.Unitful]] -deps = ["Dates", "LinearAlgebra", "Random"] +deps = ["ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "Random"] git-tree-sha1 = "3c793be6df9dd77a0cf49d80984ef9ff996948fa" uuid = "1986cc42-f94f-5a68-af5c-568840ba703d" version = "1.19.0" -weakdeps = ["ConstructionBase", "InverseFunctions"] - - [deps.Unitful.extensions] - ConstructionBaseUnitfulExt = "ConstructionBase" - InverseFunctionsUnitfulExt = "InverseFunctions" [[deps.WeakRefStrings]] deps = ["DataAPI", "InlineStrings", "Parsers"] @@ -1181,7 +1059,7 @@ version = "0.16.2" [[deps.Zlib_jll]] deps = ["Libdl"] uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.2.13+1" +version = "1.2.12+3" [[deps.Zstd_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -1208,9 +1086,9 @@ uuid = "477f73a3-ac25-53e9-8cc3-50b2fa2566f0" version = "1.1.2+0" [[deps.libblastrampoline_jll]] -deps = ["Artifacts", "Libdl"] +deps = ["Artifacts", "Libdl", "OpenBLAS_jll"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.8.0+1" +version = "5.1.1+0" [[deps.libevent_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "OpenSSL_jll"] @@ -1233,7 +1111,7 @@ version = "1.6.43+1" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.52.0+1" +version = "1.48.0+0" [[deps.oneTBB_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -1244,7 +1122,7 @@ version = "2021.9.0+0" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.4.0+2" +version = "17.4.0+0" [[deps.prrte_jll]] deps = ["Artifacts", "Hwloc_jll", "JLLWrappers", "Libdl", "PMIx_jll", "libevent_jll"] From a5dc6f938843d230082fa3dd7103f25e5f68c2b4 Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Tue, 23 Apr 2024 19:10:06 -0700 Subject: [PATCH 053/142] Revert "Update Manifest.toml" This reverts commit 3bc7a3f726644d1eb1e0b8efa95b2233b3b6814f. --- julia_src/Manifest.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index d7a4e2047..be3292149 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -839,7 +839,6 @@ uuid = "9abbd945-dff8-562f-b5e8-e1ebf5ef1b79" deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" -[[deps.REopt]] deps = ["ArchGDAL", "CSV", "CoolProp", "DataFrames", "Dates", "DelimitedFiles", "HTTP", "JLD", "JSON", "JuMP", "LinDistFlow", "LinearAlgebra", "Logging", "MathOptInterface", "Requires", "Roots", "Statistics", "TestEnv"] git-tree-sha1 = "d2bbcbb8344f19ed87ee8cb6a196d4ed8415255b" uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6" From ee897e82a1711d11d13a8f023401f69ecb34c4e0 Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Tue, 23 Apr 2024 19:10:09 -0700 Subject: [PATCH 054/142] Revert "Update Manifest.toml" This reverts commit fa3fc02e1fc6596d2af080ac59de4dcfc1e33665. --- julia_src/Manifest.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index be3292149..875d0f87e 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -839,10 +839,11 @@ uuid = "9abbd945-dff8-562f-b5e8-e1ebf5ef1b79" deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" +[[deps.REopt]] deps = ["ArchGDAL", "CSV", "CoolProp", "DataFrames", "Dates", "DelimitedFiles", "HTTP", "JLD", "JSON", "JuMP", "LinDistFlow", "LinearAlgebra", "Logging", "MathOptInterface", "Requires", "Roots", "Statistics", "TestEnv"] -git-tree-sha1 = "d2bbcbb8344f19ed87ee8cb6a196d4ed8415255b" +git-tree-sha1 = "b8e663a9f06eb6a1085ff7de981df2a6246b2b91" uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6" -version = "0.45.0" +version = "0.44.0" [[deps.Random]] deps = ["SHA", "Serialization"] From 0411ab144899deeee15a52eeb0f7f63f210ff2a6 Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Tue, 23 Apr 2024 19:36:34 -0700 Subject: [PATCH 055/142] point to reopt master cause not recognixing change in latest version --- julia_src/Manifest.toml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index 875d0f87e..309da71c6 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -753,9 +753,9 @@ version = "1.4.2" [[deps.OpenSSL_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "60e3045590bd104a16fefb12836c00c0ef8c7f8c" +git-tree-sha1 = "3da7367955dcc5c54c1ba4d402ccdc09a1a3e046" uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" -version = "3.0.13+0" +version = "3.0.13+1" [[deps.OpenSpecFun_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] @@ -841,9 +841,11 @@ uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.REopt]] deps = ["ArchGDAL", "CSV", "CoolProp", "DataFrames", "Dates", "DelimitedFiles", "HTTP", "JLD", "JSON", "JuMP", "LinDistFlow", "LinearAlgebra", "Logging", "MathOptInterface", "Requires", "Roots", "Statistics", "TestEnv"] -git-tree-sha1 = "b8e663a9f06eb6a1085ff7de981df2a6246b2b91" +git-tree-sha1 = "d2bbcbb8344f19ed87ee8cb6a196d4ed8415255b" +repo-rev = "master" +repo-url = "https://github.com/NREL/REopt.jl.git" uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6" -version = "0.44.0" +version = "0.45.0" [[deps.Random]] deps = ["SHA", "Serialization"] From e2fba6a52bb5b3550e4bc97f5d1cb7350a7d70b5 Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Tue, 23 Apr 2024 19:54:55 -0700 Subject: [PATCH 056/142] comment out debug statement --- reoptjl/test/test_job_endpoint.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reoptjl/test/test_job_endpoint.py b/reoptjl/test/test_job_endpoint.py index 82dd143b5..03e876dcc 100644 --- a/reoptjl/test/test_job_endpoint.py +++ b/reoptjl/test/test_job_endpoint.py @@ -227,8 +227,8 @@ def test_superset_input_fields(self): r = json.loads(resp.content) results = r["outputs"] - self.maxDiff = None - self.assertEqual(r, {}) + # self.maxDiff = None + # self.assertEqual(r["messages"], {}) self.assertAlmostEqual(results["Financial"]["npv"], -258533.19, places=-3) assert(resp.status_code==200) From 7e43ef59066290bdf1dfb8314ad34e8b6b70b761 Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Tue, 23 Apr 2024 20:12:14 -0700 Subject: [PATCH 057/142] update julia version in dockerfile --- julia_src/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/julia_src/Dockerfile b/julia_src/Dockerfile index 4b1c675f9..60bb2034c 100644 --- a/julia_src/Dockerfile +++ b/julia_src/Dockerfile @@ -1,4 +1,4 @@ -FROM julia:1.8.5 +FROM julia:1.10.2 # Install NREL root certs for machines running on NREL's network. ARG NREL_ROOT_CERT_URL_ROOT="" From d7f7ffd6fab3c813997dc143543a554c65336ec8 Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Tue, 23 Apr 2024 20:12:48 -0700 Subject: [PATCH 058/142] update julia version in env to 1.10.2 --- julia_src/Manifest.toml | 203 ++++++++++++++++++++++++++++++---------- 1 file changed, 152 insertions(+), 51 deletions(-) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index 309da71c6..149d13314 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -1,6 +1,6 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.8.5" +julia_version = "1.10.2" manifest_format = "2.0" project_hash = "b3c6037c53375dada9e36c23f668bcd0efac8f34" @@ -11,22 +11,36 @@ uuid = "ae81ac8f-d209-56e5-92de-9978fef736f9" version = "0.1.3+0" [[deps.AbstractFFTs]] -deps = ["ChainRulesCore", "LinearAlgebra", "Test"] +deps = ["LinearAlgebra"] git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef" uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" version = "1.5.0" +weakdeps = ["ChainRulesCore", "Test"] + + [deps.AbstractFFTs.extensions] + AbstractFFTsChainRulesCoreExt = "ChainRulesCore" + AbstractFFTsTestExt = "Test" [[deps.Accessors]] -deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "MacroTools", "Markdown", "Requires", "Test"] +deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "MacroTools", "Markdown", "Test"] git-tree-sha1 = "c0d491ef0b135fd7d63cbc6404286bc633329425" uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" version = "0.1.36" -[[deps.Adapt]] -deps = ["LinearAlgebra", "Requires"] -git-tree-sha1 = "cea4ac3f5b4bc4b3000aa55afb6e5626518948fa" -uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" -version = "4.0.3" + [deps.Accessors.extensions] + AccessorsAxisKeysExt = "AxisKeys" + AccessorsIntervalSetsExt = "IntervalSets" + AccessorsStaticArraysExt = "StaticArrays" + AccessorsStructArraysExt = "StructArrays" + AccessorsUnitfulExt = "Unitful" + + [deps.Accessors.weakdeps] + AxisKeys = "94b1ba4f-4ee9-5380-92f1-94cde586c3c5" + IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" + Requires = "ae029012-a4dd-5104-9daa-d747884805df" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" + Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" [[deps.ArchGDAL]] deps = ["CEnum", "ColorTypes", "Dates", "DiskArrays", "Extents", "GDAL", "GDAL_jll", "GeoFormatTypes", "GeoInterface", "GeoInterfaceRecipes", "ImageCore", "Tables"] @@ -109,16 +123,14 @@ uuid = "3830e938-1dd0-5f3e-8b8e-b3ee43226782" version = "0.6000.600+0" [[deps.ChainRulesCore]] -deps = ["Compat", "LinearAlgebra", "SparseArrays"] +deps = ["Compat", "LinearAlgebra"] git-tree-sha1 = "575cd02e080939a33b6df6c5853d14924c08e35b" uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" version = "1.23.0" +weakdeps = ["SparseArrays"] -[[deps.ChangesOfVariables]] -deps = ["InverseFunctions", "LinearAlgebra", "Test"] -git-tree-sha1 = "2fba81a302a7be671aefe194f0525ef231104e7f" -uuid = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" -version = "0.1.8" + [deps.ChainRulesCore.extensions] + ChainRulesCoreSparseArraysExt = "SparseArrays" [[deps.Clp_jll]] deps = ["Artifacts", "CoinUtils_jll", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "METIS_jll", "MUMPS_seq_jll", "OpenBLAS32_jll", "Osi_jll", "Pkg"] @@ -174,20 +186,28 @@ uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" version = "0.3.0" [[deps.Compat]] -deps = ["Dates", "LinearAlgebra", "TOML", "UUIDs"] +deps = ["TOML", "UUIDs"] git-tree-sha1 = "c955881e3c981181362ae4088b35995446298b80" uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" version = "4.14.0" +weakdeps = ["Dates", "LinearAlgebra"] + + [deps.Compat.extensions] + CompatLinearAlgebraExt = "LinearAlgebra" [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.0.1+0" +version = "1.1.0+0" [[deps.CompositionsBase]] git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" version = "0.1.2" +weakdeps = ["InverseFunctions"] + + [deps.CompositionsBase.extensions] + CompositionsBaseInverseFunctionsExt = "InverseFunctions" [[deps.ConcurrentUtilities]] deps = ["Serialization", "Sockets"] @@ -201,6 +221,14 @@ git-tree-sha1 = "c53fc348ca4d40d7b371e71fd52251839080cbc9" uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" version = "1.5.4" + [deps.ConstructionBase.extensions] + ConstructionBaseIntervalSetsExt = "IntervalSets" + ConstructionBaseStaticArraysExt = "StaticArrays" + + [deps.ConstructionBase.weakdeps] + IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + [[deps.CoolProp]] deps = ["CoolProp_jll", "Markdown", "Unitful"] git-tree-sha1 = "94062163b5656b1351f7f7a784341b8fe13c1ca1" @@ -246,7 +274,9 @@ uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" [[deps.DelimitedFiles]] deps = ["Mmap"] +git-tree-sha1 = "9e2f36d3c96a820c678f2f1f1782582fcf685bae" uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" +version = "1.9.1" [[deps.DiffResults]] deps = ["StaticArraysCore"] @@ -322,11 +352,17 @@ uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" version = "0.8.4" [[deps.ForwardDiff]] -deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions", "StaticArrays"] +deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] git-tree-sha1 = "cf0fe81336da9fb90944683b8c41984b08793dad" uuid = "f6369f11-7733-5829-9624-2563aa707210" version = "0.10.36" + [deps.ForwardDiff.extensions] + ForwardDiffStaticArraysExt = "StaticArrays" + + [deps.ForwardDiff.weakdeps] + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + [[deps.Future]] deps = ["Random"] uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" @@ -352,7 +388,7 @@ version = "3.11.2+0" [[deps.GMP_jll]] deps = ["Artifacts", "Libdl"] uuid = "781609d7-10c4-51f6-84f2-b8444358ff6d" -version = "6.2.1+2" +version = "6.2.1+6" [[deps.GeoFormatTypes]] git-tree-sha1 = "59107c179a586f0fe667024c5eb7033e81333271" @@ -396,6 +432,12 @@ git-tree-sha1 = "26407bd1c60129062cec9da63dc7d08251544d53" uuid = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f" version = "0.17.1" + [deps.HDF5.extensions] + MPIExt = "MPI" + + [deps.HDF5.weakdeps] + MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" + [[deps.HDF5_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LLVMOpenMP_jll", "LazyArtifacts", "LibCURL_jll", "Libdl", "MPICH_jll", "MPIPreferences", "MPItrampoline_jll", "MicrosoftMPI_jll", "OpenMPI_jll", "OpenSSL_jll", "TOML", "Zlib_jll", "libaec_jll"] git-tree-sha1 = "38c8874692d48d5440d5752d6c74b0c6b0b60739" @@ -443,10 +485,15 @@ deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" [[deps.IntervalSets]] -deps = ["Random", "RecipesBase", "Statistics"] git-tree-sha1 = "dba9ddf07f77f60450fe5d2e2beb9854d9a49bd0" uuid = "8197267c-284f-5f27-9208-e0e47529a953" version = "0.7.10" +weakdeps = ["Random", "RecipesBase", "Statistics"] + + [deps.IntervalSets.extensions] + IntervalSetsRandomExt = "Random" + IntervalSetsRecipesBaseExt = "RecipesBase" + IntervalSetsStatisticsExt = "Statistics" [[deps.InverseFunctions]] deps = ["Test"] @@ -510,6 +557,12 @@ git-tree-sha1 = "cd161958e8b47f9696a6b03f563afb4e5fe8f703" uuid = "4076af6c-e467-56ae-b986-b466b2749572" version = "1.17.0" + [deps.JuMP.extensions] + JuMPDimensionalDataExt = "DimensionalData" + + [deps.JuMP.weakdeps] + DimensionalData = "0703355e-b756-11e9-17c0-8b28908087d0" + [[deps.LERC_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "bf36f528eec6634efc60d7ec062008f171071434" @@ -523,10 +576,13 @@ uuid = "1d63c593-3942-5779-bab2-d838dc0a180e" version = "15.0.7+0" [[deps.LRUCache]] -deps = ["Serialization"] git-tree-sha1 = "b3cc6698599b10e652832c2f23db3cab99d51b59" uuid = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637" version = "1.6.1" +weakdeps = ["Serialization"] + + [deps.LRUCache.extensions] + SerializationExt = ["Serialization"] [[deps.LaTeXStrings]] git-tree-sha1 = "50901ebc375ed41dbf8058da26f9de442febbbec" @@ -540,21 +596,26 @@ uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" [[deps.LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -version = "0.6.3" +version = "0.6.4" [[deps.LibCURL_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "7.84.0+0" +version = "8.4.0+0" [[deps.LibGit2]] -deps = ["Base64", "NetworkOptions", "Printf", "SHA"] +deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" +[[deps.LibGit2_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] +uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" +version = "1.6.4+0" + [[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" -version = "1.10.2+0" +version = "1.11.0+1" [[deps.Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" @@ -572,7 +633,7 @@ uuid = "bf674bac-ffe4-48d3-9f32-72124ffa9ede" version = "0.1.4" [[deps.LinearAlgebra]] -deps = ["Libdl", "libblastrampoline_jll"] +deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" [[deps.LittleCMS_jll]] @@ -582,11 +643,21 @@ uuid = "d3a379c0-f9a3-5b72-a4c0-6bf4d2e8af0f" version = "2.12.0+0" [[deps.LogExpFunctions]] -deps = ["ChainRulesCore", "ChangesOfVariables", "DocStringExtensions", "InverseFunctions", "IrrationalConstants", "LinearAlgebra"] +deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] git-tree-sha1 = "18144f3e9cbe9b15b070288eef858f71b291ce37" uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" version = "0.3.27" + [deps.LogExpFunctions.extensions] + LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" + LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" + LogExpFunctionsInverseFunctionsExt = "InverseFunctions" + + [deps.LogExpFunctions.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + ChangesOfVariables = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" + InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" + [[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" @@ -662,7 +733,7 @@ version = "1.1.9" [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.0+0" +version = "2.28.2+1" [[deps.MicrosoftMPI_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -687,7 +758,7 @@ version = "0.3.4" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2022.2.1" +version = "2023.1.10" [[deps.MutableArithmetics]] deps = ["LinearAlgebra", "SparseArrays", "Test"] @@ -712,11 +783,16 @@ uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" version = "1.2.0" [[deps.OffsetArrays]] -deps = ["Adapt"] git-tree-sha1 = "6a731f2b5c03157418a20c12195eb4b74c8f8621" uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" version = "1.13.0" + [deps.OffsetArrays.extensions] + OffsetArraysAdaptExt = "Adapt" + + [deps.OffsetArrays.weakdeps] + Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" + [[deps.OpenBLAS32_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "9c6c2ed4b7acd2137b878eb96c68e63b76199d0f" @@ -726,7 +802,7 @@ version = "0.3.17+0" [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.20+0" +version = "0.3.23+4" [[deps.OpenJpeg_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libtiff_jll", "LittleCMS_jll", "Pkg", "libpng_jll"] @@ -737,7 +813,7 @@ version = "2.4.0+0" [[deps.OpenLibm_jll]] deps = ["Artifacts", "Libdl"] uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.1+0" +version = "0.8.1+2" [[deps.OpenMPI_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Hwloc_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "PMIx_jll", "TOML", "Zlib_jll", "libevent_jll", "prrte_jll"] @@ -799,9 +875,9 @@ uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" version = "2.8.1" [[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.8.0" +version = "1.10.0" [[deps.PooledArrays]] deps = ["DataAPI", "Future"] @@ -848,7 +924,7 @@ uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6" version = "0.45.0" [[deps.Random]] -deps = ["SHA", "Serialization"] +deps = ["SHA"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" [[deps.RangeArrays]] @@ -885,6 +961,18 @@ git-tree-sha1 = "6f6481a44ca53367383f15415dc27ab0c7422731" uuid = "f2b01f46-fcfa-551c-844a-d8ac1e96c665" version = "2.1.4" + [deps.Roots.extensions] + RootsForwardDiffExt = "ForwardDiff" + RootsIntervalRootFindingExt = "IntervalRootFinding" + RootsSymPyExt = "SymPy" + RootsSymPyPythonCallExt = "SymPyPythonCall" + + [deps.Roots.weakdeps] + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + IntervalRootFinding = "d2bf35a9-74e0-55ec-b149-d360ff49b807" + SymPy = "24249f21-da20-56a4-8eb1-6a02cf4ae2e6" + SymPyPythonCall = "bc8888f7-b21e-4b7c-a06a-5d9c9496438c" + [[deps.SCIP]] deps = ["Ipopt_jll", "Libdl", "LinearAlgebra", "MathOptInterface", "SCIP_PaPILO_jll", "SCIP_jll"] git-tree-sha1 = "ac0512c46cd91744f62463514f2c581025ea5b93" @@ -943,14 +1031,19 @@ uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" version = "1.2.1" [[deps.SparseArrays]] -deps = ["LinearAlgebra", "Random"] +deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +version = "1.10.0" [[deps.SpecialFunctions]] -deps = ["ChainRulesCore", "IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] git-tree-sha1 = "e2cfc4012a19088254b3950b85c3c1d8882d864d" uuid = "276daf66-3868-5448-9aa4-cd146d93841b" version = "2.3.1" +weakdeps = ["ChainRulesCore"] + + [deps.SpecialFunctions.extensions] + SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" [[deps.StackViews]] deps = ["OffsetArrays"] @@ -958,12 +1051,6 @@ git-tree-sha1 = "46e589465204cd0c08b4bd97385e4fa79a0c770c" uuid = "cae243ae-269e-4f55-b966-ac2d0dc13c15" version = "0.1.1" -[[deps.StaticArrays]] -deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore", "Statistics"] -git-tree-sha1 = "bf074c045d3d5ffd956fa0a461da38a44685d6b2" -uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.9.3" - [[deps.StaticArraysCore]] git-tree-sha1 = "36b3d696ce6366023a0ea192b4cd442268995a0d" uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" @@ -972,6 +1059,7 @@ version = "1.4.2" [[deps.Statistics]] deps = ["LinearAlgebra", "SparseArrays"] uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" +version = "1.10.0" [[deps.StringManipulation]] deps = ["PrecompileTools"] @@ -979,10 +1067,15 @@ git-tree-sha1 = "a04cabe79c5f01f4d723cc6704070ada0b9d46d5" uuid = "892a3eda-7b42-436c-8928-eab12a02cf0e" version = "0.3.4" +[[deps.SuiteSparse_jll]] +deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] +uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" +version = "7.2.1+1" + [[deps.TOML]] deps = ["Dates"] uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -version = "1.0.0" +version = "1.0.3" [[deps.TableTraits]] deps = ["IteratorInterfaceExtensions"] @@ -999,7 +1092,7 @@ version = "1.11.1" [[deps.Tar]] deps = ["ArgTools", "SHA"] uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" -version = "1.10.1" +version = "1.10.0" [[deps.TensorCore]] deps = ["LinearAlgebra"] @@ -1018,10 +1111,13 @@ uuid = "1e6cf692-eddd-4d53-88a5-2d735e33781b" version = "1.101.1" [[deps.TranscodingStreams]] -deps = ["Random", "Test"] git-tree-sha1 = "3caa21522e7efac1ba21834a03734c57b4611c7e" uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" version = "0.10.4" +weakdeps = ["Random", "Test"] + + [deps.TranscodingStreams.extensions] + TestExt = ["Test", "Random"] [[deps.URIs]] git-tree-sha1 = "67db6cc7b3821e19ebe75791a9dd19c9b1188f2b" @@ -1036,10 +1132,15 @@ uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" [[deps.Unitful]] -deps = ["ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "Random"] +deps = ["Dates", "LinearAlgebra", "Random"] git-tree-sha1 = "3c793be6df9dd77a0cf49d80984ef9ff996948fa" uuid = "1986cc42-f94f-5a68-af5c-568840ba703d" version = "1.19.0" +weakdeps = ["ConstructionBase", "InverseFunctions"] + + [deps.Unitful.extensions] + ConstructionBaseUnitfulExt = "ConstructionBase" + InverseFunctionsUnitfulExt = "InverseFunctions" [[deps.WeakRefStrings]] deps = ["DataAPI", "InlineStrings", "Parsers"] @@ -1061,7 +1162,7 @@ version = "0.16.2" [[deps.Zlib_jll]] deps = ["Libdl"] uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.2.12+3" +version = "1.2.13+1" [[deps.Zstd_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -1088,9 +1189,9 @@ uuid = "477f73a3-ac25-53e9-8cc3-50b2fa2566f0" version = "1.1.2+0" [[deps.libblastrampoline_jll]] -deps = ["Artifacts", "Libdl", "OpenBLAS_jll"] +deps = ["Artifacts", "Libdl"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.1.1+0" +version = "5.8.0+1" [[deps.libevent_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "OpenSSL_jll"] @@ -1113,7 +1214,7 @@ version = "1.6.43+1" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.48.0+0" +version = "1.52.0+1" [[deps.oneTBB_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -1124,7 +1225,7 @@ version = "2021.9.0+0" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.4.0+0" +version = "17.4.0+2" [[deps.prrte_jll]] deps = ["Artifacts", "Hwloc_jll", "JLLWrappers", "Libdl", "PMIx_jll", "libevent_jll"] From 86743c531e7f5a96601b2be82cdba58ba0ddcf6e Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Tue, 23 Apr 2024 20:13:54 -0700 Subject: [PATCH 059/142] try pointing to reopt latest again --- julia_src/Manifest.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index 149d13314..204307475 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -918,8 +918,6 @@ uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.REopt]] deps = ["ArchGDAL", "CSV", "CoolProp", "DataFrames", "Dates", "DelimitedFiles", "HTTP", "JLD", "JSON", "JuMP", "LinDistFlow", "LinearAlgebra", "Logging", "MathOptInterface", "Requires", "Roots", "Statistics", "TestEnv"] git-tree-sha1 = "d2bbcbb8344f19ed87ee8cb6a196d4ed8415255b" -repo-rev = "master" -repo-url = "https://github.com/NREL/REopt.jl.git" uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6" version = "0.45.0" From dd8fc72c66e9281c61cb947d20ce726835afce5f Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Wed, 24 Apr 2024 12:36:59 -0600 Subject: [PATCH 060/142] uncomment tests --- reoptjl/test/test_http_endpoints.py | 706 ++++++++++++++-------------- reoptjl/test/test_job_endpoint.py | 511 ++++++++++---------- reoptjl/test/test_validator.py | 631 +++++++++++++------------ 3 files changed, 922 insertions(+), 926 deletions(-) diff --git a/reoptjl/test/test_http_endpoints.py b/reoptjl/test/test_http_endpoints.py index b0f3882ed..b8dca3fbd 100644 --- a/reoptjl/test/test_http_endpoints.py +++ b/reoptjl/test/test_http_endpoints.py @@ -10,372 +10,372 @@ class TestHTTPEndpoints(ResourceTestCaseMixin, TestCase): def test_chp_defaults(self): - self.assertTrue(True) - # inputs = {"hot_water_or_steam": "hot_water", - # "avg_boiler_fuel_load_mmbtu_per_hour": 28.0 - # } - - # # Direct call of the http.jl endpoint /chp_defaults - # julia_host = os.environ.get('JULIA_HOST', "julia") - # response = requests.get("http://" + julia_host + ":8081/chp_defaults/", json=inputs) - # http_response = response.json() - - # # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint - # resp = self.api_client.get(f'/v3/chp_defaults', data=inputs) - # view_response = json.loads(resp.content) - - # mismatch = [] - # for k, v in http_response["default_inputs"].items(): - # if v != view_response["default_inputs"][k]: - # mismatch.append(k) + + inputs = {"hot_water_or_steam": "hot_water", + "avg_boiler_fuel_load_mmbtu_per_hour": 28.0 + } + + # Direct call of the http.jl endpoint /chp_defaults + julia_host = os.environ.get('JULIA_HOST', "julia") + response = requests.get("http://" + julia_host + ":8081/chp_defaults/", json=inputs) + http_response = response.json() + + # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint + resp = self.api_client.get(f'/v3/chp_defaults', data=inputs) + view_response = json.loads(resp.content) + + mismatch = [] + for k, v in http_response["default_inputs"].items(): + if v != view_response["default_inputs"][k]: + mismatch.append(k) - # self.assertEqual(mismatch, []) - - # # Check the endpoint logic with the expected selection - # self.assertEqual(http_response["prime_mover"], "combustion_turbine") - # self.assertEqual(http_response["size_class"], 2) - # self.assertGreater(http_response["chp_elec_size_heuristic_kw"], 3500.0) - # self.assertEqual(http_response["default_inputs"]["federal_itc_fraction"], 0.3) - - # inputs = { - # "prime_mover": "micro_turbine", - # "avg_electric_load_kw": 885.0247784246575, - # "max_electric_load_kw": 1427.334, - # "is_electric_only": "true" - # } - - # # Direct call of the http.jl endpoint /chp_defaults - # julia_host = os.environ.get('JULIA_HOST', "julia") - # response = requests.get("http://" + julia_host + ":8081/chp_defaults/", json=inputs) - # http_response = response.json() - - # # Check the endpoint logic with the expected selection - # self.assertEqual(http_response["default_inputs"]["federal_itc_fraction"], 0.3) - - # inputs = { - # "prime_mover": "combustion_turbine", - # "size_class": 4, - # "is_electric_only": "true", - # "avg_electric_load_kw": 885.0247784246575, - # "max_electric_load_kw": 1427.334 - # } - - # # Direct call of the http.jl endpoint /chp_defaults - # julia_host = os.environ.get('JULIA_HOST', "julia") - # response = requests.get("http://" + julia_host + ":8081/chp_defaults/", json=inputs) - # http_response = response.json() - - # # Check the endpoint logic with the expected selection - # self.assertEqual(http_response["default_inputs"]["federal_itc_fraction"], 0.0) - - # inputs = { - # "prime_mover": "recip_engine", - # "size_class": 4, - # "is_electric_only": "true", - # "avg_electric_load_kw": 885.0247784246575, - # "max_electric_load_kw": 1427.334 - # } - - # # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint - # resp = self.api_client.get(f'/v3/chp_defaults', data=inputs) - # view_response = json.loads(resp.content) - - # # Check the endpoint logic with the expected selection - # self.assertEqual(http_response["default_inputs"]["federal_itc_fraction"], 0.0) + self.assertEqual(mismatch, []) + + # Check the endpoint logic with the expected selection + self.assertEqual(http_response["prime_mover"], "combustion_turbine") + self.assertEqual(http_response["size_class"], 2) + self.assertGreater(http_response["chp_elec_size_heuristic_kw"], 3500.0) + self.assertEqual(http_response["default_inputs"]["federal_itc_fraction"], 0.3) + + inputs = { + "prime_mover": "micro_turbine", + "avg_electric_load_kw": 885.0247784246575, + "max_electric_load_kw": 1427.334, + "is_electric_only": "true" + } + + # Direct call of the http.jl endpoint /chp_defaults + julia_host = os.environ.get('JULIA_HOST', "julia") + response = requests.get("http://" + julia_host + ":8081/chp_defaults/", json=inputs) + http_response = response.json() + + # Check the endpoint logic with the expected selection + self.assertEqual(http_response["default_inputs"]["federal_itc_fraction"], 0.3) + + inputs = { + "prime_mover": "combustion_turbine", + "size_class": 4, + "is_electric_only": "true", + "avg_electric_load_kw": 885.0247784246575, + "max_electric_load_kw": 1427.334 + } + + # Direct call of the http.jl endpoint /chp_defaults + julia_host = os.environ.get('JULIA_HOST', "julia") + response = requests.get("http://" + julia_host + ":8081/chp_defaults/", json=inputs) + http_response = response.json() + + # Check the endpoint logic with the expected selection + self.assertEqual(http_response["default_inputs"]["federal_itc_fraction"], 0.0) + + inputs = { + "prime_mover": "recip_engine", + "size_class": 4, + "is_electric_only": "true", + "avg_electric_load_kw": 885.0247784246575, + "max_electric_load_kw": 1427.334 + } + + # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint + resp = self.api_client.get(f'/v3/chp_defaults', data=inputs) + view_response = json.loads(resp.content) + + # Check the endpoint logic with the expected selection + self.assertEqual(http_response["default_inputs"]["federal_itc_fraction"], 0.0) - # def test_steamturbine_defaults(self): - - # inputs = { - # "prime_mover": "steam_turbine", - # "avg_boiler_fuel_load_mmbtu_per_hour": 28.0 - # } - - # # Direct call of the http.jl endpoint /chp_defaults - # julia_host = os.environ.get('JULIA_HOST', "julia") - # response = requests.get("http://" + julia_host + ":8081/chp_defaults/", json=inputs) - # http_response = response.json() - - # # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint - # resp = self.api_client.get(f'/v3/chp_defaults', data=inputs) - # view_response = json.loads(resp.content) - - # mismatch = [] - # for k, v in http_response["default_inputs"].items(): - # if v != view_response["default_inputs"][k]: - # mismatch.append(k) + def test_steamturbine_defaults(self): + + inputs = { + "prime_mover": "steam_turbine", + "avg_boiler_fuel_load_mmbtu_per_hour": 28.0 + } + + # Direct call of the http.jl endpoint /chp_defaults + julia_host = os.environ.get('JULIA_HOST', "julia") + response = requests.get("http://" + julia_host + ":8081/chp_defaults/", json=inputs) + http_response = response.json() + + # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint + resp = self.api_client.get(f'/v3/chp_defaults', data=inputs) + view_response = json.loads(resp.content) + + mismatch = [] + for k, v in http_response["default_inputs"].items(): + if v != view_response["default_inputs"][k]: + mismatch.append(k) - # self.assertEqual(mismatch, []) + self.assertEqual(mismatch, []) - # # Check the endpoint logic with the expected selection - # self.assertEqual(http_response["prime_mover"], "steam_turbine") - # self.assertEqual(http_response["size_class"], 1) - # self.assertGreater(http_response["chp_elec_size_heuristic_kw"], 574.419) + # Check the endpoint logic with the expected selection + self.assertEqual(http_response["prime_mover"], "steam_turbine") + self.assertEqual(http_response["size_class"], 1) + self.assertGreater(http_response["chp_elec_size_heuristic_kw"], 574.419) - # def test_absorption_chiller_defaults(self): + def test_absorption_chiller_defaults(self): - # inputs = {"thermal_consumption_hot_water_or_steam": "hot_water", - # "load_max_tons": 50 - # } + inputs = {"thermal_consumption_hot_water_or_steam": "hot_water", + "load_max_tons": 50 + } - # # Direct call of the http.jl endpoint /absorption_chiller_defaults - # julia_host = os.environ.get('JULIA_HOST', "julia") - # response = requests.get("http://" + julia_host + ":8081/absorption_chiller_defaults/", json=inputs) - # http_response = response.json() + # Direct call of the http.jl endpoint /absorption_chiller_defaults + julia_host = os.environ.get('JULIA_HOST', "julia") + response = requests.get("http://" + julia_host + ":8081/absorption_chiller_defaults/", json=inputs) + http_response = response.json() - # # Call to the django view endpoint /absorption_chiller_defaults which calls the http.jl endpoint - # resp = self.api_client.get(f'/v3/absorption_chiller_defaults', data=inputs) - # view_response = json.loads(resp.content) + # Call to the django view endpoint /absorption_chiller_defaults which calls the http.jl endpoint + resp = self.api_client.get(f'/v3/absorption_chiller_defaults', data=inputs) + view_response = json.loads(resp.content) - # mismatch = [] - # for k, v in http_response["default_inputs"].items(): - # if v != view_response["default_inputs"][k]: - # mismatch.append(k) + mismatch = [] + for k, v in http_response["default_inputs"].items(): + if v != view_response["default_inputs"][k]: + mismatch.append(k) - # self.assertEqual(mismatch, []) - - # # Check the endpoint logic with the expected selection - # self.assertEqual(http_response["thermal_consumption_hot_water_or_steam"], "hot_water") - # self.assertEqual(http_response["default_inputs"]["om_cost_per_ton"], 80.0) - # self.assertEqual(http_response["default_inputs"]["installed_cost_per_ton"], 3066.0) - # self.assertEqual(http_response["default_inputs"]["cop_thermal"], 0.74) - # self.assertNotIn("thermal_consumption_hot_water_or_steam", http_response["default_inputs"].keys()) + self.assertEqual(mismatch, []) + + # Check the endpoint logic with the expected selection + self.assertEqual(http_response["thermal_consumption_hot_water_or_steam"], "hot_water") + self.assertEqual(http_response["default_inputs"]["om_cost_per_ton"], 80.0) + self.assertEqual(http_response["default_inputs"]["installed_cost_per_ton"], 3066.0) + self.assertEqual(http_response["default_inputs"]["cop_thermal"], 0.74) + self.assertNotIn("thermal_consumption_hot_water_or_steam", http_response["default_inputs"].keys()) - # def test_simulated_load(self): - - # # Test heating load because REopt.jl separates SpaceHeating and DHW, so had to aggregate for this endpoint - # inputs = {"load_type": "heating", - # "doe_reference_name": "Hospital", - # "latitude": 36.12, - # "longitude": -115.5 - # } - - # # The /v3/simulated_load endpoint calls the http.jl /simulated_load endpoint - # response = self.api_client.get(f'/v3/simulated_load', data=inputs) - # http_response = json.loads(response.content) - - # # Call to the v2 /simulated_load to check for consistency - # resp = self.api_client.get(f'/v2/simulated_load', data=inputs) - # v2_response = json.loads(resp.content) - # self.assertAlmostEqual(http_response["annual_mmbtu"], v2_response["annual_mmbtu"], delta=1.0) - - # # Test blended/hybrid buildings - # inputs["load_type"] = "electric" - # inputs["annual_kwh"] = 1.5E7 - # inputs["doe_reference_name[0]"] = "Hospital" - # inputs["doe_reference_name[1]"] = "LargeOffice" - # inputs["percent_share[0]"] = 25.0 - # inputs["percent_share[1]"] = 100.0 - inputs["percent_share[0]"] + def test_simulated_load(self): + + # Test heating load because REopt.jl separates SpaceHeating and DHW, so had to aggregate for this endpoint + inputs = {"load_type": "heating", + "doe_reference_name": "Hospital", + "latitude": 36.12, + "longitude": -115.5 + } + + # The /v3/simulated_load endpoint calls the http.jl /simulated_load endpoint + response = self.api_client.get(f'/v3/simulated_load', data=inputs) + http_response = json.loads(response.content) + + # Call to the v2 /simulated_load to check for consistency + resp = self.api_client.get(f'/v2/simulated_load', data=inputs) + v2_response = json.loads(resp.content) + self.assertAlmostEqual(http_response["annual_mmbtu"], v2_response["annual_mmbtu"], delta=1.0) + + # Test blended/hybrid buildings + inputs["load_type"] = "electric" + inputs["annual_kwh"] = 1.5E7 + inputs["doe_reference_name[0]"] = "Hospital" + inputs["doe_reference_name[1]"] = "LargeOffice" + inputs["percent_share[0]"] = 25.0 + inputs["percent_share[1]"] = 100.0 - inputs["percent_share[0]"] - # # The /v3/simulated_load endpoint calls the http.jl /simulated_load endpoint - # response = self.api_client.get(f'/v3/simulated_load', data=inputs) - # http_response = json.loads(response.content) - - # # Call to the v2 /simulated_load to check for consistency - # resp = self.api_client.get(f'/v2/simulated_load', data=inputs) - # v2_response = json.loads(resp.content) - # self.assertAlmostEqual(http_response["annual_kwh"], v2_response["annual_kwh"], delta=1.0) - - # # Test bad inputs - # inputs["invalid_key"] = "invalid_val" - # resp = self.api_client.get(f'/v2/simulated_load', data=inputs) - # v2_response = json.loads(resp.content) - # assert("Error" in v2_response.keys()) - - # def test_avert_emissions_profile_endpoint(self): - # # Call to the django view endpoint dev/avert_emissions_profile which calls the http.jl endpoint - # #case 1: location in CONUS (Seattle, WA) - # inputs = { - # "latitude": 47.606211, - # "longitude": -122.336052, - # "load_year": 2021 - # } - # resp = self.api_client.get(f'/v3/avert_emissions_profile', data=inputs) - # self.assertHttpOK(resp) - # view_response = json.loads(resp.content) - # self.assertEquals(view_response["avert_meters_to_region"], 0.0) - # self.assertEquals(view_response["avert_region"], "Northwest") - # self.assertEquals(len(view_response["emissions_factor_series_lb_NOx_per_kwh"]), 8760) - # #case 2: location off shore of NJ (works for AVERT, not Cambium) - # inputs = { - # "latitude": 39.034417, - # "longitude": -74.759292, - # "load_year": 2021 - # } - # resp = self.api_client.get(f'/v3/avert_emissions_profile', data=inputs) - # self.assertHttpOK(resp) - # view_response = json.loads(resp.content) - # self.assertAlmostEqual(view_response["avert_meters_to_region"], 760.62, delta=1.0) - # self.assertEquals(view_response["avert_region"], "Mid-Atlantic") - # self.assertEquals(len(view_response["emissions_factor_series_lb_NOx_per_kwh"]), 8760) - # #case 3: Honolulu, HI (works for AVERT but not Cambium) - # inputs = { - # "latitude": 21.3099, - # "longitude": -157.8581, - # "load_year": 2021 - # } - # resp = self.api_client.get(f'/v3/avert_emissions_profile', data=inputs) - # self.assertHttpOK(resp) - # view_response = json.loads(resp.content) - # self.assertEquals(view_response["avert_meters_to_region"], 0.0) - # self.assertEquals(view_response["avert_region"], "Hawaii (Oahu)") - # self.assertEquals(len(view_response["emissions_factor_series_lb_NOx_per_kwh"]), 8760) - # #case 4: location well outside of US (does not work) - # inputs = { - # "latitude": 0.0, - # "longitude": 0.0, - # "load_year": 2022 - # } - # resp = self.api_client.get(f'/v3/avert_emissions_profile', data=inputs) - # self.assertHttpBadRequest(resp) - # view_response = json.loads(resp.content) - # self.assertTrue("error" in view_response) + # The /v3/simulated_load endpoint calls the http.jl /simulated_load endpoint + response = self.api_client.get(f'/v3/simulated_load', data=inputs) + http_response = json.loads(response.content) + + # Call to the v2 /simulated_load to check for consistency + resp = self.api_client.get(f'/v2/simulated_load', data=inputs) + v2_response = json.loads(resp.content) + self.assertAlmostEqual(http_response["annual_kwh"], v2_response["annual_kwh"], delta=1.0) + + # Test bad inputs + inputs["invalid_key"] = "invalid_val" + resp = self.api_client.get(f'/v2/simulated_load', data=inputs) + v2_response = json.loads(resp.content) + assert("Error" in v2_response.keys()) + + def test_avert_emissions_profile_endpoint(self): + # Call to the django view endpoint dev/avert_emissions_profile which calls the http.jl endpoint + #case 1: location in CONUS (Seattle, WA) + inputs = { + "latitude": 47.606211, + "longitude": -122.336052, + "load_year": 2021 + } + resp = self.api_client.get(f'/v3/avert_emissions_profile', data=inputs) + self.assertHttpOK(resp) + view_response = json.loads(resp.content) + self.assertEquals(view_response["avert_meters_to_region"], 0.0) + self.assertEquals(view_response["avert_region"], "Northwest") + self.assertEquals(len(view_response["emissions_factor_series_lb_NOx_per_kwh"]), 8760) + #case 2: location off shore of NJ (works for AVERT, not Cambium) + inputs = { + "latitude": 39.034417, + "longitude": -74.759292, + "load_year": 2021 + } + resp = self.api_client.get(f'/v3/avert_emissions_profile', data=inputs) + self.assertHttpOK(resp) + view_response = json.loads(resp.content) + self.assertAlmostEqual(view_response["avert_meters_to_region"], 760.62, delta=1.0) + self.assertEquals(view_response["avert_region"], "Mid-Atlantic") + self.assertEquals(len(view_response["emissions_factor_series_lb_NOx_per_kwh"]), 8760) + #case 3: Honolulu, HI (works for AVERT but not Cambium) + inputs = { + "latitude": 21.3099, + "longitude": -157.8581, + "load_year": 2021 + } + resp = self.api_client.get(f'/v3/avert_emissions_profile', data=inputs) + self.assertHttpOK(resp) + view_response = json.loads(resp.content) + self.assertEquals(view_response["avert_meters_to_region"], 0.0) + self.assertEquals(view_response["avert_region"], "Hawaii (Oahu)") + self.assertEquals(len(view_response["emissions_factor_series_lb_NOx_per_kwh"]), 8760) + #case 4: location well outside of US (does not work) + inputs = { + "latitude": 0.0, + "longitude": 0.0, + "load_year": 2022 + } + resp = self.api_client.get(f'/v3/avert_emissions_profile', data=inputs) + self.assertHttpBadRequest(resp) + view_response = json.loads(resp.content) + self.assertTrue("error" in view_response) - # def test_cambium_emissions_profile_endpoint(self): - # # Call to the django view endpoint v3/cambium_emissions_profile which calls the http.jl endpoint - # #case 1: location in CONUS (Seattle, WA) - # inputs = { - # "load_year": 2021, - # "scenario": "Mid-case", - # "location_type": "States", - # "latitude": 47.606211, # Seattle - # "longitude": -122.336052, # Seattle - # "start_year": 2024, - # "lifetime": 25, - # "metric_col": "lrmer_co2e", - # "grid_level": "enduse" - # } - # resp = self.api_client.get(f'/v3/cambium_emissions_profile', data=inputs) - # self.assertHttpOK(resp) - # view_response = json.loads(resp.content) - # self.assertEquals(view_response["metric_col"], "lrmer_co2e") - # self.assertEquals(view_response["location"], "Washington") - # self.assertEquals(len(view_response["emissions_factor_series_lb_CO2_per_kwh"]), 8760) - # #case 2: location off shore of NJ (works for AVERT, not Cambium) - # inputs["latitude"] = 39.034417 - # inputs["longitude"] = -74.759292 - # resp = self.api_client.get(f'/v3/cambium_emissions_profile', data=inputs) - # self.assertHttpBadRequest(resp) - # view_response = json.loads(resp.content) - # self.assertTrue("error" in view_response) - # #case 3: Honolulu, HI (works for AVERT but not Cambium) - # inputs["latitude"] = 21.3099 - # inputs["longitude"] = -157.8581 - # resp = self.api_client.get(f'/v3/cambium_emissions_profile', data=inputs) - # self.assertHttpBadRequest(resp) - # view_response = json.loads(resp.content) - # self.assertTrue("error" in view_response) - # #case 4: location well outside of US (does not work) - # inputs["latitude"] = 0.0 - # inputs["longitude"] = 0.0 - # resp = self.api_client.get(f'/v3/cambium_emissions_profile', data=inputs) - # self.assertHttpBadRequest(resp) - # view_response = json.loads(resp.content) - # self.assertTrue("error" in view_response) - - # def test_easiur_endpoint(self): - # # Call to the django view endpoint dev/easiur_costs which calls the http.jl endpoint - # inputs = { - # "latitude": 47.606211, - # "longitude": -122.336052, - # "inflation": 0.025 - # } - # resp = self.api_client.get(f'/v3/easiur_costs', data=inputs) - # self.assertHttpOK(resp) - # view_response = json.loads(resp.content) - # for ekey in ["NOx", "SO2", "PM25"]: - # for key_format in ["{}_grid_cost_per_tonne", "{}_onsite_fuelburn_cost_per_tonne", "{}_cost_escalation_rate_fraction"]: - # self.assertTrue(type(view_response[key_format.format(ekey)]) == float) - # inputs = { - # "latitude": 47.606211, - # "longitude": 122.336052, - # "inflation": 0.025 - # } - # resp = self.api_client.get(f'/v3/easiur_costs', data=inputs) - # self.assertHttpBadRequest(resp) - # view_response = json.loads(resp.content) - # self.assertTrue("error" in view_response) - - # def test_ghp_endpoints(self): - # # Test /ghp_efficiency_thermal_factors - # inputs_dict = {"latitude": 37.78, - # "longitude": -122.45, - # "doe_reference_name": "MediumOffice"} - - # # Call to the django view endpoint /ghp_efficiency_thermal_factors which calls the http.jl endpoint - # resp = self.api_client.get(f'/v3/ghp_efficiency_thermal_factors', data=inputs_dict) - # view_response = json.loads(resp.content) - - # self.assertEqual(view_response["cooling_efficiency_thermal_factor"], 0.43) - # self.assertEqual(view_response["space_heating_efficiency_thermal_factor"], 0.46) - - # # Test /ghpghx/ground_conductivity - # inputs_dict = {"latitude": 37.78, - # "longitude": -122.45} - - # # Call to the django view endpoint /ghpghx/ground_conductivity which calls the http.jl endpoint - # resp = self.api_client.get(f'/v3/ghpghx/ground_conductivity', data=inputs_dict) - # view_response = json.loads(resp.content) - - # self.assertEqual(view_response["thermal_conductivity"], 1.117) - - # def test_default_existing_chiller_cop(self): - # # Test 1: full dictionary - # inputs_dict = { - # "existing_chiller_max_thermal_factor_on_peak_load":1.25, - # "max_load_kw": 50, - # "max_load_ton":10 - # } - - # # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint - # resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) - # view_response = json.loads(resp.content) - - # self.assertEqual(view_response["existing_chiller_cop"], 4.4) - - # # Test 2: empty dictionary, which should return unknown value - # inputs_dict = {} - - # # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint - # resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) - # view_response = json.loads(resp.content) - - # self.assertEqual(view_response["existing_chiller_cop"], 4.545) - - # # Test 3: Check that "existing_chiller_max_thermal_factor_on_peak_load" can influence the COP; accept max_load_ton empty string - # inputs_dict = { - # "existing_chiller_max_thermal_factor_on_peak_load":1000, - # "max_load_kw": 5, - # "max_load_ton":"" - # } - - # # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint - # resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) - # view_response = json.loads(resp.content) - - # self.assertEqual(view_response["existing_chiller_cop"], 4.69) - - # # Test 4: max_load_ton empty string - # inputs_dict = { - # "max_load_ton":90, - # "max_load_kw":"" - # } - - # # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint - # resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) - # view_response = json.loads(resp.content) - - # self.assertEqual(view_response["existing_chiller_cop"], 4.69) - - # #Test 5: max_load_kw only, small value yields low COP - # inputs_dict = { - # "max_load_kw":1 - # } - - # # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint - # resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) - # view_response = json.loads(resp.content) - - # self.assertEqual(view_response["existing_chiller_cop"], 4.4) + def test_cambium_emissions_profile_endpoint(self): + # Call to the django view endpoint v3/cambium_emissions_profile which calls the http.jl endpoint + #case 1: location in CONUS (Seattle, WA) + inputs = { + "load_year": 2021, + "scenario": "Mid-case", + "location_type": "States", + "latitude": 47.606211, # Seattle + "longitude": -122.336052, # Seattle + "start_year": 2024, + "lifetime": 25, + "metric_col": "lrmer_co2e", + "grid_level": "enduse" + } + resp = self.api_client.get(f'/v3/cambium_emissions_profile', data=inputs) + self.assertHttpOK(resp) + view_response = json.loads(resp.content) + self.assertEquals(view_response["metric_col"], "lrmer_co2e") + self.assertEquals(view_response["location"], "Washington") + self.assertEquals(len(view_response["emissions_factor_series_lb_CO2_per_kwh"]), 8760) + #case 2: location off shore of NJ (works for AVERT, not Cambium) + inputs["latitude"] = 39.034417 + inputs["longitude"] = -74.759292 + resp = self.api_client.get(f'/v3/cambium_emissions_profile', data=inputs) + self.assertHttpBadRequest(resp) + view_response = json.loads(resp.content) + self.assertTrue("error" in view_response) + #case 3: Honolulu, HI (works for AVERT but not Cambium) + inputs["latitude"] = 21.3099 + inputs["longitude"] = -157.8581 + resp = self.api_client.get(f'/v3/cambium_emissions_profile', data=inputs) + self.assertHttpBadRequest(resp) + view_response = json.loads(resp.content) + self.assertTrue("error" in view_response) + #case 4: location well outside of US (does not work) + inputs["latitude"] = 0.0 + inputs["longitude"] = 0.0 + resp = self.api_client.get(f'/v3/cambium_emissions_profile', data=inputs) + self.assertHttpBadRequest(resp) + view_response = json.loads(resp.content) + self.assertTrue("error" in view_response) + + def test_easiur_endpoint(self): + # Call to the django view endpoint dev/easiur_costs which calls the http.jl endpoint + inputs = { + "latitude": 47.606211, + "longitude": -122.336052, + "inflation": 0.025 + } + resp = self.api_client.get(f'/v3/easiur_costs', data=inputs) + self.assertHttpOK(resp) + view_response = json.loads(resp.content) + for ekey in ["NOx", "SO2", "PM25"]: + for key_format in ["{}_grid_cost_per_tonne", "{}_onsite_fuelburn_cost_per_tonne", "{}_cost_escalation_rate_fraction"]: + self.assertTrue(type(view_response[key_format.format(ekey)]) == float) + inputs = { + "latitude": 47.606211, + "longitude": 122.336052, + "inflation": 0.025 + } + resp = self.api_client.get(f'/v3/easiur_costs', data=inputs) + self.assertHttpBadRequest(resp) + view_response = json.loads(resp.content) + self.assertTrue("error" in view_response) + + def test_ghp_endpoints(self): + # Test /ghp_efficiency_thermal_factors + inputs_dict = {"latitude": 37.78, + "longitude": -122.45, + "doe_reference_name": "MediumOffice"} + + # Call to the django view endpoint /ghp_efficiency_thermal_factors which calls the http.jl endpoint + resp = self.api_client.get(f'/v3/ghp_efficiency_thermal_factors', data=inputs_dict) + view_response = json.loads(resp.content) + + self.assertEqual(view_response["cooling_efficiency_thermal_factor"], 0.43) + self.assertEqual(view_response["space_heating_efficiency_thermal_factor"], 0.46) + + # Test /ghpghx/ground_conductivity + inputs_dict = {"latitude": 37.78, + "longitude": -122.45} + + # Call to the django view endpoint /ghpghx/ground_conductivity which calls the http.jl endpoint + resp = self.api_client.get(f'/v3/ghpghx/ground_conductivity', data=inputs_dict) + view_response = json.loads(resp.content) + + self.assertEqual(view_response["thermal_conductivity"], 1.117) + + def test_default_existing_chiller_cop(self): + # Test 1: full dictionary + inputs_dict = { + "existing_chiller_max_thermal_factor_on_peak_load":1.25, + "max_load_kw": 50, + "max_load_ton":10 + } + + # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint + resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) + view_response = json.loads(resp.content) + + self.assertEqual(view_response["existing_chiller_cop"], 4.4) + + # Test 2: empty dictionary, which should return unknown value + inputs_dict = {} + + # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint + resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) + view_response = json.loads(resp.content) + + self.assertEqual(view_response["existing_chiller_cop"], 4.545) + + # Test 3: Check that "existing_chiller_max_thermal_factor_on_peak_load" can influence the COP; accept max_load_ton empty string + inputs_dict = { + "existing_chiller_max_thermal_factor_on_peak_load":1000, + "max_load_kw": 5, + "max_load_ton":"" + } + + # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint + resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) + view_response = json.loads(resp.content) + + self.assertEqual(view_response["existing_chiller_cop"], 4.69) + + # Test 4: max_load_ton empty string + inputs_dict = { + "max_load_ton":90, + "max_load_kw":"" + } + + # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint + resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) + view_response = json.loads(resp.content) + + self.assertEqual(view_response["existing_chiller_cop"], 4.69) + + #Test 5: max_load_kw only, small value yields low COP + inputs_dict = { + "max_load_kw":1 + } + + # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint + resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) + view_response = json.loads(resp.content) + + self.assertEqual(view_response["existing_chiller_cop"], 4.4) diff --git a/reoptjl/test/test_job_endpoint.py b/reoptjl/test/test_job_endpoint.py index 03e876dcc..9ccf40042 100644 --- a/reoptjl/test/test_job_endpoint.py +++ b/reoptjl/test/test_job_endpoint.py @@ -15,199 +15,199 @@ class TestJobEndpoint(ResourceTestCaseMixin, TransactionTestCase): - # def test_multiple_outages(self): - - # scenario_file = os.path.join('reoptjl', 'test', 'posts', 'outage.json') - # scenario = json.load(open(scenario_file, 'r')) - # resp = self.api_client.post('/v3/job/', format='json', data=scenario) - # self.assertHttpCreated(resp) - # r = json.loads(resp.content) - # run_uuid = r.get('run_uuid') - # resp = self.api_client.get(f'/v3/job/{run_uuid}/results') - # r = json.loads(resp.content) - # results = r["outputs"] - # self.assertEqual(np.array(results["Outages"]["unserved_load_series_kw"]).shape, (1,2,5)) - # self.assertEqual(np.array(results["Outages"]["generator_fuel_used_per_outage_gal"]).shape, (1,2)) - # self.assertEqual(np.array(results["Outages"]["chp_fuel_used_per_outage_mmbtu"]).shape, (1,2)) - # self.assertAlmostEqual(results["Outages"]["expected_outage_cost"], 0.0, places=-2) - # self.assertAlmostEqual(sum(sum(np.array(results["Outages"]["unserved_load_per_outage_kwh"]))), 0.0, places=0) - # # TODO figure out why microgrid_upgrade_capital_cost is about $3000 different locally than on GitHub Actions - # self.assertAlmostEqual(results["Outages"]["microgrid_upgrade_capital_cost"], 1974429.4, delta=5000.0) - # self.assertAlmostEqual(results["Financial"]["lcc"], 59865240.0, delta=0.01*results["Financial"]["lcc"]) - - # def test_pv_battery_and_emissions_defaults_from_julia(self): - # """ - # Same test post as "Solar and ElectricStorage w/BAU" in the Julia package. Used in development of v3. - # Also tests that inputs with defaults determined in the REopt julia package get updated in the database. - # """ - # post_file = os.path.join('reoptjl', 'test', 'posts', 'pv_batt_emissions.json') - # post = json.load(open(post_file, 'r')) - - # resp = self.api_client.post('/v3/job/', format='json', data=post) - # self.assertHttpCreated(resp) - # r = json.loads(resp.content) - # run_uuid = r.get('run_uuid') - - # resp = self.api_client.get(f'/v3/job/{run_uuid}/results') - # r = json.loads(resp.content) - # results = r["outputs"] - - # self.assertAlmostEqual(results["Financial"]["lcc"], 12391786, places=-3) - # self.assertAlmostEqual(results["Financial"]["lcc_bau"], 12766397, places=-3) - # self.assertAlmostEqual(results["PV"]["size_kw"], 216.667, places=1) - # self.assertAlmostEqual(results["ElectricStorage"]["size_kw"], 49.05, places=1) - # self.assertAlmostEqual(results["ElectricStorage"]["size_kwh"], 83.32, places=1) + def test_multiple_outages(self): + + scenario_file = os.path.join('reoptjl', 'test', 'posts', 'outage.json') + scenario = json.load(open(scenario_file, 'r')) + resp = self.api_client.post('/v3/job/', format='json', data=scenario) + self.assertHttpCreated(resp) + r = json.loads(resp.content) + run_uuid = r.get('run_uuid') + resp = self.api_client.get(f'/v3/job/{run_uuid}/results') + r = json.loads(resp.content) + results = r["outputs"] + self.assertEqual(np.array(results["Outages"]["unserved_load_series_kw"]).shape, (1,2,5)) + self.assertEqual(np.array(results["Outages"]["generator_fuel_used_per_outage_gal"]).shape, (1,2)) + self.assertEqual(np.array(results["Outages"]["chp_fuel_used_per_outage_mmbtu"]).shape, (1,2)) + self.assertAlmostEqual(results["Outages"]["expected_outage_cost"], 0.0, places=-2) + self.assertAlmostEqual(sum(sum(np.array(results["Outages"]["unserved_load_per_outage_kwh"]))), 0.0, places=0) + # TODO figure out why microgrid_upgrade_capital_cost is about $3000 different locally than on GitHub Actions + self.assertAlmostEqual(results["Outages"]["microgrid_upgrade_capital_cost"], 1974429.4, delta=5000.0) + self.assertAlmostEqual(results["Financial"]["lcc"], 59865240.0, delta=0.01*results["Financial"]["lcc"]) + + def test_pv_battery_and_emissions_defaults_from_julia(self): + """ + Same test post as "Solar and ElectricStorage w/BAU" in the Julia package. Used in development of v3. + Also tests that inputs with defaults determined in the REopt julia package get updated in the database. + """ + post_file = os.path.join('reoptjl', 'test', 'posts', 'pv_batt_emissions.json') + post = json.load(open(post_file, 'r')) + + resp = self.api_client.post('/v3/job/', format='json', data=post) + self.assertHttpCreated(resp) + r = json.loads(resp.content) + run_uuid = r.get('run_uuid') + + resp = self.api_client.get(f'/v3/job/{run_uuid}/results') + r = json.loads(resp.content) + results = r["outputs"] + + self.assertAlmostEqual(results["Financial"]["lcc"], 12391786, places=-3) + self.assertAlmostEqual(results["Financial"]["lcc_bau"], 12766397, places=-3) + self.assertAlmostEqual(results["PV"]["size_kw"], 216.667, places=1) + self.assertAlmostEqual(results["ElectricStorage"]["size_kw"], 49.05, places=1) + self.assertAlmostEqual(results["ElectricStorage"]["size_kwh"], 83.32, places=1) - # self.assertIsNotNone(results["Site"]["total_renewable_energy_fraction"]) - # self.assertIsNotNone(results["Site"]["annual_emissions_tonnes_CO2"]) - # self.assertIsNotNone(results["Site"]["lifecycle_emissions_tonnes_NOx"]) - - # #test that emissions inputs got updated in the database with the defaults determined in REopt julia package - # updated_inputs = r["inputs"] - # self.assertIsNotNone(updated_inputs["ElectricUtility"]["emissions_factor_series_lb_CO2_per_kwh"]) - # self.assertIsNotNone(updated_inputs["Financial"]["NOx_grid_cost_per_tonne"]) - # self.assertIsNotNone(updated_inputs["Financial"]["SO2_onsite_fuelburn_cost_per_tonne"]) - # self.assertIsNotNone(updated_inputs["Financial"]["PM25_cost_escalation_rate_fraction"]) - - # def test_off_grid_defaults(self): - # """ - # Purpose of this test is to validate off-grid functionality and defaults in the API. - # """ - # post_file = os.path.join('reoptjl', 'test', 'posts', 'off_grid_defaults.json') - # post = json.load(open(post_file, 'r')) - - # resp = self.api_client.post('/v3/job/', format='json', data=post) - # self.assertHttpCreated(resp) - # r = json.loads(resp.content) - # run_uuid = r.get('run_uuid') - - # resp = self.api_client.get(f'/v3/job/{run_uuid}/results') - # r = json.loads(resp.content) - # results = r["outputs"] + self.assertIsNotNone(results["Site"]["total_renewable_energy_fraction"]) + self.assertIsNotNone(results["Site"]["annual_emissions_tonnes_CO2"]) + self.assertIsNotNone(results["Site"]["lifecycle_emissions_tonnes_NOx"]) + + #test that emissions inputs got updated in the database with the defaults determined in REopt julia package + updated_inputs = r["inputs"] + self.assertIsNotNone(updated_inputs["ElectricUtility"]["emissions_factor_series_lb_CO2_per_kwh"]) + self.assertIsNotNone(updated_inputs["Financial"]["NOx_grid_cost_per_tonne"]) + self.assertIsNotNone(updated_inputs["Financial"]["SO2_onsite_fuelburn_cost_per_tonne"]) + self.assertIsNotNone(updated_inputs["Financial"]["PM25_cost_escalation_rate_fraction"]) + + def test_off_grid_defaults(self): + """ + Purpose of this test is to validate off-grid functionality and defaults in the API. + """ + post_file = os.path.join('reoptjl', 'test', 'posts', 'off_grid_defaults.json') + post = json.load(open(post_file, 'r')) + + resp = self.api_client.post('/v3/job/', format='json', data=post) + self.assertHttpCreated(resp) + r = json.loads(resp.content) + run_uuid = r.get('run_uuid') + + resp = self.api_client.get(f'/v3/job/{run_uuid}/results') + r = json.loads(resp.content) + results = r["outputs"] - # # Validate that we got off-grid response fields - # self.assertAlmostEqual(results["Financial"]["offgrid_microgrid_lcoe_dollars_per_kwh"], 0.337, places=-3) - # self.assertAlmostEqual(results["ElectricTariff"]["year_one_bill_before_tax"], 0.0) - # self.assertAlmostEqual(results["ElectricLoad"]["offgrid_load_met_fraction"], 0.99999, places=-2) - # self.assertAlmostEqual(sum(results["ElectricLoad"]["offgrid_load_met_series_kw"]), 8760.0, places=-1) - # self.assertAlmostEqual(results["Financial"]["lifecycle_offgrid_other_annual_costs_after_tax"], 0.0, places=-2) + # Validate that we got off-grid response fields + self.assertAlmostEqual(results["Financial"]["offgrid_microgrid_lcoe_dollars_per_kwh"], 0.337, places=-3) + self.assertAlmostEqual(results["ElectricTariff"]["year_one_bill_before_tax"], 0.0) + self.assertAlmostEqual(results["ElectricLoad"]["offgrid_load_met_fraction"], 0.99999, places=-2) + self.assertAlmostEqual(sum(results["ElectricLoad"]["offgrid_load_met_series_kw"]), 8760.0, places=-1) + self.assertAlmostEqual(results["Financial"]["lifecycle_offgrid_other_annual_costs_after_tax"], 0.0, places=-2) - # def test_process_reopt_error(self): - # """ - # Purpose of this test is to ensure REopt status 400 is returned using the reoptjl endpoint - # """ - - # post_file = os.path.join('reoptjl', 'test', 'posts', 'handle_reopt_error.json') - # post = json.load(open(post_file, 'r')) - - # resp = self.api_client.post('/v3/job/', format='json', data=post) - # self.assertHttpCreated(resp) - # r = json.loads(resp.content) - # run_uuid = r.get('run_uuid') - - # resp = self.api_client.get(f'/v3/job/{run_uuid}/results') - # r = json.loads(resp.content) - # assert('errors' in r["messages"].keys()) - # assert('warnings' in r["messages"].keys()) - # assert(r['messages']['has_stacktrace']==True) - # assert(resp.status_code==400) - - - # def test_thermal_in_results(self): - # """ - # Purpose of this test is to check that the expected thermal loads, techs, and storage are included in the results - # """ - - # post_file = os.path.join('reoptjl', 'test', 'posts', 'test_thermal_in_results.json') #includes GhpGhx responses - # post = json.load(open(post_file, 'r')) - - # resp = self.api_client.post('/v3/job/', format='json', data=post) - # self.assertHttpCreated(resp) - # r = json.loads(resp.content) - # run_uuid = r.get('run_uuid') + def test_process_reopt_error(self): + """ + Purpose of this test is to ensure REopt status 400 is returned using the reoptjl endpoint + """ + + post_file = os.path.join('reoptjl', 'test', 'posts', 'handle_reopt_error.json') + post = json.load(open(post_file, 'r')) + + resp = self.api_client.post('/v3/job/', format='json', data=post) + self.assertHttpCreated(resp) + r = json.loads(resp.content) + run_uuid = r.get('run_uuid') + + resp = self.api_client.get(f'/v3/job/{run_uuid}/results') + r = json.loads(resp.content) + assert('errors' in r["messages"].keys()) + assert('warnings' in r["messages"].keys()) + assert(r['messages']['has_stacktrace']==True) + assert(resp.status_code==400) + + + def test_thermal_in_results(self): + """ + Purpose of this test is to check that the expected thermal loads, techs, and storage are included in the results + """ + + post_file = os.path.join('reoptjl', 'test', 'posts', 'test_thermal_in_results.json') #includes GhpGhx responses + post = json.load(open(post_file, 'r')) + + resp = self.api_client.post('/v3/job/', format='json', data=post) + self.assertHttpCreated(resp) + r = json.loads(resp.content) + run_uuid = r.get('run_uuid') - # resp = self.api_client.get(f'/v3/job/{run_uuid}/results') - # r = json.loads(resp.content) - # inputs = r["inputs"] - # results = r["outputs"] - # self.assertIn("CoolingLoad", list(inputs.keys())) - # self.assertIn("CoolingLoad", list(results.keys())) - # self.assertIn("CHP", list(results.keys())) - # self.assertIn("ExistingChiller",list(results.keys())) - # self.assertIn("ExistingBoiler", list(results.keys())) - # self.assertIn("HeatingLoad", list(results.keys())) - # self.assertIn("HotThermalStorage", list(results.keys())) - # self.assertIn("ColdThermalStorage", list(results.keys())) - # self.assertIn("AbsorptionChiller", list(results.keys())) - # self.assertIn("GHP", list(results.keys())) - - - # def test_chp_defaults_from_julia(self): - # # Test that the inputs_with_defaults_set_in_julia feature worked for CHP, consistent with /chp_defaults - # post_file = os.path.join('reoptjl', 'test', 'posts', 'chp_defaults_post.json') - # post = json.load(open(post_file, 'r')) - # # Make average MMBtu/hr thermal steam greater than 7 MMBtu/hr threshold for combustion_turbine to be chosen - # # Default ExistingBoiler efficiency for production_type = steam is 0.75 - # post["SpaceHeatingLoad"]["annual_mmbtu"] = 8760 * 8 / 0.75 - # post["DomesticHotWaterLoad"]["annual_mmbtu"] = 8760 * 8 / 0.75 - # resp = self.api_client.post('/v3/job/', format='json', data=post) - # self.assertHttpCreated(resp) - # r = json.loads(resp.content) - # run_uuid = r.get('run_uuid') - - # resp = self.api_client.get(f'/v3/job/{run_uuid}/results') - # r = json.loads(resp.content) - - # inputs_chp = r["inputs"]["CHP"] - - # avg_fuel_load = (post["SpaceHeatingLoad"]["annual_mmbtu"] + - # post["DomesticHotWaterLoad"]["annual_mmbtu"]) / 8760.0 - # inputs_chp_defaults = {"hot_water_or_steam": post["ExistingBoiler"]["production_type"], - # "avg_boiler_fuel_load_mmbtu_per_hour": avg_fuel_load - # } - - # # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint - # resp = self.api_client.get(f'/v3/chp_defaults', data=inputs_chp_defaults) - # view_response = json.loads(resp.content) - - # for key in view_response["default_inputs"].keys(): - # if post["CHP"].get(key) is None: # Check that default got assigned consistent with /chp_defaults - # if key == "max_kw": - # self.assertEquals(inputs_chp[key], view_response["chp_max_size_kw"]) - # else: - # self.assertEquals(inputs_chp[key], view_response["default_inputs"][key]) - # else: # Make sure we didn't overwrite user-input - # self.assertEquals(inputs_chp[key], post["CHP"][key]) - - # def test_peak_load_outage_times(self): - # """ - # Purpose of this test is to test the endpoint /peak_load_outage_times - # """ - - # load = [100]*8760 - # load[40*24] = 200 - # load[50*24-1] = 300 - # load[70*24+13] = 300 - # load[170*24] = 300 - # load[243*24] = 400 - # outage_inputs = {"seasonal_peaks": True, - # "outage_duration": 95, - # "critical_load": load, - # "start_not_center_on_peaks": False - # } - # expected_time_steps = [50*24-1-47+1, 70*24+13-47+1, 170*24-47+1, 243*24-47+1] - # resp = self.api_client.post(f'/v3/peak_load_outage_times', data=outage_inputs) - # self.assertHttpOK(resp) - # resp = json.loads(resp.content) - # self.assertEquals(resp["outage_start_time_steps"], expected_time_steps) - - # outage_inputs["seasonal_peaks"] = False - # outage_inputs["start_not_center_on_peaks"] = True - # expected_time_steps = [243*24+1] - # resp = self.api_client.post(f'/v3/peak_load_outage_times', data=outage_inputs) - # self.assertHttpOK(resp) - # resp = json.loads(resp.content) - # self.assertEquals(resp["outage_start_time_steps"], expected_time_steps) + resp = self.api_client.get(f'/v3/job/{run_uuid}/results') + r = json.loads(resp.content) + inputs = r["inputs"] + results = r["outputs"] + self.assertIn("CoolingLoad", list(inputs.keys())) + self.assertIn("CoolingLoad", list(results.keys())) + self.assertIn("CHP", list(results.keys())) + self.assertIn("ExistingChiller",list(results.keys())) + self.assertIn("ExistingBoiler", list(results.keys())) + self.assertIn("HeatingLoad", list(results.keys())) + self.assertIn("HotThermalStorage", list(results.keys())) + self.assertIn("ColdThermalStorage", list(results.keys())) + self.assertIn("AbsorptionChiller", list(results.keys())) + self.assertIn("GHP", list(results.keys())) + + + def test_chp_defaults_from_julia(self): + # Test that the inputs_with_defaults_set_in_julia feature worked for CHP, consistent with /chp_defaults + post_file = os.path.join('reoptjl', 'test', 'posts', 'chp_defaults_post.json') + post = json.load(open(post_file, 'r')) + # Make average MMBtu/hr thermal steam greater than 7 MMBtu/hr threshold for combustion_turbine to be chosen + # Default ExistingBoiler efficiency for production_type = steam is 0.75 + post["SpaceHeatingLoad"]["annual_mmbtu"] = 8760 * 8 / 0.75 + post["DomesticHotWaterLoad"]["annual_mmbtu"] = 8760 * 8 / 0.75 + resp = self.api_client.post('/v3/job/', format='json', data=post) + self.assertHttpCreated(resp) + r = json.loads(resp.content) + run_uuid = r.get('run_uuid') + + resp = self.api_client.get(f'/v3/job/{run_uuid}/results') + r = json.loads(resp.content) + + inputs_chp = r["inputs"]["CHP"] + + avg_fuel_load = (post["SpaceHeatingLoad"]["annual_mmbtu"] + + post["DomesticHotWaterLoad"]["annual_mmbtu"]) / 8760.0 + inputs_chp_defaults = {"hot_water_or_steam": post["ExistingBoiler"]["production_type"], + "avg_boiler_fuel_load_mmbtu_per_hour": avg_fuel_load + } + + # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint + resp = self.api_client.get(f'/v3/chp_defaults', data=inputs_chp_defaults) + view_response = json.loads(resp.content) + + for key in view_response["default_inputs"].keys(): + if post["CHP"].get(key) is None: # Check that default got assigned consistent with /chp_defaults + if key == "max_kw": + self.assertEquals(inputs_chp[key], view_response["chp_max_size_kw"]) + else: + self.assertEquals(inputs_chp[key], view_response["default_inputs"][key]) + else: # Make sure we didn't overwrite user-input + self.assertEquals(inputs_chp[key], post["CHP"][key]) + + def test_peak_load_outage_times(self): + """ + Purpose of this test is to test the endpoint /peak_load_outage_times + """ + + load = [100]*8760 + load[40*24] = 200 + load[50*24-1] = 300 + load[70*24+13] = 300 + load[170*24] = 300 + load[243*24] = 400 + outage_inputs = {"seasonal_peaks": True, + "outage_duration": 95, + "critical_load": load, + "start_not_center_on_peaks": False + } + expected_time_steps = [50*24-1-47+1, 70*24+13-47+1, 170*24-47+1, 243*24-47+1] + resp = self.api_client.post(f'/v3/peak_load_outage_times', data=outage_inputs) + self.assertHttpOK(resp) + resp = json.loads(resp.content) + self.assertEquals(resp["outage_start_time_steps"], expected_time_steps) + + outage_inputs["seasonal_peaks"] = False + outage_inputs["start_not_center_on_peaks"] = True + expected_time_steps = [243*24+1] + resp = self.api_client.post(f'/v3/peak_load_outage_times', data=outage_inputs) + self.assertHttpOK(resp) + resp = json.loads(resp.content) + self.assertEquals(resp["outage_start_time_steps"], expected_time_steps) def test_superset_input_fields(self): """ @@ -226,79 +226,76 @@ def test_superset_input_fields(self): resp = self.api_client.get(f'/v3/job/{run_uuid}/results') r = json.loads(resp.content) results = r["outputs"] - - # self.maxDiff = None - # self.assertEqual(r["messages"], {}) self.assertAlmostEqual(results["Financial"]["npv"], -258533.19, places=-3) assert(resp.status_code==200) - # def test_steamturbine_defaults_from_julia(self): - # # Test that the inputs_with_defaults_set_in_julia feature worked for SteamTurbine, consistent with /chp_defaults - # post_file = os.path.join('reoptjl', 'test', 'posts', 'steamturbine_defaults_post.json') - # post = json.load(open(post_file, 'r')) + def test_steamturbine_defaults_from_julia(self): + # Test that the inputs_with_defaults_set_in_julia feature worked for SteamTurbine, consistent with /chp_defaults + post_file = os.path.join('reoptjl', 'test', 'posts', 'steamturbine_defaults_post.json') + post = json.load(open(post_file, 'r')) - # # Call http.jl /reopt to run SteamTurbine scenario and get results for defaults from julia checking - # resp = self.api_client.post('/v3/job/', format='json', data=post) - # self.assertHttpCreated(resp) - # r = json.loads(resp.content) - # run_uuid = r.get('run_uuid') + # Call http.jl /reopt to run SteamTurbine scenario and get results for defaults from julia checking + resp = self.api_client.post('/v3/job/', format='json', data=post) + self.assertHttpCreated(resp) + r = json.loads(resp.content) + run_uuid = r.get('run_uuid') - # resp = self.api_client.get(f'/v3/job/{run_uuid}/results') - # r = json.loads(resp.content) + resp = self.api_client.get(f'/v3/job/{run_uuid}/results') + r = json.loads(resp.content) - # inputs_steamturbine = r["inputs"]["SteamTurbine"] + inputs_steamturbine = r["inputs"]["SteamTurbine"] - # avg_fuel_load = (post["SpaceHeatingLoad"]["annual_mmbtu"] + - # post["DomesticHotWaterLoad"]["annual_mmbtu"]) / 8760.0 + avg_fuel_load = (post["SpaceHeatingLoad"]["annual_mmbtu"] + + post["DomesticHotWaterLoad"]["annual_mmbtu"]) / 8760.0 - # inputs_steamturbine_defaults = { - # "prime_mover": "steam_turbine", - # "avg_boiler_fuel_load_mmbtu_per_hour": avg_fuel_load - # } - - # # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint - # resp = self.api_client.get(f'/v3/chp_defaults', data=inputs_steamturbine_defaults) - # view_response = json.loads(resp.content) - - # for key in view_response["default_inputs"].keys(): - # # skip this key because its NaN in REoptInputs but is populated in /chp_defaults response. - # if key != "inlet_steam_temperature_degF": - # if post["SteamTurbine"].get(key) is None: # Check that default got assigned consistent with /chp_defaults - # self.assertEquals(inputs_steamturbine[key], view_response["default_inputs"][key]) - # else: # Make sure we didn't overwrite user-input - # self.assertEquals(inputs_steamturbine[key], post["SteamTurbine"][key]) - - # def test_hybridghp(self): - # post_file = os.path.join('reoptjl', 'test', 'posts', 'hybrid_ghp.json') - # post = json.load(open(post_file, 'r')) - - # post['GHP']['ghpghx_inputs'][0]['hybrid_ghx_sizing_method'] = 'Automatic' - # post['GHP']['avoided_capex_by_ghp_present_value'] = 1.0e6 - # post['GHP']['ghx_useful_life_years'] = 35 - - # # Call http.jl /reopt to run SteamTurbine scenario and get results for defaults from julia checking - # resp = self.api_client.post('/v3/job/', format='json', data=post) - # self.assertHttpCreated(resp) - # r = json.loads(resp.content) - # run_uuid = r.get('run_uuid') - - # resp = self.api_client.get(f'/v3/job/{run_uuid}/results') - # r = json.loads(resp.content) - - # # calculated_ghx_residual_value 117065.83 - # self.assertAlmostEqual(r["outputs"]["GHP"]["ghx_residual_value_present_value"], 117065.83, delta=500) - - # def test_centralghp(self): - # post_file = os.path.join('reoptjl', 'test', 'posts', 'central_plant_ghp.json') - # post = json.load(open(post_file, 'r')) - - # # Call http.jl /reopt to run the central plant GHP scenario and get results for defaults from julia checking - # resp = self.api_client.post('/v3/job/', format='json', data=post) - # self.assertHttpCreated(resp) - # r = json.loads(resp.content) - # run_uuid = r.get('run_uuid') - - # resp = self.api_client.get(f'/v3/job/{run_uuid}/results') - # r = json.loads(resp.content) - - # self.assertAlmostEqual(r["outputs"]["Financial"]["lifecycle_capital_costs"], 1046066.8, delta=1000) \ No newline at end of file + inputs_steamturbine_defaults = { + "prime_mover": "steam_turbine", + "avg_boiler_fuel_load_mmbtu_per_hour": avg_fuel_load + } + + # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint + resp = self.api_client.get(f'/v3/chp_defaults', data=inputs_steamturbine_defaults) + view_response = json.loads(resp.content) + + for key in view_response["default_inputs"].keys(): + # skip this key because its NaN in REoptInputs but is populated in /chp_defaults response. + if key != "inlet_steam_temperature_degF": + if post["SteamTurbine"].get(key) is None: # Check that default got assigned consistent with /chp_defaults + self.assertEquals(inputs_steamturbine[key], view_response["default_inputs"][key]) + else: # Make sure we didn't overwrite user-input + self.assertEquals(inputs_steamturbine[key], post["SteamTurbine"][key]) + + def test_hybridghp(self): + post_file = os.path.join('reoptjl', 'test', 'posts', 'hybrid_ghp.json') + post = json.load(open(post_file, 'r')) + + post['GHP']['ghpghx_inputs'][0]['hybrid_ghx_sizing_method'] = 'Automatic' + post['GHP']['avoided_capex_by_ghp_present_value'] = 1.0e6 + post['GHP']['ghx_useful_life_years'] = 35 + + # Call http.jl /reopt to run SteamTurbine scenario and get results for defaults from julia checking + resp = self.api_client.post('/v3/job/', format='json', data=post) + self.assertHttpCreated(resp) + r = json.loads(resp.content) + run_uuid = r.get('run_uuid') + + resp = self.api_client.get(f'/v3/job/{run_uuid}/results') + r = json.loads(resp.content) + + # calculated_ghx_residual_value 117065.83 + self.assertAlmostEqual(r["outputs"]["GHP"]["ghx_residual_value_present_value"], 117065.83, delta=500) + + def test_centralghp(self): + post_file = os.path.join('reoptjl', 'test', 'posts', 'central_plant_ghp.json') + post = json.load(open(post_file, 'r')) + + # Call http.jl /reopt to run the central plant GHP scenario and get results for defaults from julia checking + resp = self.api_client.post('/v3/job/', format='json', data=post) + self.assertHttpCreated(resp) + r = json.loads(resp.content) + run_uuid = r.get('run_uuid') + + resp = self.api_client.get(f'/v3/job/{run_uuid}/results') + r = json.loads(resp.content) + + self.assertAlmostEqual(r["outputs"]["Financial"]["lifecycle_capital_costs"], 1046066.8, delta=1000) \ No newline at end of file diff --git a/reoptjl/test/test_validator.py b/reoptjl/test/test_validator.py index d2ccc7792..2a7d488d6 100644 --- a/reoptjl/test/test_validator.py +++ b/reoptjl/test/test_validator.py @@ -14,335 +14,334 @@ def setUp(self): self.post = json.load(open(post_file, 'r')) def test_elec_load_profile_length_validation_and_resampling(self): - self.assertTrue(True) - # """ - # try different lengths of load profiles, where the following are valid: - # - 8760 (hourly) - # - 17520 (30 min) - # - 35040 (15 min) - # also confirm that up/down-sampling is working. - # :return: None - # """ - # good_lengths = [8760, 17520, 35040] - # bad_lengths = [8759, 17521] - - # for length in bad_lengths + good_lengths: - # post = copy.deepcopy(self.post) - # post["APIMeta"]["run_uuid"] = uuid.uuid4() - # post['ElectricLoad']['loads_kw'] = list(range(length)) - # post['ElectricLoad']['critical_loads_kw'] = list(range(length)) - # validator = InputValidator(post) - # validator.clean() - # validator.clean_fields() - # validator.cross_clean() - - # if length in good_lengths: - # self.assertEquals(validator.is_valid, True) - - # if length > 8760: # check downsampling - # self.assertEquals(len(validator.models["ElectricLoad"].loads_kw), 8760) - # self.assertEquals(len(validator.models["ElectricLoad"].critical_loads_kw), 8760) - # assert("resampled inputs" in validator.messages) - - # elif length in bad_lengths: - # self.assertEquals(validator.is_valid, False) - # assert('Invalid length' in validator.validation_errors['ElectricLoad']['loads_kw']) - # assert('Invalid length' in validator.validation_errors['ElectricLoad']['critical_loads_kw']) - - # # check upsampling - # for time_steps_per_hour in [2, 4]: - # post = copy.deepcopy(self.post) - # post["APIMeta"]["run_uuid"] = uuid.uuid4() - # post['ElectricLoad']['loads_kw'] = list(range(8760)) - # post['ElectricLoad']['critical_loads_kw'] = list(range(8760)) - # post['Settings']['time_steps_per_hour'] = time_steps_per_hour - # validator = InputValidator(post) - # validator.clean() - # validator.clean_fields() - # validator.cross_clean() - # self.assertEquals(validator.is_valid, True) - # self.assertEquals(len(validator.models["ElectricLoad"].loads_kw), time_steps_per_hour*8760) - # self.assertEquals(len(validator.models["ElectricLoad"].critical_loads_kw), time_steps_per_hour*8760) - - # def test_bad_blended_profile_inputs(self): - # post = copy.deepcopy(self.post) - # del(post["ElectricLoad"]["doe_reference_name"]) - # post["ElectricLoad"]["blended_doe_reference_names"] = ["badname", "LargeOffice"] - # post["ElectricLoad"]["blended_doe_reference_percents"] = [1.5] - # validator = InputValidator(post) - # validator.clean_fields() - - # assert("'badname' is not a valid choice" - # in validator.validation_errors['ElectricLoad']['blended_doe_reference_names'][0]) - # assert("Ensure this value is less than or equal to 1.0" in - # validator.validation_errors['ElectricLoad']['blended_doe_reference_percents'][0]) - - # post["ElectricLoad"]["blended_doe_reference_names"] = ["MediumOffice", "LargeOffice"] - # post["ElectricLoad"]["blended_doe_reference_percents"] = [0.5] - # post["APIMeta"]["run_uuid"] = uuid.uuid4() - # validator = InputValidator(post) - # validator.clean_fields() - # validator.clean() - - # assert("The number of blended_doe_reference_names must equal the number of blended_doe_reference_percents" in - # validator.validation_errors['ElectricLoad']['blended_doe_reference_names'][0]) - # assert("Sum must = 1.0." in - # validator.validation_errors['ElectricLoad']['blended_doe_reference_percents'][0]) - - # def test_off_grid_defaults_overrides(self): - # post_file = os.path.join('reoptjl', 'test', 'posts', 'off_grid_validations.json') - # post = json.load(open(post_file, 'r')) + """ + try different lengths of load profiles, where the following are valid: + - 8760 (hourly) + - 17520 (30 min) + - 35040 (15 min) + also confirm that up/down-sampling is working. + :return: None + """ + good_lengths = [8760, 17520, 35040] + bad_lengths = [8759, 17521] + + for length in bad_lengths + good_lengths: + post = copy.deepcopy(self.post) + post["APIMeta"]["run_uuid"] = uuid.uuid4() + post['ElectricLoad']['loads_kw'] = list(range(length)) + post['ElectricLoad']['critical_loads_kw'] = list(range(length)) + validator = InputValidator(post) + validator.clean() + validator.clean_fields() + validator.cross_clean() + + if length in good_lengths: + self.assertEquals(validator.is_valid, True) + + if length > 8760: # check downsampling + self.assertEquals(len(validator.models["ElectricLoad"].loads_kw), 8760) + self.assertEquals(len(validator.models["ElectricLoad"].critical_loads_kw), 8760) + assert("resampled inputs" in validator.messages) + + elif length in bad_lengths: + self.assertEquals(validator.is_valid, False) + assert('Invalid length' in validator.validation_errors['ElectricLoad']['loads_kw']) + assert('Invalid length' in validator.validation_errors['ElectricLoad']['critical_loads_kw']) + + # check upsampling + for time_steps_per_hour in [2, 4]: + post = copy.deepcopy(self.post) + post["APIMeta"]["run_uuid"] = uuid.uuid4() + post['ElectricLoad']['loads_kw'] = list(range(8760)) + post['ElectricLoad']['critical_loads_kw'] = list(range(8760)) + post['Settings']['time_steps_per_hour'] = time_steps_per_hour + validator = InputValidator(post) + validator.clean() + validator.clean_fields() + validator.cross_clean() + self.assertEquals(validator.is_valid, True) + self.assertEquals(len(validator.models["ElectricLoad"].loads_kw), time_steps_per_hour*8760) + self.assertEquals(len(validator.models["ElectricLoad"].critical_loads_kw), time_steps_per_hour*8760) + + def test_bad_blended_profile_inputs(self): + post = copy.deepcopy(self.post) + del(post["ElectricLoad"]["doe_reference_name"]) + post["ElectricLoad"]["blended_doe_reference_names"] = ["badname", "LargeOffice"] + post["ElectricLoad"]["blended_doe_reference_percents"] = [1.5] + validator = InputValidator(post) + validator.clean_fields() + + assert("'badname' is not a valid choice" + in validator.validation_errors['ElectricLoad']['blended_doe_reference_names'][0]) + assert("Ensure this value is less than or equal to 1.0" in + validator.validation_errors['ElectricLoad']['blended_doe_reference_percents'][0]) + + post["ElectricLoad"]["blended_doe_reference_names"] = ["MediumOffice", "LargeOffice"] + post["ElectricLoad"]["blended_doe_reference_percents"] = [0.5] + post["APIMeta"]["run_uuid"] = uuid.uuid4() + validator = InputValidator(post) + validator.clean_fields() + validator.clean() + + assert("The number of blended_doe_reference_names must equal the number of blended_doe_reference_percents" in + validator.validation_errors['ElectricLoad']['blended_doe_reference_names'][0]) + assert("Sum must = 1.0." in + validator.validation_errors['ElectricLoad']['blended_doe_reference_percents'][0]) + + def test_off_grid_defaults_overrides(self): + post_file = os.path.join('reoptjl', 'test', 'posts', 'off_grid_validations.json') + post = json.load(open(post_file, 'r')) - # post["APIMeta"]["run_uuid"] = uuid.uuid4() - - # validator = InputValidator(post) - # validator.clean_fields() - # validator.clean() - # validator.cross_clean() - # self.assertEquals(validator.is_valid, True) - - # self.assertAlmostEqual(validator.models["Wind"].operating_reserve_required_fraction, 0.5) - # self.assertAlmostEqual(validator.models["PV"].operating_reserve_required_fraction, 0.25) - # self.assertEqual(validator.models["Wind"].installed_cost_per_kw, 4760.0) # set based on size_class - - # self.assertAlmostEqual(validator.models["ElectricLoad"].operating_reserve_required_fraction, 0.1) - # self.assertAlmostEqual(validator.models["ElectricLoad"].critical_load_fraction, 1.0) - # self.assertAlmostEqual(validator.models["ElectricLoad"].min_load_met_annual_fraction, 0.99999) - - # self.assertAlmostEqual(validator.models["Generator"].installed_cost_per_kw, 880) - # self.assertAlmostEqual(validator.models["Generator"].om_cost_per_kw, 10) - # self.assertAlmostEqual(validator.models["Generator"].fuel_avail_gal, 1.0e9) - # self.assertAlmostEqual(validator.models["Generator"].min_turn_down_fraction, 0.15) - # self.assertAlmostEqual(validator.models["Generator"].replacement_year, 10) - # self.assertAlmostEqual(validator.models["Generator"].replace_cost_per_kw, validator.models["Generator"].installed_cost_per_kw) - - # ## Test that some defaults can be overriden below - - # post["ElectricLoad"]["operating_reserve_required_fraction"] = 0.2 - # post["ElectricLoad"]["critical_load_fraction"] = 0.95 # cant override - # post["ElectricLoad"]["min_load_met_annual_fraction"] = 0.95 + post["APIMeta"]["run_uuid"] = uuid.uuid4() + + validator = InputValidator(post) + validator.clean_fields() + validator.clean() + validator.cross_clean() + self.assertEquals(validator.is_valid, True) + + self.assertAlmostEqual(validator.models["Wind"].operating_reserve_required_fraction, 0.5) + self.assertAlmostEqual(validator.models["PV"].operating_reserve_required_fraction, 0.25) + self.assertEqual(validator.models["Wind"].installed_cost_per_kw, 4760.0) # set based on size_class + + self.assertAlmostEqual(validator.models["ElectricLoad"].operating_reserve_required_fraction, 0.1) + self.assertAlmostEqual(validator.models["ElectricLoad"].critical_load_fraction, 1.0) + self.assertAlmostEqual(validator.models["ElectricLoad"].min_load_met_annual_fraction, 0.99999) + + self.assertAlmostEqual(validator.models["Generator"].installed_cost_per_kw, 880) + self.assertAlmostEqual(validator.models["Generator"].om_cost_per_kw, 10) + self.assertAlmostEqual(validator.models["Generator"].fuel_avail_gal, 1.0e9) + self.assertAlmostEqual(validator.models["Generator"].min_turn_down_fraction, 0.15) + self.assertAlmostEqual(validator.models["Generator"].replacement_year, 10) + self.assertAlmostEqual(validator.models["Generator"].replace_cost_per_kw, validator.models["Generator"].installed_cost_per_kw) + + ## Test that some defaults can be overriden below + + post["ElectricLoad"]["operating_reserve_required_fraction"] = 0.2 + post["ElectricLoad"]["critical_load_fraction"] = 0.95 # cant override + post["ElectricLoad"]["min_load_met_annual_fraction"] = 0.95 - # post["Generator"]["om_cost_per_kw"] = 21 - # post["Generator"]["fuel_avail_gal"] = 10000 - # post["Generator"]["min_turn_down_fraction"] = 0.14 - # post["Generator"]["replacement_year"] = 7 - # post["Generator"]["replace_cost_per_kw"] = 200 - - # post["Wind"]["operating_reserve_required_fraction"] = 0.35 - # post["PV"]["operating_reserve_required_fraction"] = 0.35 + post["Generator"]["om_cost_per_kw"] = 21 + post["Generator"]["fuel_avail_gal"] = 10000 + post["Generator"]["min_turn_down_fraction"] = 0.14 + post["Generator"]["replacement_year"] = 7 + post["Generator"]["replace_cost_per_kw"] = 200 + + post["Wind"]["operating_reserve_required_fraction"] = 0.35 + post["PV"]["operating_reserve_required_fraction"] = 0.35 - # post["APIMeta"]["run_uuid"] = uuid.uuid4() + post["APIMeta"]["run_uuid"] = uuid.uuid4() - # validator = InputValidator(post) - # validator.clean_fields() - # validator.clean() - # validator.cross_clean() - # self.assertEquals(validator.is_valid, True) + validator = InputValidator(post) + validator.clean_fields() + validator.clean() + validator.cross_clean() + self.assertEquals(validator.is_valid, True) - # self.assertAlmostEqual(validator.models["PV"].operating_reserve_required_fraction, 0.35) - # self.assertAlmostEqual(validator.models["Wind"].operating_reserve_required_fraction, 0.35) + self.assertAlmostEqual(validator.models["PV"].operating_reserve_required_fraction, 0.35) + self.assertAlmostEqual(validator.models["Wind"].operating_reserve_required_fraction, 0.35) - # self.assertAlmostEqual(validator.models["ElectricLoad"].operating_reserve_required_fraction, 0.2) - # self.assertAlmostEqual(validator.models["ElectricLoad"].critical_load_fraction, 1.0) # cant override - # self.assertAlmostEqual(validator.models["ElectricLoad"].min_load_met_annual_fraction, 0.95) + self.assertAlmostEqual(validator.models["ElectricLoad"].operating_reserve_required_fraction, 0.2) + self.assertAlmostEqual(validator.models["ElectricLoad"].critical_load_fraction, 1.0) # cant override + self.assertAlmostEqual(validator.models["ElectricLoad"].min_load_met_annual_fraction, 0.95) - # self.assertAlmostEqual(validator.models["Generator"].om_cost_per_kw, 21) - # self.assertAlmostEqual(validator.models["Generator"].fuel_avail_gal, 10000) - # self.assertAlmostEqual(validator.models["Generator"].min_turn_down_fraction, 0.14) - # self.assertAlmostEqual(validator.models["Generator"].replacement_year, 7) - # self.assertAlmostEqual(validator.models["Generator"].replace_cost_per_kw, 200.0) + self.assertAlmostEqual(validator.models["Generator"].om_cost_per_kw, 21) + self.assertAlmostEqual(validator.models["Generator"].fuel_avail_gal, 10000) + self.assertAlmostEqual(validator.models["Generator"].min_turn_down_fraction, 0.14) + self.assertAlmostEqual(validator.models["Generator"].replacement_year, 7) + self.assertAlmostEqual(validator.models["Generator"].replace_cost_per_kw, 200.0) - # def existingboiler_boiler_validation(self): + def existingboiler_boiler_validation(self): - # """ - # Validate clean, cross-clean methods are working as expected - # """ - # post_file = os.path.join('reoptjl', 'test', 'posts', 'existing_boiler.json') - # post = json.load(open(post_file, 'r')) + """ + Validate clean, cross-clean methods are working as expected + """ + post_file = os.path.join('reoptjl', 'test', 'posts', 'existing_boiler.json') + post = json.load(open(post_file, 'r')) - # post["APIMeta"]["run_uuid"] = uuid.uuid4() + post["APIMeta"]["run_uuid"] = uuid.uuid4() - # validator = InputValidator(post) - # validator.clean_fields() - # validator.clean() - # validator.cross_clean() - # self.assertEquals(validator.is_valid, True) + validator = InputValidator(post) + validator.clean_fields() + validator.clean() + validator.cross_clean() + self.assertEquals(validator.is_valid, True) - # self.assertAlmostEqual(validator.models["ExistingBoiler"].emissions_factor_lb_CO2_per_mmbtu, 117, places=-1) - # self.assertAlmostEqual(len(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760) - # self.assertAlmostEqual(sum(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760*0.5) + self.assertAlmostEqual(validator.models["ExistingBoiler"].emissions_factor_lb_CO2_per_mmbtu, 117, places=-1) + self.assertAlmostEqual(len(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760) + self.assertAlmostEqual(sum(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760*0.5) - # self.assertAlmostEqual(len(validator.models["Boiler"].fuel_cost_per_mmbtu), 8760) - # self.assertAlmostEqual(sum(validator.models["Boiler"].fuel_cost_per_mmbtu), 8760*0.25) + self.assertAlmostEqual(len(validator.models["Boiler"].fuel_cost_per_mmbtu), 8760) + self.assertAlmostEqual(sum(validator.models["Boiler"].fuel_cost_per_mmbtu), 8760*0.25) - # # Ensure Hot Thermal Storage System parameter is loaded from json - # self.assertAlmostEqual(validator.models["HotThermalStorage"].max_gal, 2500.0) - - # # Validate 12 month fuel cost vector gets scaled correctly - - # post["ExistingBoiler"]["fuel_cost_per_mmbtu"] = [1,2,1,1,1,1,1,1,1,1,1,1] - # post["Boiler"]["fuel_cost_per_mmbtu"] = [0.5,1,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5] - - # post["APIMeta"]["run_uuid"] = uuid.uuid4() - - # validator = InputValidator(post) - # validator.clean_fields() - # validator.clean() - # validator.cross_clean() - # self.assertEquals(validator.is_valid, True) - - # self.assertAlmostEqual(len(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760) - # self.assertEqual(sum(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 9432.0) - # self.assertAlmostEqual(len(validator.models["Boiler"].fuel_cost_per_mmbtu), 8760) - # self.assertEqual(sum(validator.models["Boiler"].fuel_cost_per_mmbtu), 9432.0*0.5) - - # def test_missing_required_keys(self): - # #start with on_grid, and keep all keys - # required_ongrid_object_names = [ - # "Site", "ElectricLoad", "ElectricTariff" - # ] - # required_offgrid_object_names = [ - # "Site", "ElectricLoad" - # ] - # #prior to removal of keys, test lack or errors of validator with full inputs - # post = copy.deepcopy(self.post) - # post["APIMeta"]["run_uuid"] = uuid.uuid4() - # post["Settings"]["off_grid_flag"] = False - # validator = InputValidator(post) - # for key in required_ongrid_object_names: - # assert (key not in validator.validation_errors.keys()) - # post = copy.deepcopy(self.post) - # post["APIMeta"]["run_uuid"] = uuid.uuid4() - # post["Settings"]["off_grid_flag"] = True - # validator = InputValidator(post) - # for key in required_ongrid_object_names: - # assert (key not in validator.validation_errors.keys()) - # #test ongrid removal of all ongrid keys, trigger an error for all required ongrid inputs - # post = copy.deepcopy(self.post) - # post["APIMeta"]["run_uuid"] = uuid.uuid4() - # post["Settings"]["off_grid_flag"] = False - # for key in required_ongrid_object_names: - # del post[key] - # validator = InputValidator(post) - # for key in required_ongrid_object_names: - # assert("Missing required inputs." in validator.validation_errors[key]) - # #test offgrid removal of all offgrid keys, should trigger an error for required offgrid but not ongrid requirements - # post = copy.deepcopy(self.post) - # post["APIMeta"]["run_uuid"] = uuid.uuid4() - # post["Settings"]["off_grid_flag"] = True - # for key in required_ongrid_object_names: - # del post[key] - # validator = InputValidator(post) - # for key in required_ongrid_object_names: - # if key in required_offgrid_object_names: - # assert("Missing required inputs." in validator.validation_errors[key]) - # else: - # assert(key not in validator.validation_errors.keys()) - - # # check for missing CHP inputs - # post = copy.deepcopy(self.post) - # post["APIMeta"]["run_uuid"] = uuid.uuid4() - # post["CHP"].pop("fuel_cost_per_mmbtu") - # validator = InputValidator(post) - # validator.clean_fields() - # validator.clean() - # validator.cross_clean() - # assert("required inputs" in validator.validation_errors["CHP"].keys()) - - # def test_multiple_outages_validation(self): - # """ - # ensure that validation of multiple outages post works as expected and catches errors - # """ - # post_file = os.path.join('reoptjl', 'test', 'posts', 'outage.json') - # outage_post = json.load(open(post_file, 'r')) - # outage_post["APIMeta"] = {"run_uuid": uuid.uuid4()} - # outage_post["Meta"] = { - # "description": "test description", - # "address": "test address" - # } - # validator = InputValidator(outage_post) - # validator.clean_fields() - # validator.clean() - # validator.cross_clean() - # self.assertEquals(validator.is_valid, True) - - # # test mismatched length - # post = copy.deepcopy(outage_post) - # post["ElectricUtility"]["outage_durations"] = [10,20,30,40] - # post["ElectricUtility"]["outage_probabilities"] = [0.8,0.2] - # post["APIMeta"]["run_uuid"] = uuid.uuid4() - # validator = InputValidator(post) - # validator.clean() - # assert("mismatched length" in validator.validation_errors["ElectricUtility"].keys()) - - # # test missing outage_durations - # post = copy.deepcopy(outage_post) - # post["ElectricUtility"].pop("outage_durations") - # post["APIMeta"]["run_uuid"] = uuid.uuid4() - # validator = InputValidator(post) - # validator.clean() - # assert("missing required inputs" in validator.validation_errors["ElectricUtility"].keys()) - - # # test sum of outage_probabilities != 1 - # post = copy.deepcopy(outage_post) - # post["ElectricUtility"]["outage_durations"] = [10,20] - # post["ElectricUtility"]["outage_probabilities"] = [0.5,0.6] - # post["APIMeta"]["run_uuid"] = uuid.uuid4() - # validator = InputValidator(post) - # validator.clean() - # assert("outage_probabilities" in validator.validation_errors["ElectricUtility"].keys()) - - # # test missing outage_probabilities - # post = copy.deepcopy(outage_post) - # post["ElectricUtility"]["outage_durations"] = [10,20] - # post["ElectricUtility"].pop("outage_probabilities") - # post["APIMeta"]["run_uuid"] = uuid.uuid4() - # validator = InputValidator(post) - # validator.clean_fields() - # validator.clean() - # validator.cross_clean() - # self.assertEquals(validator.models["ElectricUtility"].outage_probabilities, [0.5, 0.5]) - # self.assertEquals(validator.is_valid, True) - - # def test_pv_tilt_defaults(self): - # post = copy.deepcopy(self.post) - # post["APIMeta"]["run_uuid"] = uuid.uuid4() - # del(post["ElectricStorage"]) - # del(post["CHP"]) - # del(post["PV"]["tilt"]) - # validator = InputValidator(post) - # validator.clean_fields() - # validator.clean() - # validator.cross_clean() - # self.assertEquals(validator.models["PV"].tilt, 10) - - # post["APIMeta"]["run_uuid"] = uuid.uuid4() - # post["PV"]["array_type"] = 0 - # validator = InputValidator(post) - # validator.clean_fields() - # validator.clean() - # validator.cross_clean() - # self.assertAlmostEquals(validator.models["PV"].tilt, 20) - - - # def boiler_validation(self): - # """ - # Validate clean, cross-clean methods are working as expected - # """ - # post_file = os.path.join('job', 'test', 'posts', 'boiler_test.json') - # post = json.load(open(post_file, 'r')) - - # post["APIMeta"]["run_uuid"] = uuid.uuid4() - - # validator = InputValidator(post) - # validator.clean_fields() - # validator.clean() - # validator.cross_clean() - # self.assertEquals(validator.is_valid, True) - - # # Update with Boiler test fields - # # self.assertAlmostEqual(validator.models["ExistingBoiler"].emissions_factor_lb_CO2_per_mmbtu, 117, places=-1) - # # self.assertAlmostEqual(len(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760) - # # self.assertAlmostEqual(sum(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760*0.5) + # Ensure Hot Thermal Storage System parameter is loaded from json + self.assertAlmostEqual(validator.models["HotThermalStorage"].max_gal, 2500.0) + + # Validate 12 month fuel cost vector gets scaled correctly + + post["ExistingBoiler"]["fuel_cost_per_mmbtu"] = [1,2,1,1,1,1,1,1,1,1,1,1] + post["Boiler"]["fuel_cost_per_mmbtu"] = [0.5,1,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5] + + post["APIMeta"]["run_uuid"] = uuid.uuid4() + + validator = InputValidator(post) + validator.clean_fields() + validator.clean() + validator.cross_clean() + self.assertEquals(validator.is_valid, True) + + self.assertAlmostEqual(len(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760) + self.assertEqual(sum(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 9432.0) + self.assertAlmostEqual(len(validator.models["Boiler"].fuel_cost_per_mmbtu), 8760) + self.assertEqual(sum(validator.models["Boiler"].fuel_cost_per_mmbtu), 9432.0*0.5) + + def test_missing_required_keys(self): + #start with on_grid, and keep all keys + required_ongrid_object_names = [ + "Site", "ElectricLoad", "ElectricTariff" + ] + required_offgrid_object_names = [ + "Site", "ElectricLoad" + ] + #prior to removal of keys, test lack or errors of validator with full inputs + post = copy.deepcopy(self.post) + post["APIMeta"]["run_uuid"] = uuid.uuid4() + post["Settings"]["off_grid_flag"] = False + validator = InputValidator(post) + for key in required_ongrid_object_names: + assert (key not in validator.validation_errors.keys()) + post = copy.deepcopy(self.post) + post["APIMeta"]["run_uuid"] = uuid.uuid4() + post["Settings"]["off_grid_flag"] = True + validator = InputValidator(post) + for key in required_ongrid_object_names: + assert (key not in validator.validation_errors.keys()) + #test ongrid removal of all ongrid keys, trigger an error for all required ongrid inputs + post = copy.deepcopy(self.post) + post["APIMeta"]["run_uuid"] = uuid.uuid4() + post["Settings"]["off_grid_flag"] = False + for key in required_ongrid_object_names: + del post[key] + validator = InputValidator(post) + for key in required_ongrid_object_names: + assert("Missing required inputs." in validator.validation_errors[key]) + #test offgrid removal of all offgrid keys, should trigger an error for required offgrid but not ongrid requirements + post = copy.deepcopy(self.post) + post["APIMeta"]["run_uuid"] = uuid.uuid4() + post["Settings"]["off_grid_flag"] = True + for key in required_ongrid_object_names: + del post[key] + validator = InputValidator(post) + for key in required_ongrid_object_names: + if key in required_offgrid_object_names: + assert("Missing required inputs." in validator.validation_errors[key]) + else: + assert(key not in validator.validation_errors.keys()) + + # check for missing CHP inputs + post = copy.deepcopy(self.post) + post["APIMeta"]["run_uuid"] = uuid.uuid4() + post["CHP"].pop("fuel_cost_per_mmbtu") + validator = InputValidator(post) + validator.clean_fields() + validator.clean() + validator.cross_clean() + assert("required inputs" in validator.validation_errors["CHP"].keys()) + + def test_multiple_outages_validation(self): + """ + ensure that validation of multiple outages post works as expected and catches errors + """ + post_file = os.path.join('reoptjl', 'test', 'posts', 'outage.json') + outage_post = json.load(open(post_file, 'r')) + outage_post["APIMeta"] = {"run_uuid": uuid.uuid4()} + outage_post["Meta"] = { + "description": "test description", + "address": "test address" + } + validator = InputValidator(outage_post) + validator.clean_fields() + validator.clean() + validator.cross_clean() + self.assertEquals(validator.is_valid, True) + + # test mismatched length + post = copy.deepcopy(outage_post) + post["ElectricUtility"]["outage_durations"] = [10,20,30,40] + post["ElectricUtility"]["outage_probabilities"] = [0.8,0.2] + post["APIMeta"]["run_uuid"] = uuid.uuid4() + validator = InputValidator(post) + validator.clean() + assert("mismatched length" in validator.validation_errors["ElectricUtility"].keys()) + + # test missing outage_durations + post = copy.deepcopy(outage_post) + post["ElectricUtility"].pop("outage_durations") + post["APIMeta"]["run_uuid"] = uuid.uuid4() + validator = InputValidator(post) + validator.clean() + assert("missing required inputs" in validator.validation_errors["ElectricUtility"].keys()) + + # test sum of outage_probabilities != 1 + post = copy.deepcopy(outage_post) + post["ElectricUtility"]["outage_durations"] = [10,20] + post["ElectricUtility"]["outage_probabilities"] = [0.5,0.6] + post["APIMeta"]["run_uuid"] = uuid.uuid4() + validator = InputValidator(post) + validator.clean() + assert("outage_probabilities" in validator.validation_errors["ElectricUtility"].keys()) + + # test missing outage_probabilities + post = copy.deepcopy(outage_post) + post["ElectricUtility"]["outage_durations"] = [10,20] + post["ElectricUtility"].pop("outage_probabilities") + post["APIMeta"]["run_uuid"] = uuid.uuid4() + validator = InputValidator(post) + validator.clean_fields() + validator.clean() + validator.cross_clean() + self.assertEquals(validator.models["ElectricUtility"].outage_probabilities, [0.5, 0.5]) + self.assertEquals(validator.is_valid, True) + + def test_pv_tilt_defaults(self): + post = copy.deepcopy(self.post) + post["APIMeta"]["run_uuid"] = uuid.uuid4() + del(post["ElectricStorage"]) + del(post["CHP"]) + del(post["PV"]["tilt"]) + validator = InputValidator(post) + validator.clean_fields() + validator.clean() + validator.cross_clean() + self.assertEquals(validator.models["PV"].tilt, 10) + + post["APIMeta"]["run_uuid"] = uuid.uuid4() + post["PV"]["array_type"] = 0 + validator = InputValidator(post) + validator.clean_fields() + validator.clean() + validator.cross_clean() + self.assertAlmostEquals(validator.models["PV"].tilt, 20) + + + def boiler_validation(self): + """ + Validate clean, cross-clean methods are working as expected + """ + post_file = os.path.join('job', 'test', 'posts', 'boiler_test.json') + post = json.load(open(post_file, 'r')) + + post["APIMeta"]["run_uuid"] = uuid.uuid4() + + validator = InputValidator(post) + validator.clean_fields() + validator.clean() + validator.cross_clean() + self.assertEquals(validator.is_valid, True) + + # Update with Boiler test fields + # self.assertAlmostEqual(validator.models["ExistingBoiler"].emissions_factor_lb_CO2_per_mmbtu, 117, places=-1) + # self.assertAlmostEqual(len(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760) + # self.assertAlmostEqual(sum(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760*0.5) From 1261762c544f263d56edbbd4b4457ad4e7de239c Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Wed, 24 Apr 2024 13:29:40 -0600 Subject: [PATCH 061/142] check that removing soc_min_applies_during_outages from tests makes them fail --- reoptjl/test/posts/all_inputs_test.json | 1 - reoptjl/test/posts/outage.json | 1 - reoptjl/test/posts/validator_post.json | 1 - resilience_stats/tests/ERP_opt_gens_batt_pv_wind_post.json | 1 - resilience_stats/tests/ERP_opt_long_dur_stor_post.json | 1 - 5 files changed, 5 deletions(-) diff --git a/reoptjl/test/posts/all_inputs_test.json b/reoptjl/test/posts/all_inputs_test.json index 0a7fd1f53..45a1ee177 100644 --- a/reoptjl/test/posts/all_inputs_test.json +++ b/reoptjl/test/posts/all_inputs_test.json @@ -155,7 +155,6 @@ "inverter_efficiency_fraction": 0.96, "rectifier_efficiency_fraction": 0.96, "soc_min_fraction": 0.2, - "soc_min_applies_during_outages": true, "soc_init_fraction": 0.5, "can_grid_charge": true, "installed_cost_per_kw": 840.0, diff --git a/reoptjl/test/posts/outage.json b/reoptjl/test/posts/outage.json index 1a212b871..03fa04aab 100644 --- a/reoptjl/test/posts/outage.json +++ b/reoptjl/test/posts/outage.json @@ -67,7 +67,6 @@ "max_kw": 701.97, "min_kwh": 3441.15, "max_kwh": 3441.15, - "soc_min_applies_during_outages": true, "can_grid_charge": false, "total_itc_fraction": 0.26, "macrs_itc_reduction": 0.5, diff --git a/reoptjl/test/posts/validator_post.json b/reoptjl/test/posts/validator_post.json index d4c8ce524..706f6feff 100644 --- a/reoptjl/test/posts/validator_post.json +++ b/reoptjl/test/posts/validator_post.json @@ -19043,7 +19043,6 @@ "inverter_efficiency_fraction": 0.97, "rectifier_efficiency_fraction": 0.97, "soc_min_fraction": 0.2, - "soc_min_applies_during_outages": true, "soc_init_fraction": 0.6, "canGridCharge": true, "installed_cost_us_dollars_per_kw": 500, diff --git a/resilience_stats/tests/ERP_opt_gens_batt_pv_wind_post.json b/resilience_stats/tests/ERP_opt_gens_batt_pv_wind_post.json index e12228efa..d227cb521 100644 --- a/resilience_stats/tests/ERP_opt_gens_batt_pv_wind_post.json +++ b/resilience_stats/tests/ERP_opt_gens_batt_pv_wind_post.json @@ -36,7 +36,6 @@ "max_kw": 50, "min_kwh": 1000, "max_kwh": 1000, - "soc_min_applies_during_outages": true, "total_rebate_per_kw": 100.0, "macrs_option_years": 5, "can_grid_charge": true, diff --git a/resilience_stats/tests/ERP_opt_long_dur_stor_post.json b/resilience_stats/tests/ERP_opt_long_dur_stor_post.json index b30173f98..af4b56ca6 100644 --- a/resilience_stats/tests/ERP_opt_long_dur_stor_post.json +++ b/resilience_stats/tests/ERP_opt_long_dur_stor_post.json @@ -9,7 +9,6 @@ "min_kwh": 40000, "max_kwh": 40000, "soc_min_fraction": 0.8, - "soc_min_applies_during_outages": true, "soc_init_fraction": 0.9 }, "ElectricLoad": { From 153e293b690f7d13ee238eb65dd67d86fd1cfe4e Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Wed, 24 Apr 2024 13:29:49 -0600 Subject: [PATCH 062/142] Revert "check that removing soc_min_applies_during_outages from tests makes them fail" This reverts commit 1261762c544f263d56edbbd4b4457ad4e7de239c. --- reoptjl/test/posts/all_inputs_test.json | 1 + reoptjl/test/posts/outage.json | 1 + reoptjl/test/posts/validator_post.json | 1 + resilience_stats/tests/ERP_opt_gens_batt_pv_wind_post.json | 1 + resilience_stats/tests/ERP_opt_long_dur_stor_post.json | 1 + 5 files changed, 5 insertions(+) diff --git a/reoptjl/test/posts/all_inputs_test.json b/reoptjl/test/posts/all_inputs_test.json index 45a1ee177..0a7fd1f53 100644 --- a/reoptjl/test/posts/all_inputs_test.json +++ b/reoptjl/test/posts/all_inputs_test.json @@ -155,6 +155,7 @@ "inverter_efficiency_fraction": 0.96, "rectifier_efficiency_fraction": 0.96, "soc_min_fraction": 0.2, + "soc_min_applies_during_outages": true, "soc_init_fraction": 0.5, "can_grid_charge": true, "installed_cost_per_kw": 840.0, diff --git a/reoptjl/test/posts/outage.json b/reoptjl/test/posts/outage.json index 03fa04aab..1a212b871 100644 --- a/reoptjl/test/posts/outage.json +++ b/reoptjl/test/posts/outage.json @@ -67,6 +67,7 @@ "max_kw": 701.97, "min_kwh": 3441.15, "max_kwh": 3441.15, + "soc_min_applies_during_outages": true, "can_grid_charge": false, "total_itc_fraction": 0.26, "macrs_itc_reduction": 0.5, diff --git a/reoptjl/test/posts/validator_post.json b/reoptjl/test/posts/validator_post.json index 706f6feff..d4c8ce524 100644 --- a/reoptjl/test/posts/validator_post.json +++ b/reoptjl/test/posts/validator_post.json @@ -19043,6 +19043,7 @@ "inverter_efficiency_fraction": 0.97, "rectifier_efficiency_fraction": 0.97, "soc_min_fraction": 0.2, + "soc_min_applies_during_outages": true, "soc_init_fraction": 0.6, "canGridCharge": true, "installed_cost_us_dollars_per_kw": 500, diff --git a/resilience_stats/tests/ERP_opt_gens_batt_pv_wind_post.json b/resilience_stats/tests/ERP_opt_gens_batt_pv_wind_post.json index d227cb521..e12228efa 100644 --- a/resilience_stats/tests/ERP_opt_gens_batt_pv_wind_post.json +++ b/resilience_stats/tests/ERP_opt_gens_batt_pv_wind_post.json @@ -36,6 +36,7 @@ "max_kw": 50, "min_kwh": 1000, "max_kwh": 1000, + "soc_min_applies_during_outages": true, "total_rebate_per_kw": 100.0, "macrs_option_years": 5, "can_grid_charge": true, diff --git a/resilience_stats/tests/ERP_opt_long_dur_stor_post.json b/resilience_stats/tests/ERP_opt_long_dur_stor_post.json index af4b56ca6..b30173f98 100644 --- a/resilience_stats/tests/ERP_opt_long_dur_stor_post.json +++ b/resilience_stats/tests/ERP_opt_long_dur_stor_post.json @@ -9,6 +9,7 @@ "min_kwh": 40000, "max_kwh": 40000, "soc_min_fraction": 0.8, + "soc_min_applies_during_outages": true, "soc_init_fraction": 0.9 }, "ElectricLoad": { From 6d30197cd01c559715032e4bb752999e09506840 Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Wed, 24 Apr 2024 13:55:26 -0600 Subject: [PATCH 063/142] test removing fixed battery size from outage test --- reoptjl/test/posts/outage.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/reoptjl/test/posts/outage.json b/reoptjl/test/posts/outage.json index 1a212b871..109e49e74 100644 --- a/reoptjl/test/posts/outage.json +++ b/reoptjl/test/posts/outage.json @@ -63,10 +63,6 @@ "urdb_label": "5e611fec5457a3665e019406" }, "ElectricStorage": { - "min_kw": 701.97, - "max_kw": 701.97, - "min_kwh": 3441.15, - "max_kwh": 3441.15, "soc_min_applies_during_outages": true, "can_grid_charge": false, "total_itc_fraction": 0.26, From 3e8cd7b9ab0c03789052420de17a20850d5bb73c Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Wed, 24 Apr 2024 13:56:09 -0600 Subject: [PATCH 064/142] remove soc_min_applies_during_outages from outage test post --- reoptjl/test/posts/outage.json | 1 - 1 file changed, 1 deletion(-) diff --git a/reoptjl/test/posts/outage.json b/reoptjl/test/posts/outage.json index 109e49e74..74e594333 100644 --- a/reoptjl/test/posts/outage.json +++ b/reoptjl/test/posts/outage.json @@ -63,7 +63,6 @@ "urdb_label": "5e611fec5457a3665e019406" }, "ElectricStorage": { - "soc_min_applies_during_outages": true, "can_grid_charge": false, "total_itc_fraction": 0.26, "macrs_itc_reduction": 0.5, From fb39f7181daf60a5021162d4e271d77fb8b40979 Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Wed, 24 Apr 2024 14:50:00 -0600 Subject: [PATCH 065/142] Revert "remove soc_min_applies_during_outages from outage test post" This reverts commit 3e8cd7b9ab0c03789052420de17a20850d5bb73c. --- reoptjl/test/posts/outage.json | 1 + 1 file changed, 1 insertion(+) diff --git a/reoptjl/test/posts/outage.json b/reoptjl/test/posts/outage.json index 74e594333..109e49e74 100644 --- a/reoptjl/test/posts/outage.json +++ b/reoptjl/test/posts/outage.json @@ -63,6 +63,7 @@ "urdb_label": "5e611fec5457a3665e019406" }, "ElectricStorage": { + "soc_min_applies_during_outages": true, "can_grid_charge": false, "total_itc_fraction": 0.26, "macrs_itc_reduction": 0.5, From e55f431365c51181abd36b4992a054218eba5d4a Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Wed, 24 Apr 2024 14:50:03 -0600 Subject: [PATCH 066/142] Revert "test removing fixed battery size from outage test" This reverts commit 6d30197cd01c559715032e4bb752999e09506840. --- reoptjl/test/posts/outage.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/reoptjl/test/posts/outage.json b/reoptjl/test/posts/outage.json index 109e49e74..1a212b871 100644 --- a/reoptjl/test/posts/outage.json +++ b/reoptjl/test/posts/outage.json @@ -63,6 +63,10 @@ "urdb_label": "5e611fec5457a3665e019406" }, "ElectricStorage": { + "min_kw": 701.97, + "max_kw": 701.97, + "min_kwh": 3441.15, + "max_kwh": 3441.15, "soc_min_applies_during_outages": true, "can_grid_charge": false, "total_itc_fraction": 0.26, From 19e0580f768e00c02dfcccb29a19e712802ff539 Mon Sep 17 00:00:00 2001 From: Byron Pullutasig <115118857+bpulluta@users.noreply.github.com> Date: Thu, 25 Apr 2024 09:29:00 -0600 Subject: [PATCH 067/142] soc migrations --- reoptjl/migrations/0058_merge_20240425_1527.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 reoptjl/migrations/0058_merge_20240425_1527.py diff --git a/reoptjl/migrations/0058_merge_20240425_1527.py b/reoptjl/migrations/0058_merge_20240425_1527.py new file mode 100644 index 000000000..f12730dad --- /dev/null +++ b/reoptjl/migrations/0058_merge_20240425_1527.py @@ -0,0 +1,14 @@ +# Generated by Django 4.0.7 on 2024-04-25 15:27 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('reoptjl', '0057_alter_pvinputs_tilt'), + ('reoptjl', '0057_electricstorageinputs_soc_min_applies_during_outages'), + ] + + operations = [ + ] From c437f3d576da2e7493d619fa414e1f4e4d6b0a9d Mon Sep 17 00:00:00 2001 From: Byron Pullutasig <115118857+bpulluta@users.noreply.github.com> Date: Thu, 25 Apr 2024 10:43:12 -0600 Subject: [PATCH 068/142] updated changelog with soc updates to v3.7.1 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60bb36a43..5c6ccaa71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,7 +26,7 @@ Classify the change according to the following categories: ##### Removed ### Patches -## Develop - 2024-04-19 +## v3.7.1 ### Minor Updates #### Changed - In `core/pv.jl` a change was made to make sure we are using the same assumptions as PVWatts guidelines, the default `tilt` angle for a fixed array should be 20 degrees, irrespective of it being a rooftop `(0)` or ground-mounted (open-rack)`(1)` system. By default the `tilt` will be set to 20 degrees for fixed ground-mount and rooftop, and 0 degrees for axis-tracking (`array_type = (2), (3), or (4)`) From 0ffcd8828d9d51decf4b3f78882dcce5ae0b3e15 Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Fri, 26 Apr 2024 17:13:05 -0600 Subject: [PATCH 069/142] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c6ccaa71..37d4a6034 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,7 +26,7 @@ Classify the change according to the following categories: ##### Removed ### Patches -## v3.7.1 +## v3.8.0 ### Minor Updates #### Changed - In `core/pv.jl` a change was made to make sure we are using the same assumptions as PVWatts guidelines, the default `tilt` angle for a fixed array should be 20 degrees, irrespective of it being a rooftop `(0)` or ground-mounted (open-rack)`(1)` system. By default the `tilt` will be set to 20 degrees for fixed ground-mount and rooftop, and 0 degrees for axis-tracking (`array_type = (2), (3), or (4)`) From 826bf3cd330289438973188d192a3f7b24f5f128 Mon Sep 17 00:00:00 2001 From: Hallie Dunham Date: Fri, 26 Apr 2024 17:15:43 -0600 Subject: [PATCH 070/142] update help text --- reoptjl/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reoptjl/models.py b/reoptjl/models.py index 542693e95..bb744b1b4 100644 --- a/reoptjl/models.py +++ b/reoptjl/models.py @@ -2789,7 +2789,7 @@ class PV_LOCATION_CHOICES(models.TextChoices): ], blank=True, null=True, - help_text="PV system tilt: Set tilt angle to 20 degrees for fixed arrays (rooftop or ground-mounted). Set tilt angle to 0 degrees for axis-tracking systems." + help_text="PV system tilt angle. Default tilt is 20 degrees for fixed arrays (rooftop or ground-mounted) and 0 degrees for axis-tracking systems." ) location = models.TextField( default=PV_LOCATION_CHOICES.BOTH, From 7549dced0c17fca06bc253e144b187a22d544477 Mon Sep 17 00:00:00 2001 From: bill-becker Date: Thu, 2 May 2024 16:23:11 -0600 Subject: [PATCH 071/142] Reduce memory usage on production pods --- .helm/values.production.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.helm/values.production.yaml b/.helm/values.production.yaml index 34f49d5e3..e2c39fa8c 100644 --- a/.helm/values.production.yaml +++ b/.helm/values.production.yaml @@ -1,13 +1,13 @@ appEnv: production djangoSettingsModule: reopt_api.production_settings djangoReplicas: 10 -djangoMemoryRequest: "2800Mi" -djangoMemoryLimit: "2800Mi" +djangoMemoryRequest: "2000Mi" +djangoMemoryLimit: "2000Mi" celeryReplicas: 10 celeryMemoryRequest: "900Mi" celeryMemoryLimit: "900Mi" juliaReplicas: 15 juliaCpuRequest: "1000m" juliaCpuLimit: "4000m" -juliaMemoryRequest: "12000Mi" -juliaMemoryLimit: "12000Mi" +juliaMemoryRequest: "8000Mi" +juliaMemoryLimit: "8000Mi" From d8116c460c62efa3d0998f4328b34370f25ae328 Mon Sep 17 00:00:00 2001 From: bill-becker Date: Thu, 2 May 2024 16:23:23 -0600 Subject: [PATCH 072/142] Increase memory allocation on development pods --- .helm/values.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.helm/values.yaml b/.helm/values.yaml index 83c14452b..5de3f46fb 100644 --- a/.helm/values.yaml +++ b/.helm/values.yaml @@ -19,7 +19,7 @@ celeryCpuLimit: "2000m" celeryMemoryRequest: "700Mi" celeryMemoryLimit: "700Mi" juliaReplicas: 2 -juliaCpuRequest: "300m" +juliaCpuRequest: "1000m" juliaCpuLimit: "4000m" -juliaMemoryRequest: "3000Mi" -juliaMemoryLimit: "3000Mi" +juliaMemoryRequest: "8000Mi" +juliaMemoryLimit: "8000Mi" From c6f1782cb2f71c7d741caee90d3a6d22a5fae524 Mon Sep 17 00:00:00 2001 From: bill-becker Date: Thu, 2 May 2024 16:23:11 -0600 Subject: [PATCH 073/142] Reduce memory usage on production pods --- .helm/values.production.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.helm/values.production.yaml b/.helm/values.production.yaml index 34f49d5e3..e2c39fa8c 100644 --- a/.helm/values.production.yaml +++ b/.helm/values.production.yaml @@ -1,13 +1,13 @@ appEnv: production djangoSettingsModule: reopt_api.production_settings djangoReplicas: 10 -djangoMemoryRequest: "2800Mi" -djangoMemoryLimit: "2800Mi" +djangoMemoryRequest: "2000Mi" +djangoMemoryLimit: "2000Mi" celeryReplicas: 10 celeryMemoryRequest: "900Mi" celeryMemoryLimit: "900Mi" juliaReplicas: 15 juliaCpuRequest: "1000m" juliaCpuLimit: "4000m" -juliaMemoryRequest: "12000Mi" -juliaMemoryLimit: "12000Mi" +juliaMemoryRequest: "8000Mi" +juliaMemoryLimit: "8000Mi" From 3b2a9b9ef093c7838f942f6910b9f061b111747c Mon Sep 17 00:00:00 2001 From: bill-becker Date: Thu, 2 May 2024 16:23:23 -0600 Subject: [PATCH 074/142] Increase memory allocation on development pods --- .helm/values.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.helm/values.yaml b/.helm/values.yaml index 83c14452b..5de3f46fb 100644 --- a/.helm/values.yaml +++ b/.helm/values.yaml @@ -19,7 +19,7 @@ celeryCpuLimit: "2000m" celeryMemoryRequest: "700Mi" celeryMemoryLimit: "700Mi" juliaReplicas: 2 -juliaCpuRequest: "300m" +juliaCpuRequest: "1000m" juliaCpuLimit: "4000m" -juliaMemoryRequest: "3000Mi" -juliaMemoryLimit: "3000Mi" +juliaMemoryRequest: "8000Mi" +juliaMemoryLimit: "8000Mi" From 2d17596a966687e218a01c408cd75dc86637720b Mon Sep 17 00:00:00 2001 From: adfarth Date: Mon, 6 May 2024 14:41:12 -0600 Subject: [PATCH 075/142] Update models.py --- reoptjl/models.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/reoptjl/models.py b/reoptjl/models.py index bb744b1b4..4544a7e41 100644 --- a/reoptjl/models.py +++ b/reoptjl/models.py @@ -1842,8 +1842,9 @@ def clean(self): elif self.outage_durations not in [None,[]]: self.outage_probabilities = [1/len(self.outage_durations)] * len(self.outage_durations) - if self.co2_from_avert or len(self.emissions_factor_series_lb_CO2_per_kwh) > 0: - self.emissions_factor_CO2_decrease_fraction = EMISSIONS_DECREASE_DEFAULTS.get("CO2e", None) # leave blank otherwise; the Julia Pkg will set to 0 unless site is in AK or HI + if (self.co2_from_avert or len(self.emissions_factor_series_lb_CO2_per_kwh) > 0) and self.emissions_factor_CO2_decrease_fraction == None: + # use default if not provided and using AVERT or custom EFs. Leave blank otherwise and the Julia Pkg will set to 0 unless site is in AK or HI. + self.emissions_factor_CO2_decrease_fraction = EMISSIONS_DECREASE_DEFAULTS.get("CO2e", None) if self.emissions_factor_NOx_decrease_fraction == None: self.emissions_factor_NOx_decrease_fraction = EMISSIONS_DECREASE_DEFAULTS.get("NOx", 0.0) From 01499fb3fd5d5e3fef20149954042b56ed3cc503 Mon Sep 17 00:00:00 2001 From: Zolan Date: Mon, 6 May 2024 17:38:46 -0600 Subject: [PATCH 076/142] add boolean inputs for heat loads served --- reoptjl/models.py | 113 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) diff --git a/reoptjl/models.py b/reoptjl/models.py index 4544a7e41..b9c83f527 100644 --- a/reoptjl/models.py +++ b/reoptjl/models.py @@ -2834,6 +2834,24 @@ class PV_LOCATION_CHOICES(models.TextChoices): blank=True, help_text="True/False for if technology has the ability to curtail energy production." ) + can_serve_dhw = models.BooleanField( + default=False, + null=True, + blank=True, + help_text="Boolean indicator if steam turbine can serve space heating load" + ) + can_serve_space_heating = models.BooleanField( + default=False, + null=True, + blank=True, + help_text="Boolean indicator if steam turbine can serve space heating load" + ) + can_serve_process_heat = models.BooleanField( + default=False, + null=True, + blank=True, + help_text="Boolean indicator if steam turbine can serve process heat load" + ) operating_reserve_required_fraction = models.FloatField( validators=[ @@ -4105,6 +4123,25 @@ class CHPInputs(BaseModel, models.Model): blank=True, help_text="Boolean indicator if CHP can supply steam to the steam turbine for electric production" ) + can_serve_dhw = models.BooleanField( + default=False, + null=True, + blank=True, + help_text="Boolean indicator if CHP can serve domestice hot water load" + ) + can_serve_space_heating = models.BooleanField( + default=False, + null=True, + blank=True, + help_text="Boolean indicator if CHP can serve space heating load" + ) + can_serve_process_heat = models.BooleanField( + default=False, + null=True, + blank=True, + help_text="Boolean indicator if CHP can serve process heat load" + ) + #Financial and emissions macrs_option_years = models.IntegerField( @@ -4916,6 +4953,25 @@ class ExistingBoilerInputs(BaseModel, models.Model): help_text="If the boiler can supply steam to the steam turbine for electric production" ) + can_serve_dhw = models.BooleanField( + default=False, + null=True, + blank=True, + help_text="Boolean indicator if the existing boiler can serve domestice hot water load" + ) + can_serve_space_heating = models.BooleanField( + default=False, + null=True, + blank=True, + help_text="Boolean indicator if the existing boiler can serve space heating load" + ) + can_serve_process_heat = models.BooleanField( + default=False, + null=True, + blank=True, + help_text="Boolean indicator if the existing boiler can serve process heat load" + ) + # For custom validations within model. def clean(self): error_messages = {} @@ -5152,6 +5208,28 @@ class BoilerInputs(BaseModel, models.Model): help_text="If the boiler can supply steam to the steam turbine for electric production" ) + can_serve_dhw = models.BooleanField( + default=False, + null=True, + blank=True, + help_text="Boolean indicator if boiler can serve domestice hot water load" + ) + + can_serve_space_heating = models.BooleanField( + default=False, + null=True, + blank=True, + help_text="Boolean indicator if boiler can serve space heating load" + ) + + can_serve_process_heat = models.BooleanField( + default=False, + null=True, + blank=True, + help_text="Boolean indicator if boiler can serve process heat load" + ) + + # For custom validations within model. def clean(self): error_messages = {} @@ -5448,6 +5526,8 @@ class SIZE_CLASS_LIST(models.IntegerChoices): help_text="True/False for if technology has the ability to curtail energy production." ) + + macrs_option_years = models.IntegerField( default=MACRS_YEARS_CHOICES.ZERO, choices=MACRS_YEARS_CHOICES.choices, @@ -5676,6 +5756,25 @@ class HotThermalStorageInputs(BaseModel, models.Model): blank=True, help_text="Rebate per unit installed energy capacity" ) + can_serve_dhw = models.BooleanField( + default=False, + null=True, + blank=True, + help_text="Boolean indicator if hot thermal storage can serve space heating load" + ) + can_serve_space_heating = models.BooleanField( + default=False, + null=True, + blank=True, + help_text="Boolean indicator if hot thermal storage can serve space heating load" + ) + can_serve_process_heat = models.BooleanField( + default=False, + null=True, + blank=True, + help_text="Boolean indicator if hot thermal storage can serve process heat load" + ) + def clean(self): # perform custom validation here. @@ -6828,6 +6927,20 @@ class GHPInputs(BaseModel, models.Model): blank=True, help_text="If GHP can serve the domestic hot water (DHW) portion of the heating load" ) + + can_serve_space_heating = models.BooleanField( + default=False, + null=True, + blank=True, + help_text="Boolean indicator if GHP can serve space heating load" + ) + + can_serve_process_heat = models.BooleanField( + default=False, + null=True, + blank=True, + help_text="Boolean indicator if GHP can serve process heat load" + ) macrs_option_years = models.IntegerField( default=MACRS_YEARS_CHOICES.FIVE, From 8a1c040a24b02024facdd93ce4fac0792b57ecdc Mon Sep 17 00:00:00 2001 From: Zolan Date: Mon, 6 May 2024 17:43:11 -0600 Subject: [PATCH 077/142] update defaults for heating loads served --- reoptjl/models.py | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/reoptjl/models.py b/reoptjl/models.py index b9c83f527..8b3c85a0a 100644 --- a/reoptjl/models.py +++ b/reoptjl/models.py @@ -2835,19 +2835,19 @@ class PV_LOCATION_CHOICES(models.TextChoices): help_text="True/False for if technology has the ability to curtail energy production." ) can_serve_dhw = models.BooleanField( - default=False, + default=True, null=True, blank=True, help_text="Boolean indicator if steam turbine can serve space heating load" ) can_serve_space_heating = models.BooleanField( - default=False, + default=True, null=True, blank=True, help_text="Boolean indicator if steam turbine can serve space heating load" ) can_serve_process_heat = models.BooleanField( - default=False, + default=True, null=True, blank=True, help_text="Boolean indicator if steam turbine can serve process heat load" @@ -4124,19 +4124,19 @@ class CHPInputs(BaseModel, models.Model): help_text="Boolean indicator if CHP can supply steam to the steam turbine for electric production" ) can_serve_dhw = models.BooleanField( - default=False, + default=True, null=True, blank=True, help_text="Boolean indicator if CHP can serve domestice hot water load" ) can_serve_space_heating = models.BooleanField( - default=False, + default=True, null=True, blank=True, help_text="Boolean indicator if CHP can serve space heating load" ) can_serve_process_heat = models.BooleanField( - default=False, + default=True, null=True, blank=True, help_text="Boolean indicator if CHP can serve process heat load" @@ -4954,19 +4954,21 @@ class ExistingBoilerInputs(BaseModel, models.Model): ) can_serve_dhw = models.BooleanField( - default=False, + default=True, null=True, blank=True, help_text="Boolean indicator if the existing boiler can serve domestice hot water load" ) + can_serve_space_heating = models.BooleanField( - default=False, + default=True, null=True, blank=True, help_text="Boolean indicator if the existing boiler can serve space heating load" ) + can_serve_process_heat = models.BooleanField( - default=False, + default=True, null=True, blank=True, help_text="Boolean indicator if the existing boiler can serve process heat load" @@ -5209,21 +5211,21 @@ class BoilerInputs(BaseModel, models.Model): ) can_serve_dhw = models.BooleanField( - default=False, + default=True, null=True, blank=True, help_text="Boolean indicator if boiler can serve domestice hot water load" ) can_serve_space_heating = models.BooleanField( - default=False, + default=True, null=True, blank=True, help_text="Boolean indicator if boiler can serve space heating load" ) can_serve_process_heat = models.BooleanField( - default=False, + default=True, null=True, blank=True, help_text="Boolean indicator if boiler can serve process heat load" @@ -5757,13 +5759,13 @@ class HotThermalStorageInputs(BaseModel, models.Model): help_text="Rebate per unit installed energy capacity" ) can_serve_dhw = models.BooleanField( - default=False, + default=True, null=True, blank=True, help_text="Boolean indicator if hot thermal storage can serve space heating load" ) can_serve_space_heating = models.BooleanField( - default=False, + default=True, null=True, blank=True, help_text="Boolean indicator if hot thermal storage can serve space heating load" @@ -6929,7 +6931,7 @@ class GHPInputs(BaseModel, models.Model): ) can_serve_space_heating = models.BooleanField( - default=False, + default=True, null=True, blank=True, help_text="Boolean indicator if GHP can serve space heating load" From b996221ffc8edb2994b0f27bd279cefc42f4a255 Mon Sep 17 00:00:00 2001 From: Zolan Date: Mon, 6 May 2024 17:43:40 -0600 Subject: [PATCH 078/142] add field retire_in_optimal to ExistingBoilerInputs --- reoptjl/models.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/reoptjl/models.py b/reoptjl/models.py index 8b3c85a0a..ab0f6d754 100644 --- a/reoptjl/models.py +++ b/reoptjl/models.py @@ -4874,6 +4874,13 @@ class ExistingBoilerInputs(BaseModel, models.Model): help_text="Existing boiler system efficiency - conversion of fuel to usable heating thermal energy." ) + retire_in_optimal = models.BooleanField( + default=False, + null=True, + blank=True, + help_text="Boolean indicator if the existing boiler is unavailable in the optimal case (still used in BAU)" + ) + fuel_renewable_energy_fraction = models.FloatField( validators=[ MinValueValidator(0), From 4c94c05dc44951d8fc069819adbc0580e0137382 Mon Sep 17 00:00:00 2001 From: Zolan Date: Mon, 6 May 2024 17:46:22 -0600 Subject: [PATCH 079/142] add field heating_laod_input to AbsorptionChillerInputs --- reoptjl/models.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/reoptjl/models.py b/reoptjl/models.py index ab0f6d754..874cf8d8d 100644 --- a/reoptjl/models.py +++ b/reoptjl/models.py @@ -6528,6 +6528,12 @@ class AbsorptionChillerInputs(BaseModel, models.Model): 'hot_water' )) + HEATING_LOAD_INPUT = models.TextChoices('HEATING_LOAD_INPUT', ( + 'DomesitHotWater', + 'SpaceHeating', + 'ProcessHeat' + )) + thermal_consumption_hot_water_or_steam = models.TextField( blank=True, null=True, @@ -6617,6 +6623,13 @@ class AbsorptionChillerInputs(BaseModel, models.Model): help_text="Percent of upfront project costs to depreciate in year one in addition to scheduled depreciation" ) + heating_load_input = models.TextField( + blank=True, + null=True, + choices=HEATING_LOAD_INPUT.choices, + help_text="Absorption chiller heat input - determines what heating load is added to by absorption chiller use" + ) + def clean(self): pass From 077c266e8806ebb9f9b6bad9858261d14d79d353 Mon Sep 17 00:00:00 2001 From: Zolan Date: Mon, 6 May 2024 20:00:07 -0600 Subject: [PATCH 080/142] add new model ProcessHeatLoadInputs --- reoptjl/models.py | 49 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/reoptjl/models.py b/reoptjl/models.py index 874cf8d8d..57b2c569a 100644 --- a/reoptjl/models.py +++ b/reoptjl/models.py @@ -6301,6 +6301,55 @@ def clean(self): if self.addressable_load_fraction == None: self.addressable_load_fraction = list([1.0]) # should not convert to timeseries, in case it is to be used with monthly_mmbtu or annual_mmbtu +class ProcessHeatLoadInputs(BaseModel, models.Model): + # DHW + key = "ProcessHeatLoad" + + meta = models.OneToOneField( + APIMeta, + on_delete=models.CASCADE, + related_name="ProcessHeatLoadInputs", + primary_key=True + ) + + possible_sets = [ + ["fuel_loads_mmbtu_per_hour"], + ["annual_mmbtu"], + [], + ] + + annual_mmbtu = models.FloatField( + validators=[ + MinValueValidator(1), + MaxValueValidator(MAX_BIG_NUMBER) + ], + null=True, + blank=True, + help_text=("Annual site process heat consumption, used " + "to scale simulated load profile [MMBtu]") + ) + + fuel_loads_mmbtu_per_hour = ArrayField( + models.FloatField( + blank=True + ), + default=list, + blank=True, + help_text=("Typical load over all hours in one year. Must be hourly (8,760 samples), 30 minute (17," + "520 samples), or 15 minute (35,040 samples). All non-net load values must be greater than or " + "equal to zero. " + ) + + ) + + def clean(self): + error_messages = {} + + # possible sets for defining load profile + if not at_least_one_set(self.dict, self.possible_sets): + error_messages["required inputs"] = \ + "Must provide at least one set of valid inputs from {}.".format(self.possible_sets) + class HeatingLoadOutputs(BaseModel, models.Model): key = "HeatingLoadOutputs" From 13d003b9eb4daf0109e7e81cf769f54dff81a7c9 Mon Sep 17 00:00:00 2001 From: Zolan Date: Mon, 6 May 2024 21:14:10 -0600 Subject: [PATCH 081/142] add tech-specific, heat-load-specific outputs --- reoptjl/models.py | 59 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/reoptjl/models.py b/reoptjl/models.py index 57b2c569a..2833447aa 100644 --- a/reoptjl/models.py +++ b/reoptjl/models.py @@ -5053,6 +5053,21 @@ class ExistingBoilerOutputs(BaseModel, models.Model): default = list, ) + thermal_to_dhw_load_series_mmbtu_per_hour = ArrayField( + models.FloatField(null=True, blank=True), + default = list + ) + + thermal_to_space_heating_load_series_mmbtu_per_hour = ArrayField( + models.FloatField(null=True, blank=True), + default = list + ) + + thermal_to_process_heat_load_series_mmbtu_per_hour = ArrayField( + models.FloatField(null=True, blank=True), + default = list + ) + def clean(self): # perform custom validation here. pass @@ -5304,6 +5319,21 @@ class BoilerOutputs(BaseModel, models.Model): annual_thermal_production_mmbtu = models.FloatField(null=True, blank=True) + thermal_to_dhw_load_series_mmbtu_per_hour = ArrayField( + models.FloatField(null=True, blank=True), + default = list + ) + + thermal_to_space_heating_load_series_mmbtu_per_hour = ArrayField( + models.FloatField(null=True, blank=True), + default = list + ) + + thermal_to_process_heat_load_series_mmbtu_per_hour = ArrayField( + models.FloatField(null=True, blank=True), + default = list + ) + class SteamTurbineInputs(BaseModel, models.Model): @@ -5622,6 +5652,21 @@ class SteamTurbineOutputs(BaseModel, models.Model): default = list, ) + thermal_to_dhw_load_series_mmbtu_per_hour = ArrayField( + models.FloatField(null=True, blank=True), + default = list + ) + + thermal_to_space_heating_load_series_mmbtu_per_hour = ArrayField( + models.FloatField(null=True, blank=True), + default = list + ) + + thermal_to_process_heat_load_series_mmbtu_per_hour = ArrayField( + models.FloatField(null=True, blank=True), + default = list + ) + class HotThermalStorageInputs(BaseModel, models.Model): key = "HotThermalStorage" @@ -5807,6 +5852,20 @@ class HotThermalStorageOutputs(BaseModel, models.Model): models.FloatField(null=True, blank=True), default = list, ) + storage_to_dhw_load_series_mmbtu_per_hour = ArrayField( + models.FloatField(null=True, blank=True), + default = list + ) + + storage_to_space_heating_load_series_mmbtu_per_hour = ArrayField( + models.FloatField(null=True, blank=True), + default = list + ) + + storage_to_process_heat_load_series_mmbtu_per_hour = ArrayField( + models.FloatField(null=True, blank=True), + default = list + ) def clean(self): # perform custom validation here. From 277b798141c31a3852bb070a19a017282209444d Mon Sep 17 00:00:00 2001 From: Zolan Date: Mon, 6 May 2024 21:17:15 -0600 Subject: [PATCH 082/142] add process heat loads to heating load outputs --- reoptjl/models.py | 54 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 50 insertions(+), 4 deletions(-) diff --git a/reoptjl/models.py b/reoptjl/models.py index 2833447aa..1dba444b2 100644 --- a/reoptjl/models.py +++ b/reoptjl/models.py @@ -6441,7 +6441,19 @@ class HeatingLoadOutputs(BaseModel, models.Model): blank=True ), default=list, blank=True, - help_text=("Hourly domestic space heating load [MMBTU/hr]") + help_text=("Hourly space heating load [MMBTU/hr]") + ) + + process_heat_thermal_load_series_mmbtu_per_hour = ArrayField( + models.FloatField( + validators=[ + MinValueValidator(0), + MaxValueValidator(MAX_BIG_NUMBER) + ], + blank=True + ), + default=list, blank=True, + help_text=("Hourly process heat load [MMBTU/hr]") ) total_heating_thermal_load_series_mmbtu_per_hour = ArrayField( @@ -6465,7 +6477,7 @@ class HeatingLoadOutputs(BaseModel, models.Model): blank=True ), default=list, blank=True, - help_text=("Hourly domestic hot water load [MMBTU/hr]") + help_text=("Hourly domestic hot water boiler fuel load [MMBTU/hr]") ) space_heating_boiler_fuel_load_series_mmbtu_per_hour = ArrayField( @@ -6477,7 +6489,19 @@ class HeatingLoadOutputs(BaseModel, models.Model): blank=True ), default=list, blank=True, - help_text=("Hourly domestic space heating load [MMBTU/hr]") + help_text=("Hourly space heating boiler fuel load [MMBTU/hr]") + ) + + process_heat_boiler_fuel_load_series_mmbtu_per_hour = ArrayField( + models.FloatField( + validators=[ + MinValueValidator(0), + MaxValueValidator(MAX_BIG_NUMBER) + ], + blank=True + ), + default=list, blank=True, + help_text=("Hourly process heat boiler fuel load [MMBTU/hr]") ) total_heating_boiler_fuel_load_series_mmbtu_per_hour = ArrayField( @@ -6489,7 +6513,7 @@ class HeatingLoadOutputs(BaseModel, models.Model): blank=True ), default=list, blank=True, - help_text=("Hourly total heating load [MMBTU/hr]") + help_text=("Hourly total boiler fuel load [MMBTU/hr]") ) annual_calculated_dhw_thermal_load_mmbtu = models.FloatField( @@ -6514,6 +6538,17 @@ class HeatingLoadOutputs(BaseModel, models.Model): help_text=("Annual site space heating load [MMBTU]") ) + annual_calculated_process_heat_thermal_load_mmbtu = models.FloatField( + validators=[ + MinValueValidator(0), + MaxValueValidator(MAX_BIG_NUMBER) + ], + null=True, + blank=True, + default=0, + help_text=("Annual site process heat load [MMBTU]") + ) + annual_calculated_total_heating_thermal_load_mmbtu = models.FloatField( validators=[ MinValueValidator(0), @@ -6547,6 +6582,17 @@ class HeatingLoadOutputs(BaseModel, models.Model): help_text=("Annual site space heating boiler fuel load [MMBTU]") ) + annual_calculated_process_heat_boiler_fuel_load_mmbtu = models.FloatField( + validators=[ + MinValueValidator(0), + MaxValueValidator(MAX_BIG_NUMBER) + ], + null=True, + blank=True, + default=0, + help_text=("Annual site process heat boiler fuel load [MMBTU]") + ) + annual_calculated_total_heating_boiler_fuel_load_mmbtu = models.FloatField( validators=[ MinValueValidator(0), From f8cd01d4f449044cb344d3568988123d96e33bee Mon Sep 17 00:00:00 2001 From: Zolan Date: Mon, 6 May 2024 21:17:32 -0600 Subject: [PATCH 083/142] add ProcessHeatLoadInputs to validators --- reoptjl/validators.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/reoptjl/validators.py b/reoptjl/validators.py index b46a9307b..4e7238ea4 100644 --- a/reoptjl/validators.py +++ b/reoptjl/validators.py @@ -4,7 +4,7 @@ from reoptjl.models import MAX_BIG_NUMBER, APIMeta, ExistingBoilerInputs, UserProvidedMeta, SiteInputs, Settings, ElectricLoadInputs, ElectricTariffInputs, \ FinancialInputs, BaseModel, Message, ElectricUtilityInputs, PVInputs, ElectricStorageInputs, GeneratorInputs, WindInputs, SpaceHeatingLoadInputs, \ DomesticHotWaterLoadInputs, CHPInputs, CoolingLoadInputs, ExistingChillerInputs, HotThermalStorageInputs, ColdThermalStorageInputs, \ - AbsorptionChillerInputs, BoilerInputs, SteamTurbineInputs, GHPInputs + AbsorptionChillerInputs, BoilerInputs, SteamTurbineInputs, GHPInputs, ProcessHeatLoadInputs from django.core.exceptions import ValidationError from pyproj import Proj from typing import Tuple @@ -79,7 +79,8 @@ def __init__(self, raw_inputs: dict, ghpghx_inputs_validation_errors=None): ColdThermalStorageInputs, AbsorptionChillerInputs, SteamTurbineInputs, - GHPInputs + GHPInputs, + ProcessHeatLoadInputs ) self.pvnames = [] on_grid_required_object_names = [ @@ -521,6 +522,12 @@ def assign_ref_buildings_from_electric_load(self, load_to_assign): self.add_validation_error(load_to_assign, "doe_reference_name", f"Must provide DOE commercial reference building profiles either under {load_to_assign} or ElectricLoad") + """ + ProcessHeatLaod + """ + if "ProcessHeatLoad" in self.models.keys(): + self.clean_time_series("ProcessHeatLoad", "fuel_loads_mmbtu_per_hour") + """ Off-grid input keys validation """ From dda4d3a35056516f3fae1a2cc8ce914395b4bace Mon Sep 17 00:00:00 2001 From: Zolan Date: Mon, 6 May 2024 21:25:02 -0600 Subject: [PATCH 084/142] add ProcessHeatLoadInputs to views and get_input_dict_from_run_uuid --- reoptjl/models.py | 3 +++ reoptjl/views.py | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/reoptjl/models.py b/reoptjl/models.py index 1dba444b2..3ddb5cc5e 100644 --- a/reoptjl/models.py +++ b/reoptjl/models.py @@ -7341,6 +7341,9 @@ def filter_none_and_empty_array(d:dict): try: d["DomesticHotWaterLoad"] = filter_none_and_empty_array(meta.DomesticHotWaterLoadInputs.dict) except: pass + try: d["ProcessHeatLoad"] = filter_none_and_empty_array(meta.ProcessHeatLoadInputs.dict) + except: pass + try: d["HotThermalStorage"] = filter_none_and_empty_array(meta.HotThermalStorageInputs.dict) except: pass diff --git a/reoptjl/views.py b/reoptjl/views.py index 6cea32daa..3e41f7f62 100644 --- a/reoptjl/views.py +++ b/reoptjl/views.py @@ -14,7 +14,7 @@ CoolingLoadOutputs, HeatingLoadOutputs, REoptjlMessageOutputs, HotThermalStorageInputs, HotThermalStorageOutputs,\ ColdThermalStorageInputs, ColdThermalStorageOutputs, AbsorptionChillerInputs, AbsorptionChillerOutputs,\ FinancialInputs, FinancialOutputs, UserUnlinkedRuns, BoilerInputs, BoilerOutputs, SteamTurbineInputs, \ - SteamTurbineOutputs, GHPInputs, GHPOutputs + SteamTurbineOutputs, GHPInputs, GHPOutputs, ProcessHeatLoadInputs import os import requests import numpy as np @@ -53,6 +53,7 @@ def help(request): d["ColdThermalStorage"] = ColdThermalStorageInputs.info_dict(ColdThermalStorageInputs) d["SpaceHeatingLoad"] = SpaceHeatingLoadInputs.info_dict(SpaceHeatingLoadInputs) d["DomesticHotWaterLoad"] = DomesticHotWaterLoadInputs.info_dict(DomesticHotWaterLoadInputs) + d["ProcessHeatLoad"] = ProcessHeatLoadInputs.info_dict(ProcessHeatLoadInputs) d["Site"] = SiteInputs.info_dict(SiteInputs) d["CHP"] = CHPInputs.info_dict(CHPInputs) d["AbsorptionChiller"] = AbsorptionChillerInputs.info_dict(AbsorptionChillerInputs) @@ -214,6 +215,9 @@ def results(request, run_uuid): try: r["inputs"]["DomesticHotWaterLoad"] = meta.DomesticHotWaterLoadInputs.dict except: pass + try: r["inputs"]["ProcessHeatLoad"] = meta.ProcessHeatLoadInputs.dict + except: pass + try: r["inputs"]["CHP"] = meta.CHPInputs.dict except: pass From 8c9d8446c8b564e6f33735921339a0f4459908de Mon Sep 17 00:00:00 2001 From: Zolan Date: Tue, 7 May 2024 08:07:15 -0600 Subject: [PATCH 085/142] point to add-process-heat-load branch --- julia_src/Manifest.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index 204307475..2cae08885 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -917,9 +917,9 @@ uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.REopt]] deps = ["ArchGDAL", "CSV", "CoolProp", "DataFrames", "Dates", "DelimitedFiles", "HTTP", "JLD", "JSON", "JuMP", "LinDistFlow", "LinearAlgebra", "Logging", "MathOptInterface", "Requires", "Roots", "Statistics", "TestEnv"] -git-tree-sha1 = "d2bbcbb8344f19ed87ee8cb6a196d4ed8415255b" +git-tree-sha1 = "889950d32d143d0af8f4dd699c7e453e0b0b9589" uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6" -version = "0.45.0" +rev="add-process-heat-load" [[deps.Random]] deps = ["SHA"] From 72905192900529bc7107c68e16bbbe06d1c110e0 Mon Sep 17 00:00:00 2001 From: Zolan Date: Tue, 7 May 2024 08:48:44 -0600 Subject: [PATCH 086/142] update help text --- reoptjl/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reoptjl/models.py b/reoptjl/models.py index 3ddb5cc5e..6b09a1037 100644 --- a/reoptjl/models.py +++ b/reoptjl/models.py @@ -4127,7 +4127,7 @@ class CHPInputs(BaseModel, models.Model): default=True, null=True, blank=True, - help_text="Boolean indicator if CHP can serve domestice hot water load" + help_text="Boolean indicator if CHP can serve hot water load" ) can_serve_space_heating = models.BooleanField( default=True, @@ -4964,7 +4964,7 @@ class ExistingBoilerInputs(BaseModel, models.Model): default=True, null=True, blank=True, - help_text="Boolean indicator if the existing boiler can serve domestice hot water load" + help_text="Boolean indicator if the existing boiler can serve domestic hot water load" ) can_serve_space_heating = models.BooleanField( @@ -5236,7 +5236,7 @@ class BoilerInputs(BaseModel, models.Model): default=True, null=True, blank=True, - help_text="Boolean indicator if boiler can serve domestice hot water load" + help_text="Boolean indicator if boiler can serve domestic hot water load" ) can_serve_space_heating = models.BooleanField( From 4642c1b6d727e19477c6cbc074d6b19f523792c7 Mon Sep 17 00:00:00 2001 From: Zolan Date: Tue, 7 May 2024 10:50:03 -0600 Subject: [PATCH 087/142] update migrations --- .../0059_processheatloadinputs_and_more.py | 226 ++++++++++++++++++ 1 file changed, 226 insertions(+) create mode 100644 reoptjl/migrations/0059_processheatloadinputs_and_more.py diff --git a/reoptjl/migrations/0059_processheatloadinputs_and_more.py b/reoptjl/migrations/0059_processheatloadinputs_and_more.py new file mode 100644 index 000000000..c9966fcc7 --- /dev/null +++ b/reoptjl/migrations/0059_processheatloadinputs_and_more.py @@ -0,0 +1,226 @@ +# Generated by Django 4.0.7 on 2024-05-07 16:49 + +import django.contrib.postgres.fields +import django.core.validators +from django.db import migrations, models +import django.db.models.deletion +import reoptjl.models + + +class Migration(migrations.Migration): + + dependencies = [ + ('reoptjl', '0058_merge_20240425_1527'), + ] + + operations = [ + migrations.CreateModel( + name='ProcessHeatLoadInputs', + fields=[ + ('meta', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='ProcessHeatLoadInputs', serialize=False, to='reoptjl.apimeta')), + ('annual_mmbtu', models.FloatField(blank=True, help_text='Annual site process heat consumption, used to scale simulated load profile [MMBtu]', null=True, validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(100000000.0)])), + ('fuel_loads_mmbtu_per_hour', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True), blank=True, default=list, help_text='Typical load over all hours in one year. Must be hourly (8,760 samples), 30 minute (17,520 samples), or 15 minute (35,040 samples). All non-net load values must be greater than or equal to zero. ', size=None)), + ], + bases=(reoptjl.models.BaseModel, models.Model), + ), + migrations.AddField( + model_name='absorptionchillerinputs', + name='heating_load_input', + field=models.TextField(blank=True, choices=[('DomesitHotWater', 'Domesithotwater'), ('SpaceHeating', 'Spaceheating'), ('ProcessHeat', 'Processheat')], help_text='Absorption chiller heat input - determines what heating load is added to by absorption chiller use', null=True), + ), + migrations.AddField( + model_name='boilerinputs', + name='can_serve_dhw', + field=models.BooleanField(blank=True, default=True, help_text='Boolean indicator if boiler can serve domestic hot water load', null=True), + ), + migrations.AddField( + model_name='boilerinputs', + name='can_serve_process_heat', + field=models.BooleanField(blank=True, default=True, help_text='Boolean indicator if boiler can serve process heat load', null=True), + ), + migrations.AddField( + model_name='boilerinputs', + name='can_serve_space_heating', + field=models.BooleanField(blank=True, default=True, help_text='Boolean indicator if boiler can serve space heating load', null=True), + ), + migrations.AddField( + model_name='boileroutputs', + name='thermal_to_dhw_load_series_mmbtu_per_hour', + field=django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, null=True), default=list, size=None), + ), + migrations.AddField( + model_name='boileroutputs', + name='thermal_to_process_heat_load_series_mmbtu_per_hour', + field=django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, null=True), default=list, size=None), + ), + migrations.AddField( + model_name='boileroutputs', + name='thermal_to_space_heating_load_series_mmbtu_per_hour', + field=django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, null=True), default=list, size=None), + ), + migrations.AddField( + model_name='chpinputs', + name='can_serve_dhw', + field=models.BooleanField(blank=True, default=True, help_text='Boolean indicator if CHP can serve hot water load', null=True), + ), + migrations.AddField( + model_name='chpinputs', + name='can_serve_process_heat', + field=models.BooleanField(blank=True, default=True, help_text='Boolean indicator if CHP can serve process heat load', null=True), + ), + migrations.AddField( + model_name='chpinputs', + name='can_serve_space_heating', + field=models.BooleanField(blank=True, default=True, help_text='Boolean indicator if CHP can serve space heating load', null=True), + ), + migrations.AddField( + model_name='existingboilerinputs', + name='can_serve_dhw', + field=models.BooleanField(blank=True, default=True, help_text='Boolean indicator if the existing boiler can serve domestic hot water load', null=True), + ), + migrations.AddField( + model_name='existingboilerinputs', + name='can_serve_process_heat', + field=models.BooleanField(blank=True, default=True, help_text='Boolean indicator if the existing boiler can serve process heat load', null=True), + ), + migrations.AddField( + model_name='existingboilerinputs', + name='can_serve_space_heating', + field=models.BooleanField(blank=True, default=True, help_text='Boolean indicator if the existing boiler can serve space heating load', null=True), + ), + migrations.AddField( + model_name='existingboilerinputs', + name='retire_in_optimal', + field=models.BooleanField(blank=True, default=False, help_text='Boolean indicator if the existing boiler is unavailable in the optimal case (still used in BAU)', null=True), + ), + migrations.AddField( + model_name='existingboileroutputs', + name='thermal_to_dhw_load_series_mmbtu_per_hour', + field=django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, null=True), default=list, size=None), + ), + migrations.AddField( + model_name='existingboileroutputs', + name='thermal_to_process_heat_load_series_mmbtu_per_hour', + field=django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, null=True), default=list, size=None), + ), + migrations.AddField( + model_name='existingboileroutputs', + name='thermal_to_space_heating_load_series_mmbtu_per_hour', + field=django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, null=True), default=list, size=None), + ), + migrations.AddField( + model_name='ghpinputs', + name='can_serve_process_heat', + field=models.BooleanField(blank=True, default=False, help_text='Boolean indicator if GHP can serve process heat load', null=True), + ), + migrations.AddField( + model_name='ghpinputs', + name='can_serve_space_heating', + field=models.BooleanField(blank=True, default=True, help_text='Boolean indicator if GHP can serve space heating load', null=True), + ), + migrations.AddField( + model_name='heatingloadoutputs', + name='annual_calculated_process_heat_boiler_fuel_load_mmbtu', + field=models.FloatField(blank=True, default=0, help_text='Annual site process heat boiler fuel load [MMBTU]', null=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100000000.0)]), + ), + migrations.AddField( + model_name='heatingloadoutputs', + name='annual_calculated_process_heat_thermal_load_mmbtu', + field=models.FloatField(blank=True, default=0, help_text='Annual site process heat load [MMBTU]', null=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100000000.0)]), + ), + migrations.AddField( + model_name='heatingloadoutputs', + name='process_heat_boiler_fuel_load_series_mmbtu_per_hour', + field=django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100000000.0)]), blank=True, default=list, help_text='Hourly process heat boiler fuel load [MMBTU/hr]', size=None), + ), + migrations.AddField( + model_name='heatingloadoutputs', + name='process_heat_thermal_load_series_mmbtu_per_hour', + field=django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100000000.0)]), blank=True, default=list, help_text='Hourly process heat load [MMBTU/hr]', size=None), + ), + migrations.AddField( + model_name='hotthermalstorageinputs', + name='can_serve_dhw', + field=models.BooleanField(blank=True, default=True, help_text='Boolean indicator if hot thermal storage can serve space heating load', null=True), + ), + migrations.AddField( + model_name='hotthermalstorageinputs', + name='can_serve_process_heat', + field=models.BooleanField(blank=True, default=False, help_text='Boolean indicator if hot thermal storage can serve process heat load', null=True), + ), + migrations.AddField( + model_name='hotthermalstorageinputs', + name='can_serve_space_heating', + field=models.BooleanField(blank=True, default=True, help_text='Boolean indicator if hot thermal storage can serve space heating load', null=True), + ), + migrations.AddField( + model_name='hotthermalstorageoutputs', + name='storage_to_dhw_load_series_mmbtu_per_hour', + field=django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, null=True), default=list, size=None), + ), + migrations.AddField( + model_name='hotthermalstorageoutputs', + name='storage_to_process_heat_load_series_mmbtu_per_hour', + field=django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, null=True), default=list, size=None), + ), + migrations.AddField( + model_name='hotthermalstorageoutputs', + name='storage_to_space_heating_load_series_mmbtu_per_hour', + field=django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, null=True), default=list, size=None), + ), + migrations.AddField( + model_name='pvinputs', + name='can_serve_dhw', + field=models.BooleanField(blank=True, default=True, help_text='Boolean indicator if steam turbine can serve space heating load', null=True), + ), + migrations.AddField( + model_name='pvinputs', + name='can_serve_process_heat', + field=models.BooleanField(blank=True, default=True, help_text='Boolean indicator if steam turbine can serve process heat load', null=True), + ), + migrations.AddField( + model_name='pvinputs', + name='can_serve_space_heating', + field=models.BooleanField(blank=True, default=True, help_text='Boolean indicator if steam turbine can serve space heating load', null=True), + ), + migrations.AddField( + model_name='steamturbineoutputs', + name='thermal_to_dhw_load_series_mmbtu_per_hour', + field=django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, null=True), default=list, size=None), + ), + migrations.AddField( + model_name='steamturbineoutputs', + name='thermal_to_process_heat_load_series_mmbtu_per_hour', + field=django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, null=True), default=list, size=None), + ), + migrations.AddField( + model_name='steamturbineoutputs', + name='thermal_to_space_heating_load_series_mmbtu_per_hour', + field=django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, null=True), default=list, size=None), + ), + migrations.AlterField( + model_name='heatingloadoutputs', + name='dhw_boiler_fuel_load_series_mmbtu_per_hour', + field=django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100000000.0)]), blank=True, default=list, help_text='Hourly domestic hot water boiler fuel load [MMBTU/hr]', size=None), + ), + migrations.AlterField( + model_name='heatingloadoutputs', + name='space_heating_boiler_fuel_load_series_mmbtu_per_hour', + field=django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100000000.0)]), blank=True, default=list, help_text='Hourly space heating boiler fuel load [MMBTU/hr]', size=None), + ), + migrations.AlterField( + model_name='heatingloadoutputs', + name='space_heating_thermal_load_series_mmbtu_per_hour', + field=django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100000000.0)]), blank=True, default=list, help_text='Hourly space heating load [MMBTU/hr]', size=None), + ), + migrations.AlterField( + model_name='heatingloadoutputs', + name='total_heating_boiler_fuel_load_series_mmbtu_per_hour', + field=django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100000000.0)]), blank=True, default=list, help_text='Hourly total boiler fuel load [MMBTU/hr]', size=None), + ), + migrations.AlterField( + model_name='pvinputs', + name='tilt', + field=models.FloatField(blank=True, help_text='PV system tilt angle. Default tilt is 20 degrees for fixed arrays (rooftop or ground-mounted) and 0 degrees for axis-tracking systems.', null=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(90)]), + ), + ] From 9a641d78d02041df640f487268415030f4303353 Mon Sep 17 00:00:00 2001 From: Zolan Date: Tue, 7 May 2024 11:14:11 -0600 Subject: [PATCH 088/142] update manifest pointer --- julia_src/Manifest.toml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index 2cae08885..735b72b77 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -1,6 +1,6 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.10.2" +julia_version = "1.10.3" manifest_format = "2.0" project_hash = "b3c6037c53375dada9e36c23f668bcd0efac8f34" @@ -198,7 +198,7 @@ weakdeps = ["Dates", "LinearAlgebra"] [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.1.0+0" +version = "1.1.1+0" [[deps.CompositionsBase]] git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" @@ -917,9 +917,11 @@ uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.REopt]] deps = ["ArchGDAL", "CSV", "CoolProp", "DataFrames", "Dates", "DelimitedFiles", "HTTP", "JLD", "JSON", "JuMP", "LinDistFlow", "LinearAlgebra", "Logging", "MathOptInterface", "Requires", "Roots", "Statistics", "TestEnv"] -git-tree-sha1 = "889950d32d143d0af8f4dd699c7e453e0b0b9589" +git-tree-sha1 = "386a43d35bb0328bf8ab28e33925cfdead6d1f29" +repo-rev = "add-process-heat-load" +repo-url = "https://github.com/NREL/REopt.jl.git" uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6" -rev="add-process-heat-load" +version = "0.45.0" [[deps.Random]] deps = ["SHA"] From f12130d502ca3af343ecf8120a5f2da1b51a5d7e Mon Sep 17 00:00:00 2001 From: Zolan Date: Tue, 7 May 2024 13:15:48 -0600 Subject: [PATCH 089/142] rm superfluous model updates to PV --- .../0059_processheatloadinputs_and_more.py | 15 --------------- reoptjl/models.py | 18 ------------------ 2 files changed, 33 deletions(-) diff --git a/reoptjl/migrations/0059_processheatloadinputs_and_more.py b/reoptjl/migrations/0059_processheatloadinputs_and_more.py index c9966fcc7..69b6a4949 100644 --- a/reoptjl/migrations/0059_processheatloadinputs_and_more.py +++ b/reoptjl/migrations/0059_processheatloadinputs_and_more.py @@ -168,21 +168,6 @@ class Migration(migrations.Migration): name='storage_to_space_heating_load_series_mmbtu_per_hour', field=django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, null=True), default=list, size=None), ), - migrations.AddField( - model_name='pvinputs', - name='can_serve_dhw', - field=models.BooleanField(blank=True, default=True, help_text='Boolean indicator if steam turbine can serve space heating load', null=True), - ), - migrations.AddField( - model_name='pvinputs', - name='can_serve_process_heat', - field=models.BooleanField(blank=True, default=True, help_text='Boolean indicator if steam turbine can serve process heat load', null=True), - ), - migrations.AddField( - model_name='pvinputs', - name='can_serve_space_heating', - field=models.BooleanField(blank=True, default=True, help_text='Boolean indicator if steam turbine can serve space heating load', null=True), - ), migrations.AddField( model_name='steamturbineoutputs', name='thermal_to_dhw_load_series_mmbtu_per_hour', diff --git a/reoptjl/models.py b/reoptjl/models.py index 6b09a1037..07e9ee730 100644 --- a/reoptjl/models.py +++ b/reoptjl/models.py @@ -2834,24 +2834,6 @@ class PV_LOCATION_CHOICES(models.TextChoices): blank=True, help_text="True/False for if technology has the ability to curtail energy production." ) - can_serve_dhw = models.BooleanField( - default=True, - null=True, - blank=True, - help_text="Boolean indicator if steam turbine can serve space heating load" - ) - can_serve_space_heating = models.BooleanField( - default=True, - null=True, - blank=True, - help_text="Boolean indicator if steam turbine can serve space heating load" - ) - can_serve_process_heat = models.BooleanField( - default=True, - null=True, - blank=True, - help_text="Boolean indicator if steam turbine can serve process heat load" - ) operating_reserve_required_fraction = models.FloatField( validators=[ From 4507f18f8489d1c49babd86a4b8509659dd26831 Mon Sep 17 00:00:00 2001 From: Zolan Date: Tue, 7 May 2024 13:16:30 -0600 Subject: [PATCH 090/142] point to develop branch --- julia_src/Manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index 735b72b77..6ee4132c5 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -917,11 +917,11 @@ uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.REopt]] deps = ["ArchGDAL", "CSV", "CoolProp", "DataFrames", "Dates", "DelimitedFiles", "HTTP", "JLD", "JSON", "JuMP", "LinDistFlow", "LinearAlgebra", "Logging", "MathOptInterface", "Requires", "Roots", "Statistics", "TestEnv"] -git-tree-sha1 = "386a43d35bb0328bf8ab28e33925cfdead6d1f29" -repo-rev = "add-process-heat-load" +git-tree-sha1 = "a72618235b98d6617e51c1e823e8ca01b5c7e404" +repo-rev = "develop" repo-url = "https://github.com/NREL/REopt.jl.git" uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6" -version = "0.45.0" +version = "0.46.0" [[deps.Random]] deps = ["SHA"] From ed3257354764038e7ea813f75583061e46ba825a Mon Sep 17 00:00:00 2001 From: Zolan Date: Tue, 7 May 2024 17:06:49 -0600 Subject: [PATCH 091/142] update tolerance on test --- reoptjl/test/test_job_endpoint.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reoptjl/test/test_job_endpoint.py b/reoptjl/test/test_job_endpoint.py index 9ccf40042..b9e9a3479 100644 --- a/reoptjl/test/test_job_endpoint.py +++ b/reoptjl/test/test_job_endpoint.py @@ -226,7 +226,8 @@ def test_superset_input_fields(self): resp = self.api_client.get(f'/v3/job/{run_uuid}/results') r = json.loads(resp.content) results = r["outputs"] - self.assertAlmostEqual(results["Financial"]["npv"], -258533.19, places=-3) + print(r["Messages"]) + self.assertAlmostEqual(results["Financial"]["npv"], -258533.19, delta=0.01*results["Financiel"]["lcc"]) assert(resp.status_code==200) def test_steamturbine_defaults_from_julia(self): From c08c77f6de7a3f0051c15a6cf07772ba9a9bffe3 Mon Sep 17 00:00:00 2001 From: Zolan Date: Tue, 7 May 2024 17:06:56 -0600 Subject: [PATCH 092/142] Update Manifest.toml --- julia_src/Manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index 6ee4132c5..9fdd36be2 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -917,7 +917,7 @@ uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.REopt]] deps = ["ArchGDAL", "CSV", "CoolProp", "DataFrames", "Dates", "DelimitedFiles", "HTTP", "JLD", "JSON", "JuMP", "LinDistFlow", "LinearAlgebra", "Logging", "MathOptInterface", "Requires", "Roots", "Statistics", "TestEnv"] -git-tree-sha1 = "a72618235b98d6617e51c1e823e8ca01b5c7e404" +git-tree-sha1 = "01338b98d1a5a63ce1ae08dd14f7370f76ad6051" repo-rev = "develop" repo-url = "https://github.com/NREL/REopt.jl.git" uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6" From e96130873b203e4a0e7a513628a2491c98bdd2be Mon Sep 17 00:00:00 2001 From: Zolan Date: Wed, 8 May 2024 12:10:45 -0600 Subject: [PATCH 093/142] add heat-load-specific outputs to CHPOutputs --- .../0059_processheatloadinputs_and_more.py | 17 ++++++++++++++++- reoptjl/models.py | 12 ++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/reoptjl/migrations/0059_processheatloadinputs_and_more.py b/reoptjl/migrations/0059_processheatloadinputs_and_more.py index 69b6a4949..dfbdbb7a5 100644 --- a/reoptjl/migrations/0059_processheatloadinputs_and_more.py +++ b/reoptjl/migrations/0059_processheatloadinputs_and_more.py @@ -1,4 +1,4 @@ -# Generated by Django 4.0.7 on 2024-05-07 16:49 +# Generated by Django 4.0.7 on 2024-05-08 18:09 import django.contrib.postgres.fields import django.core.validators @@ -73,6 +73,21 @@ class Migration(migrations.Migration): name='can_serve_space_heating', field=models.BooleanField(blank=True, default=True, help_text='Boolean indicator if CHP can serve space heating load', null=True), ), + migrations.AddField( + model_name='chpoutputs', + name='thermal_to_dhw_load_series_mmbtu_per_hour', + field=django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, null=True), default=list, size=None), + ), + migrations.AddField( + model_name='chpoutputs', + name='thermal_to_process_heat_load_series_mmbtu_per_hour', + field=django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, null=True), default=list, size=None), + ), + migrations.AddField( + model_name='chpoutputs', + name='thermal_to_space_heating_load_series_mmbtu_per_hour', + field=django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, null=True), default=list, size=None), + ), migrations.AddField( model_name='existingboilerinputs', name='can_serve_dhw', diff --git a/reoptjl/models.py b/reoptjl/models.py index 07e9ee730..912d5d23d 100644 --- a/reoptjl/models.py +++ b/reoptjl/models.py @@ -4476,6 +4476,18 @@ class CHPOutputs(BaseModel, models.Model): models.FloatField(null=True, blank=True), default = list, ) + thermal_to_dhw_load_series_mmbtu_per_hour = ArrayField( + models.FloatField(null=True, blank=True), + default = list, + ) + thermal_to_space_heating_load_series_mmbtu_per_hour = ArrayField( + models.FloatField(null=True, blank=True), + default = list, + ) + thermal_to_process_heat_load_series_mmbtu_per_hour = ArrayField( + models.FloatField(null=True, blank=True), + default = list, + ) def clean(): pass From 643903ae2e02fa57c8fd4b845f0fd840a91a1239 Mon Sep 17 00:00:00 2001 From: Zolan Date: Wed, 8 May 2024 13:07:59 -0600 Subject: [PATCH 094/142] update lcc test condition for test_superset_input_fields --- reoptjl/test/test_job_endpoint.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/reoptjl/test/test_job_endpoint.py b/reoptjl/test/test_job_endpoint.py index b9e9a3479..3e386c228 100644 --- a/reoptjl/test/test_job_endpoint.py +++ b/reoptjl/test/test_job_endpoint.py @@ -226,8 +226,7 @@ def test_superset_input_fields(self): resp = self.api_client.get(f'/v3/job/{run_uuid}/results') r = json.loads(resp.content) results = r["outputs"] - print(r["Messages"]) - self.assertAlmostEqual(results["Financial"]["npv"], -258533.19, delta=0.01*results["Financiel"]["lcc"]) + self.assertAlmostEqual(results["Financial"]["npv"], -258533.19, delta=0.01*results["Financial"]["lcc"]) assert(resp.status_code==200) def test_steamturbine_defaults_from_julia(self): From 324f738e686f46115ebf7509ad3b2e3cc74b7f30 Mon Sep 17 00:00:00 2001 From: Zolan Date: Wed, 8 May 2024 22:26:20 -0600 Subject: [PATCH 095/142] point to feature branch in manifest for GHP bugfix --- julia_src/Manifest.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index 9fdd36be2..83a1172a6 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -917,8 +917,8 @@ uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.REopt]] deps = ["ArchGDAL", "CSV", "CoolProp", "DataFrames", "Dates", "DelimitedFiles", "HTTP", "JLD", "JSON", "JuMP", "LinDistFlow", "LinearAlgebra", "Logging", "MathOptInterface", "Requires", "Roots", "Statistics", "TestEnv"] -git-tree-sha1 = "01338b98d1a5a63ce1ae08dd14f7370f76ad6051" -repo-rev = "develop" +git-tree-sha1 = "28bbe232da58b84194f3c1b4f0d60d577f24ba2c" +repo-rev = "fix-ghp-storage-dispatch" repo-url = "https://github.com/NREL/REopt.jl.git" uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6" version = "0.46.0" From 80078108be79d5ca55ca1db04997fcc5145578cd Mon Sep 17 00:00:00 2001 From: Zolan Date: Thu, 9 May 2024 09:47:21 -0600 Subject: [PATCH 096/142] Add test for process heat load in thermal results --- reoptjl/test/posts/test_thermal_in_results.json | 3 +++ reoptjl/test/test_job_endpoint.py | 1 + 2 files changed, 4 insertions(+) diff --git a/reoptjl/test/posts/test_thermal_in_results.json b/reoptjl/test/posts/test_thermal_in_results.json index 2918f87a4..2be1bc8ce 100644 --- a/reoptjl/test/posts/test_thermal_in_results.json +++ b/reoptjl/test/posts/test_thermal_in_results.json @@ -37,6 +37,9 @@ "doe_reference_name": "Hospital", "annual_mmbtu": 500.0 }, + "ProcessHeatLoad": { + "annual_mmbtu": 100 + }, "ExistingBoiler": { "efficiency": 0.72, "production_type": "hot_water", diff --git a/reoptjl/test/test_job_endpoint.py b/reoptjl/test/test_job_endpoint.py index 3e386c228..fe2b227d0 100644 --- a/reoptjl/test/test_job_endpoint.py +++ b/reoptjl/test/test_job_endpoint.py @@ -136,6 +136,7 @@ def test_thermal_in_results(self): self.assertIn("ExistingChiller",list(results.keys())) self.assertIn("ExistingBoiler", list(results.keys())) self.assertIn("HeatingLoad", list(results.keys())) + self.assertIn("process_heat_thermal_load_series_mmbtu_per_hour", list(results["HeatingLoad"].keys())) self.assertIn("HotThermalStorage", list(results.keys())) self.assertIn("ColdThermalStorage", list(results.keys())) self.assertIn("AbsorptionChiller", list(results.keys())) From 68b2a0ff8f99a42d333088f894a5b9b3cbac14b0 Mon Sep 17 00:00:00 2001 From: Zolan Date: Thu, 9 May 2024 15:08:33 -0600 Subject: [PATCH 097/142] add booleans to SteamTurbineInputs --- .../0059_processheatloadinputs_and_more.py | 17 ++++++++++++++++- reoptjl/models.py | 19 ++++++++++++++++++- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/reoptjl/migrations/0059_processheatloadinputs_and_more.py b/reoptjl/migrations/0059_processheatloadinputs_and_more.py index dfbdbb7a5..5390cffbd 100644 --- a/reoptjl/migrations/0059_processheatloadinputs_and_more.py +++ b/reoptjl/migrations/0059_processheatloadinputs_and_more.py @@ -1,4 +1,4 @@ -# Generated by Django 4.0.7 on 2024-05-08 18:09 +# Generated by Django 4.0.7 on 2024-05-09 20:02 import django.contrib.postgres.fields import django.core.validators @@ -183,6 +183,21 @@ class Migration(migrations.Migration): name='storage_to_space_heating_load_series_mmbtu_per_hour', field=django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, null=True), default=list, size=None), ), + migrations.AddField( + model_name='steamturbineinputs', + name='can_serve_dhw', + field=models.BooleanField(blank=True, default=True, help_text='Boolean indicator if steam turbine can serve space heating load', null=True), + ), + migrations.AddField( + model_name='steamturbineinputs', + name='can_serve_process_heat', + field=models.BooleanField(blank=True, default=False, help_text='Boolean indicator if steam turbine can serve process heat load', null=True), + ), + migrations.AddField( + model_name='steamturbineinputs', + name='can_serve_space_heating', + field=models.BooleanField(blank=True, default=True, help_text='Boolean indicator if steam turbine can serve space heating load', null=True), + ), migrations.AddField( model_name='steamturbineoutputs', name='thermal_to_dhw_load_series_mmbtu_per_hour', diff --git a/reoptjl/models.py b/reoptjl/models.py index 912d5d23d..76a398c5f 100644 --- a/reoptjl/models.py +++ b/reoptjl/models.py @@ -5559,7 +5559,24 @@ class SIZE_CLASS_LIST(models.IntegerChoices): help_text="True/False for if technology has the ability to curtail energy production." ) - + can_serve_dhw = models.BooleanField( + default=True, + null=True, + blank=True, + help_text="Boolean indicator if steam turbine can serve space heating load" + ) + can_serve_space_heating = models.BooleanField( + default=True, + null=True, + blank=True, + help_text="Boolean indicator if steam turbine can serve space heating load" + ) + can_serve_process_heat = models.BooleanField( + default=False, + null=True, + blank=True, + help_text="Boolean indicator if steam turbine can serve process heat load" + ) macrs_option_years = models.IntegerField( default=MACRS_YEARS_CHOICES.ZERO, From 1aa8d45b29218ff11bad4c37e8c96281de498eb4 Mon Sep 17 00:00:00 2001 From: Zolan Date: Thu, 9 May 2024 15:32:23 -0600 Subject: [PATCH 098/142] add heat-load-specific outputs to test --- reoptjl/test/test_job_endpoint.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/reoptjl/test/test_job_endpoint.py b/reoptjl/test/test_job_endpoint.py index fe2b227d0..5ac8f3dc9 100644 --- a/reoptjl/test/test_job_endpoint.py +++ b/reoptjl/test/test_job_endpoint.py @@ -133,11 +133,18 @@ def test_thermal_in_results(self): self.assertIn("CoolingLoad", list(inputs.keys())) self.assertIn("CoolingLoad", list(results.keys())) self.assertIn("CHP", list(results.keys())) + self.assertIn("thermal_to_dhw_load_series_mmbtu_per_hour", list(results["CHP"].keys())) + self.assertIn("thermal_to_space_heating_load_series_mmbtu_per_hour", list(results["CHP"].keys())) + self.assertIn("thermal_to_dhw_load_series_mmbtu_per_hour", list(results["CHP"].keys())) self.assertIn("ExistingChiller",list(results.keys())) self.assertIn("ExistingBoiler", list(results.keys())) self.assertIn("HeatingLoad", list(results.keys())) self.assertIn("process_heat_thermal_load_series_mmbtu_per_hour", list(results["HeatingLoad"].keys())) + self.assertIn("process_heat_boiler_fuel_load_series_mmbtu_per_hour", list(results["HeatingLoad"].keys())) self.assertIn("HotThermalStorage", list(results.keys())) + self.assertIn("storage_to_dhw_load_series_mmbtu_per_hour", list(results["HotThermalStorage"].keys())) + self.assertIn("storage_to_space_heating_load_series_mmbtu_per_hour", list(results["HotThermalStorage"].keys())) + self.assertIn("storage_to_dhw_load_series_mmbtu_per_hour", list(results["HotThermalStorage"].keys())) self.assertIn("ColdThermalStorage", list(results.keys())) self.assertIn("AbsorptionChiller", list(results.keys())) self.assertIn("GHP", list(results.keys())) From af2ed82b7f8984e3fc5125369fc2712e2081af75 Mon Sep 17 00:00:00 2001 From: Zolan Date: Thu, 9 May 2024 15:46:40 -0600 Subject: [PATCH 099/142] reset non-REopt manifest changes --- julia_src/Manifest.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index 83a1172a6..8cfb22e46 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -1,6 +1,6 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.10.3" +julia_version = "1.10.2" manifest_format = "2.0" project_hash = "b3c6037c53375dada9e36c23f668bcd0efac8f34" @@ -198,7 +198,7 @@ weakdeps = ["Dates", "LinearAlgebra"] [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.1.1+0" +version = "1.1.0+0" [[deps.CompositionsBase]] git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" From 44e40273908586036ac17b7ee009161312c730e9 Mon Sep 17 00:00:00 2001 From: Alex Zolan Date: Thu, 9 May 2024 15:53:44 -0600 Subject: [PATCH 100/142] Update CHANGELOG.md --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 37d4a6034..42e7068d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,19 @@ Classify the change according to the following categories: ##### Removed ### Patches +## Develop 2024-05-09 +### Minor Updates +#### Added +- In `reoptjl/models.py`, added the following fields: + - booleans **can_serve_dhw**, **can_serve_space_heating**, and **can_serve_process_heat** to models **CHPInputs**, **ExistingBoilerInputs**, **BoilerInputs**, **SteamTurbineInputs**, and **HotThermalStorageInputs** + - booleans **can_serve_space_heating** and **can_serve_process_heat** to model **GHPInputs** + - arrays **storage_to_dhw_load_series_mmbtu_per_hour**, **storage_to_space_heating_load_series_mmbtu_per_hour** and **storage_to_process_heat_load_series_mmbtu_per_hour** to model **HotThermalStorageOutputs** + - **heating_load_input** to model **AbsorptionChillerInputs** + - arrays **thermal_to_dhw_load_series_mmbtu_per_hour**, **thermal_to_space_heating_load_series_mmbtu_per_hour**, and **thermal_to_process_heat_load_series_mmbtu_per_hour** to models **CHPOutputs**, **ExistingBoilerOutputs**, **BoilerOutputs**, **SteamTurbineOutputs**, and **HotThermalStorageOutputs** +- In `reopt.jl/models.py`, added new model **ProcessHeatLoadInputs** with references in `reoptjl/validators.py` and `reoptjl/views.py` +- Added process heat load to test scenario `reoptjl/test/posts/test_thermal_in_results.json` +- Added tests for the presence of process heat load and heat-load-specfic outputs to `test_thermal_in_results` within `reoptjl/test/test_job_endpoint.py` + ## v3.8.0 ### Minor Updates #### Changed From 7415e8adde300f9ce25fd463a8bb84b8924c761c Mon Sep 17 00:00:00 2001 From: Zolan Date: Thu, 9 May 2024 20:55:59 -0600 Subject: [PATCH 101/142] change steam turbine can_serve_process_heat default to True --- reoptjl/migrations/0059_processheatloadinputs_and_more.py | 2 +- reoptjl/models.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/reoptjl/migrations/0059_processheatloadinputs_and_more.py b/reoptjl/migrations/0059_processheatloadinputs_and_more.py index 5390cffbd..7c0bed303 100644 --- a/reoptjl/migrations/0059_processheatloadinputs_and_more.py +++ b/reoptjl/migrations/0059_processheatloadinputs_and_more.py @@ -191,7 +191,7 @@ class Migration(migrations.Migration): migrations.AddField( model_name='steamturbineinputs', name='can_serve_process_heat', - field=models.BooleanField(blank=True, default=False, help_text='Boolean indicator if steam turbine can serve process heat load', null=True), + field=models.BooleanField(blank=True, default=True, help_text='Boolean indicator if steam turbine can serve process heat load', null=True), ), migrations.AddField( model_name='steamturbineinputs', diff --git a/reoptjl/models.py b/reoptjl/models.py index 76a398c5f..c2da664ca 100644 --- a/reoptjl/models.py +++ b/reoptjl/models.py @@ -5572,7 +5572,7 @@ class SIZE_CLASS_LIST(models.IntegerChoices): help_text="Boolean indicator if steam turbine can serve space heating load" ) can_serve_process_heat = models.BooleanField( - default=False, + default=True, null=True, blank=True, help_text="Boolean indicator if steam turbine can serve process heat load" From 6b22d333648848dded146a32c83585986fb5839f Mon Sep 17 00:00:00 2001 From: adfarth Date: Thu, 9 May 2024 21:51:15 -0600 Subject: [PATCH 102/142] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 42e7068d1..5f0bf52f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,7 @@ Classify the change according to the following categories: - arrays **storage_to_dhw_load_series_mmbtu_per_hour**, **storage_to_space_heating_load_series_mmbtu_per_hour** and **storage_to_process_heat_load_series_mmbtu_per_hour** to model **HotThermalStorageOutputs** - **heating_load_input** to model **AbsorptionChillerInputs** - arrays **thermal_to_dhw_load_series_mmbtu_per_hour**, **thermal_to_space_heating_load_series_mmbtu_per_hour**, and **thermal_to_process_heat_load_series_mmbtu_per_hour** to models **CHPOutputs**, **ExistingBoilerOutputs**, **BoilerOutputs**, **SteamTurbineOutputs**, and **HotThermalStorageOutputs** + - boolean **retire_in_optimal** to **ExistingBoilerInputs** - In `reopt.jl/models.py`, added new model **ProcessHeatLoadInputs** with references in `reoptjl/validators.py` and `reoptjl/views.py` - Added process heat load to test scenario `reoptjl/test/posts/test_thermal_in_results.json` - Added tests for the presence of process heat load and heat-load-specfic outputs to `test_thermal_in_results` within `reoptjl/test/test_job_endpoint.py` From abf56a1e8cf0c94e1e24797785f88290bf010b69 Mon Sep 17 00:00:00 2001 From: adfarth Date: Thu, 9 May 2024 21:56:04 -0600 Subject: [PATCH 103/142] spelling fix --- reoptjl/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reoptjl/models.py b/reoptjl/models.py index c2da664ca..53c907f49 100644 --- a/reoptjl/models.py +++ b/reoptjl/models.py @@ -6694,7 +6694,7 @@ class AbsorptionChillerInputs(BaseModel, models.Model): )) HEATING_LOAD_INPUT = models.TextChoices('HEATING_LOAD_INPUT', ( - 'DomesitHotWater', + 'DomesticHotWater', 'SpaceHeating', 'ProcessHeat' )) From ae8fceac0a30a8552d465260066a59d28f2edd00 Mon Sep 17 00:00:00 2001 From: Zolan Date: Fri, 10 May 2024 09:53:38 -0600 Subject: [PATCH 104/142] point to v0.46.1 of REopt.jl --- julia_src/Manifest.toml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index 8cfb22e46..ef21d5b2a 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -917,11 +917,9 @@ uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.REopt]] deps = ["ArchGDAL", "CSV", "CoolProp", "DataFrames", "Dates", "DelimitedFiles", "HTTP", "JLD", "JSON", "JuMP", "LinDistFlow", "LinearAlgebra", "Logging", "MathOptInterface", "Requires", "Roots", "Statistics", "TestEnv"] -git-tree-sha1 = "28bbe232da58b84194f3c1b4f0d60d577f24ba2c" -repo-rev = "fix-ghp-storage-dispatch" -repo-url = "https://github.com/NREL/REopt.jl.git" +git-tree-sha1 = "3c40f3939f79c3f66df69e9acc503fef614cdd63" uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6" -version = "0.46.0" +version = "0.46.1" [[deps.Random]] deps = ["SHA"] From d7d6652c4dd3dcc0970c7305c035673fd374f744 Mon Sep 17 00:00:00 2001 From: Zolan Date: Fri, 10 May 2024 09:55:02 -0600 Subject: [PATCH 105/142] update comment in ProcessHeatLoadInputs --- reoptjl/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reoptjl/models.py b/reoptjl/models.py index c2da664ca..35d66ba6b 100644 --- a/reoptjl/models.py +++ b/reoptjl/models.py @@ -6372,7 +6372,7 @@ def clean(self): self.addressable_load_fraction = list([1.0]) # should not convert to timeseries, in case it is to be used with monthly_mmbtu or annual_mmbtu class ProcessHeatLoadInputs(BaseModel, models.Model): - # DHW + # Process Heat key = "ProcessHeatLoad" meta = models.OneToOneField( From 991e2a0d1c4e487b07089856d030a9513e81d93b Mon Sep 17 00:00:00 2001 From: adfarth Date: Mon, 13 May 2024 13:15:39 -0600 Subject: [PATCH 106/142] Update CHANGELOG.md --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f0bf52f6..c896b284f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,7 +26,7 @@ Classify the change according to the following categories: ##### Removed ### Patches -## Develop 2024-05-09 +## v3.9.0 ### Minor Updates #### Added - In `reoptjl/models.py`, added the following fields: @@ -39,6 +39,8 @@ Classify the change according to the following categories: - In `reopt.jl/models.py`, added new model **ProcessHeatLoadInputs** with references in `reoptjl/validators.py` and `reoptjl/views.py` - Added process heat load to test scenario `reoptjl/test/posts/test_thermal_in_results.json` - Added tests for the presence of process heat load and heat-load-specfic outputs to `test_thermal_in_results` within `reoptjl/test/test_job_endpoint.py` +#### Changed +- Point to REopt.jl v0.46.1 which includes bug fixes in net metering and updated PV resource data calls ## v3.8.0 ### Minor Updates From 547986a0938012db97b66a87f2303c4ba8d44f06 Mon Sep 17 00:00:00 2001 From: adfarth Date: Mon, 13 May 2024 13:20:31 -0600 Subject: [PATCH 107/142] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c896b284f..d582c6dda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,8 @@ Classify the change according to the following categories: - Added tests for the presence of process heat load and heat-load-specfic outputs to `test_thermal_in_results` within `reoptjl/test/test_job_endpoint.py` #### Changed - Point to REopt.jl v0.46.1 which includes bug fixes in net metering and updated PV resource data calls +#### Fixed +- Fix bug in setting default ElectricUtility.emissions_factor_CO2_decrease_fraction. Previously, user-input values were getting overwritten. ## v3.8.0 ### Minor Updates From 05861e27f6f1b537271f90811961ab2adaf10454 Mon Sep 17 00:00:00 2001 From: bill-becker Date: Fri, 31 May 2024 10:56:43 -0600 Subject: [PATCH 108/142] Update REopt.jl to v0.47.0 --- julia_src/Manifest.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index ef21d5b2a..46852a1c6 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -917,9 +917,9 @@ uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.REopt]] deps = ["ArchGDAL", "CSV", "CoolProp", "DataFrames", "Dates", "DelimitedFiles", "HTTP", "JLD", "JSON", "JuMP", "LinDistFlow", "LinearAlgebra", "Logging", "MathOptInterface", "Requires", "Roots", "Statistics", "TestEnv"] -git-tree-sha1 = "3c40f3939f79c3f66df69e9acc503fef614cdd63" +git-tree-sha1 = "d916e15578370ec306da3acdbabd8157a25127e1" uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6" -version = "0.46.1" +version = "0.47.0" [[deps.Random]] deps = ["SHA"] From d6dc85c7672d7982a74f893b769977f33b887e3f Mon Sep 17 00:00:00 2001 From: bill-becker Date: Sat, 1 Jun 2024 14:16:25 -0600 Subject: [PATCH 109/142] Add new ProcessHeatInputs and fix thermal job test --- ...puts_addressable_load_fraction_and_more.py | 55 ++++++++++ reoptjl/models.py | 102 +++++++++++++++++- .../test/posts/test_thermal_in_results.json | 1 + 3 files changed, 153 insertions(+), 5 deletions(-) create mode 100644 reoptjl/migrations/0060_processheatloadinputs_addressable_load_fraction_and_more.py diff --git a/reoptjl/migrations/0060_processheatloadinputs_addressable_load_fraction_and_more.py b/reoptjl/migrations/0060_processheatloadinputs_addressable_load_fraction_and_more.py new file mode 100644 index 000000000..87d3c7c49 --- /dev/null +++ b/reoptjl/migrations/0060_processheatloadinputs_addressable_load_fraction_and_more.py @@ -0,0 +1,55 @@ +# Generated by Django 4.0.7 on 2024-06-01 20:15 + +import django.contrib.postgres.fields +import django.core.validators +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('reoptjl', '0059_processheatloadinputs_and_more'), + ] + + operations = [ + migrations.AddField( + model_name='processheatloadinputs', + name='addressable_load_fraction', + field=django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(1.0)]), blank=True, default=list, help_text='Fraction of input fuel load which is addressable by heating technologies (default is 1.0).Can be a scalar or vector with length aligned with use of monthly_mmbtu (12) or fuel_loads_mmbtu_per_hour.', size=None), + ), + migrations.AddField( + model_name='processheatloadinputs', + name='blended_industry_reference_names', + field=django.contrib.postgres.fields.ArrayField(base_field=models.TextField(blank=True, choices=[('Chemical', 'Chemical'), ('Warehouse', 'Warehouse'), ('FlatLoad', 'Flatload'), ('FlatLoad_24_5', 'Flatload 24 5'), ('FlatLoad_16_7', 'Flatload 16 7'), ('FlatLoad_16_5', 'Flatload 16 5'), ('FlatLoad_8_7', 'Flatload 8 7'), ('FlatLoad_8_5', 'Flatload 8 5')], null=True), blank=True, default=list, help_text='Used in concert with blended_industry_reference_percents to create a blended load profile from multiple Industrial reference facility/sector types.', size=None), + ), + migrations.AddField( + model_name='processheatloadinputs', + name='blended_industry_reference_percents', + field=django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, null=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(1.0)]), blank=True, default=list, help_text='Used in concert with blended_industry_reference_names to create a blended load profile from multiple Industrial reference facility/sector types. Must sum to 1.0.', size=None), + ), + migrations.AddField( + model_name='processheatloadinputs', + name='industry_reference_name', + field=models.TextField(blank=True, choices=[('Chemical', 'Chemical'), ('Warehouse', 'Warehouse'), ('FlatLoad', 'Flatload'), ('FlatLoad_24_5', 'Flatload 24 5'), ('FlatLoad_16_7', 'Flatload 16 7'), ('FlatLoad_16_5', 'Flatload 16 5'), ('FlatLoad_8_7', 'Flatload 8 7'), ('FlatLoad_8_5', 'Flatload 8 5')], help_text='Industrial process heat load reference facility/sector type', null=True), + ), + migrations.AddField( + model_name='processheatloadinputs', + name='monthly_mmbtu', + field=django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100000000.0)]), blank=True, default=list, help_text="Monthly site process heat fuel consumption in [MMbtu], used to scale simulated default building load profile for the site's climate zone", size=None), + ), + migrations.AlterField( + model_name='absorptionchillerinputs', + name='heating_load_input', + field=models.TextField(blank=True, choices=[('DomesticHotWater', 'Domestichotwater'), ('SpaceHeating', 'Spaceheating'), ('ProcessHeat', 'Processheat')], help_text='Absorption chiller heat input - determines what heating load is added to by absorption chiller use', null=True), + ), + migrations.AlterField( + model_name='processheatloadinputs', + name='annual_mmbtu', + field=models.FloatField(blank=True, help_text='Annual site process heat fuel consumption, used to scale simulated default industry load profile [MMBtu]', null=True, validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(100000000.0)]), + ), + migrations.AlterField( + model_name='processheatloadinputs', + name='fuel_loads_mmbtu_per_hour', + field=django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True), blank=True, default=list, help_text='Vector of process heat fuel loads [mmbtu/hr] over one year. Must be hourly (8,760 samples), 30 minute (17,520 samples), or 15 minute (35,040 samples). All non-net load values must be greater than or equal to zero. ', size=None), + ), + ] diff --git a/reoptjl/models.py b/reoptjl/models.py index 8d4e1ae11..e9419054b 100644 --- a/reoptjl/models.py +++ b/reoptjl/models.py @@ -6384,10 +6384,24 @@ class ProcessHeatLoadInputs(BaseModel, models.Model): possible_sets = [ ["fuel_loads_mmbtu_per_hour"], - ["annual_mmbtu"], - [], + ["industry_reference_name", "monthly_mmbtu"], + ["annual_mmbtu", "industry_reference_name"], + ["industry_reference_name"], + ["blended_industry_reference_names", "blended_industry_reference_percents"], + [] ] + INDUSTRY_REFERENCE_NAME = models.TextChoices('INDUSTRY_REFERENCE_NAME', ( + 'Chemical ' + 'Warehouse ' + 'FlatLoad ' + 'FlatLoad_24_5 ' + 'FlatLoad_16_7 ' + 'FlatLoad_16_5 ' + 'FlatLoad_8_7 ' + 'FlatLoad_8_5' + )) + annual_mmbtu = models.FloatField( validators=[ MinValueValidator(1), @@ -6395,8 +6409,28 @@ class ProcessHeatLoadInputs(BaseModel, models.Model): ], null=True, blank=True, - help_text=("Annual site process heat consumption, used " - "to scale simulated load profile [MMBtu]") + help_text=("Annual site process heat fuel consumption, used " + "to scale simulated default industry load profile [MMBtu]") + ) + + industry_reference_name = models.TextField( + null=True, + blank=True, + choices=INDUSTRY_REFERENCE_NAME.choices, + help_text=("Industrial process heat load reference facility/sector type") + ) + + monthly_mmbtu = ArrayField( + models.FloatField( + validators=[ + MinValueValidator(0), + MaxValueValidator(MAX_BIG_NUMBER) + ], + blank=True + ), + default=list, blank=True, + help_text=("Monthly site process heat fuel consumption in [MMbtu], used " + "to scale simulated default building load profile for the site's climate zone") ) fuel_loads_mmbtu_per_hour = ArrayField( @@ -6405,11 +6439,50 @@ class ProcessHeatLoadInputs(BaseModel, models.Model): ), default=list, blank=True, - help_text=("Typical load over all hours in one year. Must be hourly (8,760 samples), 30 minute (17," + help_text=("Vector of process heat fuel loads [mmbtu/hr] over one year. Must be hourly (8,760 samples), 30 minute (17," "520 samples), or 15 minute (35,040 samples). All non-net load values must be greater than or " "equal to zero. " ) + ) + + blended_industry_reference_names = ArrayField( + models.TextField( + choices=INDUSTRY_REFERENCE_NAME.choices, + blank=True, + null=True + ), + default=list, + blank=True, + help_text=("Used in concert with blended_industry_reference_percents to create a blended load profile from multiple " + "Industrial reference facility/sector types.") + ) + blended_industry_reference_percents = ArrayField( + models.FloatField( + null=True, blank=True, + validators=[ + MinValueValidator(0), + MaxValueValidator(1.0) + ], + ), + default=list, + blank=True, + help_text=("Used in concert with blended_industry_reference_names to create a blended load profile from multiple " + "Industrial reference facility/sector types. Must sum to 1.0.") + ) + + addressable_load_fraction = ArrayField( + models.FloatField( + validators=[ + MinValueValidator(0), + MaxValueValidator(1.0) + ], + blank=True + ), + default=list, + blank=True, + help_text=( "Fraction of input fuel load which is addressable by heating technologies (default is 1.0)." + "Can be a scalar or vector with length aligned with use of monthly_mmbtu (12) or fuel_loads_mmbtu_per_hour.") ) def clean(self): @@ -6420,6 +6493,25 @@ def clean(self): error_messages["required inputs"] = \ "Must provide at least one set of valid inputs from {}.".format(self.possible_sets) + if len(self.blended_industry_reference_names) > 0 and self.industry_reference_name == "": + if len(self.blended_industry_reference_names) != len(self.blended_industry_reference_percents): + error_messages["blended_industry_reference_names"] = \ + "The number of blended_industry_reference_names must equal the number of blended_industry_reference_percents." + if not math.isclose(sum(self.blended_industry_reference_percents), 1.0): + error_messages["blended_industry_reference_percents"] = "Sum must = 1.0." + + if self.industry_reference_name != "" or \ + len(self.blended_industry_reference_names) > 0: + self.year = 2017 # the validator provides an "info" message regarding this) + + if self.addressable_load_fraction == None: + self.addressable_load_fraction = list([1.0]) # should not convert to timeseries, in case it is to be used with monthly_mmbtu or annual_mmbtu + + # possible sets for defining load profile + if not at_least_one_set(self.dict, self.possible_sets): + error_messages["required inputs"] = \ + "Must provide at least one set of valid inputs from {}.".format(self.possible_sets) + class HeatingLoadOutputs(BaseModel, models.Model): key = "HeatingLoadOutputs" diff --git a/reoptjl/test/posts/test_thermal_in_results.json b/reoptjl/test/posts/test_thermal_in_results.json index 2be1bc8ce..32231c119 100644 --- a/reoptjl/test/posts/test_thermal_in_results.json +++ b/reoptjl/test/posts/test_thermal_in_results.json @@ -38,6 +38,7 @@ "annual_mmbtu": 500.0 }, "ProcessHeatLoad": { + "industry_reference_name": "FlatLoad", "annual_mmbtu": 100 }, "ExistingBoiler": { From 5de08a27f9c13c816bec67c68acfaf4e5946f3a1 Mon Sep 17 00:00:00 2001 From: bill-becker Date: Tue, 4 Jun 2024 11:46:53 -0600 Subject: [PATCH 110/142] Update REopt.jl to v0.47.1 and Changelog --- CHANGELOG.md | 7 +++++++ julia_src/Manifest.toml | 4 ++-- reoptjl/api.py | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d582c6dda..36949fa54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,13 @@ Classify the change according to the following categories: ##### Removed ### Patches +## v3.9.1 +### Minor Updates +#### Added +- Added `ProcessHeatLoadInputs` for new ways to input `ProcessHeatLoad`, similar to other loads +#### Fixed +- See fixes and changes here: https://github.com/NREL/REopt.jl/releases/tag/v0.47.0 + ## v3.9.0 ### Minor Updates #### Added diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index 46852a1c6..d60586baa 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -917,9 +917,9 @@ uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.REopt]] deps = ["ArchGDAL", "CSV", "CoolProp", "DataFrames", "Dates", "DelimitedFiles", "HTTP", "JLD", "JSON", "JuMP", "LinDistFlow", "LinearAlgebra", "Logging", "MathOptInterface", "Requires", "Roots", "Statistics", "TestEnv"] -git-tree-sha1 = "d916e15578370ec306da3acdbabd8157a25127e1" +git-tree-sha1 = "b51d56a6398f302100004184b64bbe3d1e137277" uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6" -version = "0.47.0" +version = "0.47.1" [[deps.Random]] deps = ["SHA"] diff --git a/reoptjl/api.py b/reoptjl/api.py index e0c911c50..bd90ef685 100644 --- a/reoptjl/api.py +++ b/reoptjl/api.py @@ -98,7 +98,7 @@ def obj_create(self, bundle, **kwargs): meta = { "run_uuid": run_uuid, "api_version": 3, - "reopt_version": "0.45.0", + "reopt_version": "0.47.1", "status": "Validating..." } bundle.data.update({"APIMeta": meta}) From 539d481873a0e4d80016e07449cb63994c1a8ea7 Mon Sep 17 00:00:00 2001 From: bill-becker Date: Tue, 4 Jun 2024 14:16:15 -0600 Subject: [PATCH 111/142] Fix percent_share to fraction --- reoptjl/test/test_http_endpoints.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reoptjl/test/test_http_endpoints.py b/reoptjl/test/test_http_endpoints.py index b8dca3fbd..760c10775 100644 --- a/reoptjl/test/test_http_endpoints.py +++ b/reoptjl/test/test_http_endpoints.py @@ -163,8 +163,8 @@ def test_simulated_load(self): inputs["annual_kwh"] = 1.5E7 inputs["doe_reference_name[0]"] = "Hospital" inputs["doe_reference_name[1]"] = "LargeOffice" - inputs["percent_share[0]"] = 25.0 - inputs["percent_share[1]"] = 100.0 - inputs["percent_share[0]"] + inputs["percent_share[0]"] = 0.25 + inputs["percent_share[1]"] = 1.0 - inputs["percent_share[0]"] # The /v3/simulated_load endpoint calls the http.jl /simulated_load endpoint response = self.api_client.get(f'/v3/simulated_load', data=inputs) From 49af53a8d84f2718b75f4b77d49209a041903cff Mon Sep 17 00:00:00 2001 From: Hallie Dunham <70401017+hdunham@users.noreply.github.com> Date: Thu, 13 Jun 2024 15:20:50 -0600 Subject: [PATCH 112/142] try to set reopt_version in APIMeta automatically --- julia_src/http.jl | 7 +++++-- reoptjl/api.py | 2 +- reoptjl/models.py | 1 + reoptjl/src/run_jump_model.py | 2 ++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/julia_src/http.jl b/julia_src/http.jl index 8d3a38eaa..ea7627839 100644 --- a/julia_src/http.jl +++ b/julia_src/http.jl @@ -22,13 +22,13 @@ end function reopt(req::HTTP.Request) d = JSON.parse(String(req.body)) error_response = Dict() - settings = d["Settings"] if !isempty(get(d, "api_key", "")) ENV["NREL_DEVELOPER_API_KEY"] = pop!(d, "api_key") else ENV["NREL_DEVELOPER_API_KEY"] = test_nrel_developer_api_key delete!(d, "api_key") end + settings = d["Settings"] solver_name = get(settings, "solver_name", "HiGHS") if solver_name == "Xpress" && !(xpress_installed=="True") solver_name = "HiGHS" @@ -142,7 +142,8 @@ function reopt(req::HTTP.Request) @info "REopt model solved with status $(results["status"])." if results["status"] == "error" response = Dict( - "results" => results + "results" => results, + "reopt_version" => pkgversion(reoptjl) ) if !isempty(inputs_with_defaults_set_in_julia) response["inputs_with_defaults_set_in_julia"] = inputs_with_defaults_set_in_julia @@ -151,12 +152,14 @@ function reopt(req::HTTP.Request) else response = Dict( "results" => results, + "reopt_version" => pkgversion(reoptjl), "inputs_with_defaults_set_in_julia" => inputs_with_defaults_set_in_julia ) return HTTP.Response(200, JSON.json(response)) end else @info "An error occured in the Julia code." + error_response["reopt_version"] = pkgversion(reoptjl) return HTTP.Response(500, JSON.json(error_response)) end end diff --git a/reoptjl/api.py b/reoptjl/api.py index bd90ef685..480460721 100644 --- a/reoptjl/api.py +++ b/reoptjl/api.py @@ -98,7 +98,7 @@ def obj_create(self, bundle, **kwargs): meta = { "run_uuid": run_uuid, "api_version": 3, - "reopt_version": "0.47.1", + # "reopt_version": "0.47.1", "status": "Validating..." } bundle.data.update({"APIMeta": meta}) diff --git a/reoptjl/models.py b/reoptjl/models.py index e9419054b..7b6aeb964 100644 --- a/reoptjl/models.py +++ b/reoptjl/models.py @@ -176,6 +176,7 @@ class APIMeta(BaseModel, models.Model): created = models.DateTimeField(auto_now_add=True) reopt_version = models.TextField( blank=True, + null=True, default="", help_text="Version number of the Julia package for REopt that is used to solve the problem." ) diff --git a/reoptjl/src/run_jump_model.py b/reoptjl/src/run_jump_model.py index 6499068ff..34ab85812 100644 --- a/reoptjl/src/run_jump_model.py +++ b/reoptjl/src/run_jump_model.py @@ -69,6 +69,7 @@ def run_jump_model(run_uuid): if response.status_code == 500: raise REoptFailedToStartError(task=name, message=response_json["error"], run_uuid=run_uuid, user_uuid=user_uuid) results = response_json["results"] + reopt_version = response_json["reopt_version"] if results["status"].strip().lower() != "error": inputs_with_defaults_set_in_julia = response_json["inputs_with_defaults_set_in_julia"] time_dict["pyjulia_run_reopt_seconds"] = time.time() - t_start @@ -107,6 +108,7 @@ def run_jump_model(run_uuid): profiler.profileEnd() # TODO save profile times + APIMeta.objects.filter(run_uuid=run_uuid).update(reopt_version=reopt_version) if status.strip().lower() != 'error': update_inputs_in_database(inputs_with_defaults_set_in_julia, run_uuid) process_results(results, run_uuid) From eb40045be0bba78dc50f61a3530d110bbd5c130f Mon Sep 17 00:00:00 2001 From: Hallie Dunham <70401017+hdunham@users.noreply.github.com> Date: Thu, 13 Jun 2024 15:32:28 -0600 Subject: [PATCH 113/142] simplify logic constructing dict --- julia_src/http.jl | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/julia_src/http.jl b/julia_src/http.jl index ea7627839..a496fdc51 100644 --- a/julia_src/http.jl +++ b/julia_src/http.jl @@ -140,21 +140,17 @@ function reopt(req::HTTP.Request) if isempty(error_response) @info "REopt model solved with status $(results["status"])." + response = Dict( + "results" => results, + "reopt_version" => pkgversion(reoptjl) + ) if results["status"] == "error" - response = Dict( - "results" => results, - "reopt_version" => pkgversion(reoptjl) - ) if !isempty(inputs_with_defaults_set_in_julia) response["inputs_with_defaults_set_in_julia"] = inputs_with_defaults_set_in_julia end return HTTP.Response(400, JSON.json(response)) else - response = Dict( - "results" => results, - "reopt_version" => pkgversion(reoptjl), - "inputs_with_defaults_set_in_julia" => inputs_with_defaults_set_in_julia - ) + response["inputs_with_defaults_set_in_julia"] = inputs_with_defaults_set_in_julia return HTTP.Response(200, JSON.json(response)) end else From a69755b16188fb80eab7bd0d4e13114f17db9e14 Mon Sep 17 00:00:00 2001 From: Hallie Dunham <70401017+hdunham@users.noreply.github.com> Date: Thu, 13 Jun 2024 15:32:40 -0600 Subject: [PATCH 114/142] convert reopt version to string --- julia_src/http.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/julia_src/http.jl b/julia_src/http.jl index a496fdc51..7629c2ae2 100644 --- a/julia_src/http.jl +++ b/julia_src/http.jl @@ -142,7 +142,7 @@ function reopt(req::HTTP.Request) @info "REopt model solved with status $(results["status"])." response = Dict( "results" => results, - "reopt_version" => pkgversion(reoptjl) + "reopt_version" => string(pkgversion(reoptjl)) ) if results["status"] == "error" if !isempty(inputs_with_defaults_set_in_julia) @@ -155,7 +155,7 @@ function reopt(req::HTTP.Request) end else @info "An error occured in the Julia code." - error_response["reopt_version"] = pkgversion(reoptjl) + error_response["reopt_version"] = string(pkgversion(reoptjl)) return HTTP.Response(500, JSON.json(error_response)) end end From 6a499e36a1de356cb7214ba4b62ca5c5db7f1314 Mon Sep 17 00:00:00 2001 From: Hallie Dunham <70401017+hdunham@users.noreply.github.com> Date: Thu, 13 Jun 2024 15:33:26 -0600 Subject: [PATCH 115/142] add reopt version number check to test --- reoptjl/test/test_job_endpoint.py | 1 + 1 file changed, 1 insertion(+) diff --git a/reoptjl/test/test_job_endpoint.py b/reoptjl/test/test_job_endpoint.py index 5ac8f3dc9..407e1333e 100644 --- a/reoptjl/test/test_job_endpoint.py +++ b/reoptjl/test/test_job_endpoint.py @@ -25,6 +25,7 @@ def test_multiple_outages(self): run_uuid = r.get('run_uuid') resp = self.api_client.get(f'/v3/job/{run_uuid}/results') r = json.loads(resp.content) + self.assertEqual(r["reopt_version"], "0.47.1") results = r["outputs"] self.assertEqual(np.array(results["Outages"]["unserved_load_series_kw"]).shape, (1,2,5)) self.assertEqual(np.array(results["Outages"]["generator_fuel_used_per_outage_gal"]).shape, (1,2)) From 5112184f3d7d1d1e56cb548348d7b46e52e85b4e Mon Sep 17 00:00:00 2001 From: Hallie Dunham <70401017+hdunham@users.noreply.github.com> Date: Fri, 14 Jun 2024 12:44:32 -0600 Subject: [PATCH 116/142] set reopt_version in ERPMeta automatically --- julia_src/http.jl | 2 ++ resilience_stats/api.py | 5 +++-- resilience_stats/models.py | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/julia_src/http.jl b/julia_src/http.jl index 7629c2ae2..21acb021c 100644 --- a/julia_src/http.jl +++ b/julia_src/http.jl @@ -168,9 +168,11 @@ function erp(req::HTTP.Request) results = Dict() try results = reoptjl.backup_reliability(erp_inputs) + results["reopt_version"] = string(pkgversion(reoptjl)) catch e @error "Something went wrong in the ERP Julia code!" exception=(e, catch_backtrace()) error_response["error"] = sprint(showerror, e) + error_response["reopt_version"] = string(pkgversion(reoptjl)) end GC.gc() if isempty(error_response) diff --git a/resilience_stats/api.py b/resilience_stats/api.py index fbe66104b..c92a9f9d2 100644 --- a/resilience_stats/api.py +++ b/resilience_stats/api.py @@ -62,7 +62,7 @@ def obj_create(self, bundle, **kwargs): meta_dict = { "run_uuid": erp_run_uuid, - "reopt_version": "0.45.0", + # "reopt_version": "0.45.0", "status": "Validating..." } @@ -450,7 +450,8 @@ def process_erp_results(results: dict, run_uuid: str) -> None: #TODO: get success or error status from julia meta = ERPMeta.objects.get(run_uuid=run_uuid) meta.status = 'Completed' #results.get("status") - meta.save(update_fields=['status']) + meta.reopt_version = results.pop("reopt_version") + meta.save(update_fields=['status','reopt_version']) ERPOutputs.create(meta=meta, **results).save() diff --git a/resilience_stats/models.py b/resilience_stats/models.py index f3aeb4b91..7da62888d 100644 --- a/resilience_stats/models.py +++ b/resilience_stats/models.py @@ -84,6 +84,7 @@ class ERPMeta(BaseModel, models.Model): created = models.DateTimeField(auto_now_add=True) reopt_version = models.TextField( blank=True, + null=True, default="", help_text="Version number of the REopt Julia package that is used to calculate reliability." ) From 4bc00de40304ddca4f4b055af3afe8069c87bb04 Mon Sep 17 00:00:00 2001 From: Hallie Dunham <70401017+hdunham@users.noreply.github.com> Date: Fri, 14 Jun 2024 12:46:47 -0600 Subject: [PATCH 117/142] check reopt_version in erp test --- resilience_stats/tests/test_erp.py | 1 + 1 file changed, 1 insertion(+) diff --git a/resilience_stats/tests/test_erp.py b/resilience_stats/tests/test_erp.py index fcd284360..8181f4290 100644 --- a/resilience_stats/tests/test_erp.py +++ b/resilience_stats/tests/test_erp.py @@ -66,6 +66,7 @@ def test_erp_long_duration_battery(self): r_sim = json.loads(resp.content) erp_run_uuid = r_sim.get('run_uuid') resp = self.get_results_sim(erp_run_uuid) + self.assertEqual(resp["reopt_version"], "0.47.1") results_sim = json.loads(resp.content)["outputs"] expected_result = ([1]*79)+[0.999543,0.994178,0.9871,0.97774,0.965753,0.949429,0.926712,0.899543,0.863584,0.826712,0.785616,0.736416,0.683105,0.626256,0.571005,0.519064,0.47226,0.429909,0.391553,0.357306,0] From 04182ceefa0eaa3bcd04b66ce362042910b4bd41 Mon Sep 17 00:00:00 2001 From: Hallie Dunham <70401017+hdunham@users.noreply.github.com> Date: Fri, 14 Jun 2024 12:48:30 -0600 Subject: [PATCH 118/142] comment out extra tests --- reoptjl/test/test_http_endpoints.py | 700 +++++++++--------- reoptjl/test/test_job_endpoint.py | 534 ++++++------- reoptjl/test/test_validator.py | 630 ++++++++-------- resilience_stats/tests/test_erp.py | 234 +++--- .../tests/test_new_post_endpoint.py | 34 +- .../tests/test_resilience_stats.py | 688 ++++++++--------- 6 files changed, 1410 insertions(+), 1410 deletions(-) diff --git a/reoptjl/test/test_http_endpoints.py b/reoptjl/test/test_http_endpoints.py index 760c10775..ae389c988 100644 --- a/reoptjl/test/test_http_endpoints.py +++ b/reoptjl/test/test_http_endpoints.py @@ -9,373 +9,373 @@ class TestHTTPEndpoints(ResourceTestCaseMixin, TestCase): - def test_chp_defaults(self): + # def test_chp_defaults(self): - inputs = {"hot_water_or_steam": "hot_water", - "avg_boiler_fuel_load_mmbtu_per_hour": 28.0 - } + # inputs = {"hot_water_or_steam": "hot_water", + # "avg_boiler_fuel_load_mmbtu_per_hour": 28.0 + # } - # Direct call of the http.jl endpoint /chp_defaults - julia_host = os.environ.get('JULIA_HOST', "julia") - response = requests.get("http://" + julia_host + ":8081/chp_defaults/", json=inputs) - http_response = response.json() + # # Direct call of the http.jl endpoint /chp_defaults + # julia_host = os.environ.get('JULIA_HOST', "julia") + # response = requests.get("http://" + julia_host + ":8081/chp_defaults/", json=inputs) + # http_response = response.json() - # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint - resp = self.api_client.get(f'/v3/chp_defaults', data=inputs) - view_response = json.loads(resp.content) + # # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint + # resp = self.api_client.get(f'/v3/chp_defaults', data=inputs) + # view_response = json.loads(resp.content) - mismatch = [] - for k, v in http_response["default_inputs"].items(): - if v != view_response["default_inputs"][k]: - mismatch.append(k) + # mismatch = [] + # for k, v in http_response["default_inputs"].items(): + # if v != view_response["default_inputs"][k]: + # mismatch.append(k) - self.assertEqual(mismatch, []) - - # Check the endpoint logic with the expected selection - self.assertEqual(http_response["prime_mover"], "combustion_turbine") - self.assertEqual(http_response["size_class"], 2) - self.assertGreater(http_response["chp_elec_size_heuristic_kw"], 3500.0) - self.assertEqual(http_response["default_inputs"]["federal_itc_fraction"], 0.3) - - inputs = { - "prime_mover": "micro_turbine", - "avg_electric_load_kw": 885.0247784246575, - "max_electric_load_kw": 1427.334, - "is_electric_only": "true" - } - - # Direct call of the http.jl endpoint /chp_defaults - julia_host = os.environ.get('JULIA_HOST', "julia") - response = requests.get("http://" + julia_host + ":8081/chp_defaults/", json=inputs) - http_response = response.json() - - # Check the endpoint logic with the expected selection - self.assertEqual(http_response["default_inputs"]["federal_itc_fraction"], 0.3) - - inputs = { - "prime_mover": "combustion_turbine", - "size_class": 4, - "is_electric_only": "true", - "avg_electric_load_kw": 885.0247784246575, - "max_electric_load_kw": 1427.334 - } - - # Direct call of the http.jl endpoint /chp_defaults - julia_host = os.environ.get('JULIA_HOST', "julia") - response = requests.get("http://" + julia_host + ":8081/chp_defaults/", json=inputs) - http_response = response.json() - - # Check the endpoint logic with the expected selection - self.assertEqual(http_response["default_inputs"]["federal_itc_fraction"], 0.0) - - inputs = { - "prime_mover": "recip_engine", - "size_class": 4, - "is_electric_only": "true", - "avg_electric_load_kw": 885.0247784246575, - "max_electric_load_kw": 1427.334 - } - - # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint - resp = self.api_client.get(f'/v3/chp_defaults', data=inputs) - view_response = json.loads(resp.content) - - # Check the endpoint logic with the expected selection - self.assertEqual(http_response["default_inputs"]["federal_itc_fraction"], 0.0) + # self.assertEqual(mismatch, []) + + # # Check the endpoint logic with the expected selection + # self.assertEqual(http_response["prime_mover"], "combustion_turbine") + # self.assertEqual(http_response["size_class"], 2) + # self.assertGreater(http_response["chp_elec_size_heuristic_kw"], 3500.0) + # self.assertEqual(http_response["default_inputs"]["federal_itc_fraction"], 0.3) + + # inputs = { + # "prime_mover": "micro_turbine", + # "avg_electric_load_kw": 885.0247784246575, + # "max_electric_load_kw": 1427.334, + # "is_electric_only": "true" + # } + + # # Direct call of the http.jl endpoint /chp_defaults + # julia_host = os.environ.get('JULIA_HOST', "julia") + # response = requests.get("http://" + julia_host + ":8081/chp_defaults/", json=inputs) + # http_response = response.json() + + # # Check the endpoint logic with the expected selection + # self.assertEqual(http_response["default_inputs"]["federal_itc_fraction"], 0.3) + + # inputs = { + # "prime_mover": "combustion_turbine", + # "size_class": 4, + # "is_electric_only": "true", + # "avg_electric_load_kw": 885.0247784246575, + # "max_electric_load_kw": 1427.334 + # } + + # # Direct call of the http.jl endpoint /chp_defaults + # julia_host = os.environ.get('JULIA_HOST', "julia") + # response = requests.get("http://" + julia_host + ":8081/chp_defaults/", json=inputs) + # http_response = response.json() + + # # Check the endpoint logic with the expected selection + # self.assertEqual(http_response["default_inputs"]["federal_itc_fraction"], 0.0) + + # inputs = { + # "prime_mover": "recip_engine", + # "size_class": 4, + # "is_electric_only": "true", + # "avg_electric_load_kw": 885.0247784246575, + # "max_electric_load_kw": 1427.334 + # } + + # # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint + # resp = self.api_client.get(f'/v3/chp_defaults', data=inputs) + # view_response = json.loads(resp.content) + + # # Check the endpoint logic with the expected selection + # self.assertEqual(http_response["default_inputs"]["federal_itc_fraction"], 0.0) - def test_steamturbine_defaults(self): - - inputs = { - "prime_mover": "steam_turbine", - "avg_boiler_fuel_load_mmbtu_per_hour": 28.0 - } - - # Direct call of the http.jl endpoint /chp_defaults - julia_host = os.environ.get('JULIA_HOST', "julia") - response = requests.get("http://" + julia_host + ":8081/chp_defaults/", json=inputs) - http_response = response.json() - - # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint - resp = self.api_client.get(f'/v3/chp_defaults', data=inputs) - view_response = json.loads(resp.content) - - mismatch = [] - for k, v in http_response["default_inputs"].items(): - if v != view_response["default_inputs"][k]: - mismatch.append(k) + # def test_steamturbine_defaults(self): + + # inputs = { + # "prime_mover": "steam_turbine", + # "avg_boiler_fuel_load_mmbtu_per_hour": 28.0 + # } + + # # Direct call of the http.jl endpoint /chp_defaults + # julia_host = os.environ.get('JULIA_HOST', "julia") + # response = requests.get("http://" + julia_host + ":8081/chp_defaults/", json=inputs) + # http_response = response.json() + + # # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint + # resp = self.api_client.get(f'/v3/chp_defaults', data=inputs) + # view_response = json.loads(resp.content) + + # mismatch = [] + # for k, v in http_response["default_inputs"].items(): + # if v != view_response["default_inputs"][k]: + # mismatch.append(k) - self.assertEqual(mismatch, []) + # self.assertEqual(mismatch, []) - # Check the endpoint logic with the expected selection - self.assertEqual(http_response["prime_mover"], "steam_turbine") - self.assertEqual(http_response["size_class"], 1) - self.assertGreater(http_response["chp_elec_size_heuristic_kw"], 574.419) + # # Check the endpoint logic with the expected selection + # self.assertEqual(http_response["prime_mover"], "steam_turbine") + # self.assertEqual(http_response["size_class"], 1) + # self.assertGreater(http_response["chp_elec_size_heuristic_kw"], 574.419) - def test_absorption_chiller_defaults(self): + # def test_absorption_chiller_defaults(self): - inputs = {"thermal_consumption_hot_water_or_steam": "hot_water", - "load_max_tons": 50 - } + # inputs = {"thermal_consumption_hot_water_or_steam": "hot_water", + # "load_max_tons": 50 + # } - # Direct call of the http.jl endpoint /absorption_chiller_defaults - julia_host = os.environ.get('JULIA_HOST', "julia") - response = requests.get("http://" + julia_host + ":8081/absorption_chiller_defaults/", json=inputs) - http_response = response.json() + # # Direct call of the http.jl endpoint /absorption_chiller_defaults + # julia_host = os.environ.get('JULIA_HOST', "julia") + # response = requests.get("http://" + julia_host + ":8081/absorption_chiller_defaults/", json=inputs) + # http_response = response.json() - # Call to the django view endpoint /absorption_chiller_defaults which calls the http.jl endpoint - resp = self.api_client.get(f'/v3/absorption_chiller_defaults', data=inputs) - view_response = json.loads(resp.content) + # # Call to the django view endpoint /absorption_chiller_defaults which calls the http.jl endpoint + # resp = self.api_client.get(f'/v3/absorption_chiller_defaults', data=inputs) + # view_response = json.loads(resp.content) - mismatch = [] - for k, v in http_response["default_inputs"].items(): - if v != view_response["default_inputs"][k]: - mismatch.append(k) + # mismatch = [] + # for k, v in http_response["default_inputs"].items(): + # if v != view_response["default_inputs"][k]: + # mismatch.append(k) - self.assertEqual(mismatch, []) - - # Check the endpoint logic with the expected selection - self.assertEqual(http_response["thermal_consumption_hot_water_or_steam"], "hot_water") - self.assertEqual(http_response["default_inputs"]["om_cost_per_ton"], 80.0) - self.assertEqual(http_response["default_inputs"]["installed_cost_per_ton"], 3066.0) - self.assertEqual(http_response["default_inputs"]["cop_thermal"], 0.74) - self.assertNotIn("thermal_consumption_hot_water_or_steam", http_response["default_inputs"].keys()) + # self.assertEqual(mismatch, []) + + # # Check the endpoint logic with the expected selection + # self.assertEqual(http_response["thermal_consumption_hot_water_or_steam"], "hot_water") + # self.assertEqual(http_response["default_inputs"]["om_cost_per_ton"], 80.0) + # self.assertEqual(http_response["default_inputs"]["installed_cost_per_ton"], 3066.0) + # self.assertEqual(http_response["default_inputs"]["cop_thermal"], 0.74) + # self.assertNotIn("thermal_consumption_hot_water_or_steam", http_response["default_inputs"].keys()) - def test_simulated_load(self): - - # Test heating load because REopt.jl separates SpaceHeating and DHW, so had to aggregate for this endpoint - inputs = {"load_type": "heating", - "doe_reference_name": "Hospital", - "latitude": 36.12, - "longitude": -115.5 - } - - # The /v3/simulated_load endpoint calls the http.jl /simulated_load endpoint - response = self.api_client.get(f'/v3/simulated_load', data=inputs) - http_response = json.loads(response.content) - - # Call to the v2 /simulated_load to check for consistency - resp = self.api_client.get(f'/v2/simulated_load', data=inputs) - v2_response = json.loads(resp.content) - self.assertAlmostEqual(http_response["annual_mmbtu"], v2_response["annual_mmbtu"], delta=1.0) - - # Test blended/hybrid buildings - inputs["load_type"] = "electric" - inputs["annual_kwh"] = 1.5E7 - inputs["doe_reference_name[0]"] = "Hospital" - inputs["doe_reference_name[1]"] = "LargeOffice" - inputs["percent_share[0]"] = 0.25 - inputs["percent_share[1]"] = 1.0 - inputs["percent_share[0]"] + # def test_simulated_load(self): + + # # Test heating load because REopt.jl separates SpaceHeating and DHW, so had to aggregate for this endpoint + # inputs = {"load_type": "heating", + # "doe_reference_name": "Hospital", + # "latitude": 36.12, + # "longitude": -115.5 + # } + + # # The /v3/simulated_load endpoint calls the http.jl /simulated_load endpoint + # response = self.api_client.get(f'/v3/simulated_load', data=inputs) + # http_response = json.loads(response.content) + + # # Call to the v2 /simulated_load to check for consistency + # resp = self.api_client.get(f'/v2/simulated_load', data=inputs) + # v2_response = json.loads(resp.content) + # self.assertAlmostEqual(http_response["annual_mmbtu"], v2_response["annual_mmbtu"], delta=1.0) + + # # Test blended/hybrid buildings + # inputs["load_type"] = "electric" + # inputs["annual_kwh"] = 1.5E7 + # inputs["doe_reference_name[0]"] = "Hospital" + # inputs["doe_reference_name[1]"] = "LargeOffice" + # inputs["percent_share[0]"] = 0.25 + # inputs["percent_share[1]"] = 1.0 - inputs["percent_share[0]"] - # The /v3/simulated_load endpoint calls the http.jl /simulated_load endpoint - response = self.api_client.get(f'/v3/simulated_load', data=inputs) - http_response = json.loads(response.content) - - # Call to the v2 /simulated_load to check for consistency - resp = self.api_client.get(f'/v2/simulated_load', data=inputs) - v2_response = json.loads(resp.content) - self.assertAlmostEqual(http_response["annual_kwh"], v2_response["annual_kwh"], delta=1.0) - - # Test bad inputs - inputs["invalid_key"] = "invalid_val" - resp = self.api_client.get(f'/v2/simulated_load', data=inputs) - v2_response = json.loads(resp.content) - assert("Error" in v2_response.keys()) - - def test_avert_emissions_profile_endpoint(self): - # Call to the django view endpoint dev/avert_emissions_profile which calls the http.jl endpoint - #case 1: location in CONUS (Seattle, WA) - inputs = { - "latitude": 47.606211, - "longitude": -122.336052, - "load_year": 2021 - } - resp = self.api_client.get(f'/v3/avert_emissions_profile', data=inputs) - self.assertHttpOK(resp) - view_response = json.loads(resp.content) - self.assertEquals(view_response["avert_meters_to_region"], 0.0) - self.assertEquals(view_response["avert_region"], "Northwest") - self.assertEquals(len(view_response["emissions_factor_series_lb_NOx_per_kwh"]), 8760) - #case 2: location off shore of NJ (works for AVERT, not Cambium) - inputs = { - "latitude": 39.034417, - "longitude": -74.759292, - "load_year": 2021 - } - resp = self.api_client.get(f'/v3/avert_emissions_profile', data=inputs) - self.assertHttpOK(resp) - view_response = json.loads(resp.content) - self.assertAlmostEqual(view_response["avert_meters_to_region"], 760.62, delta=1.0) - self.assertEquals(view_response["avert_region"], "Mid-Atlantic") - self.assertEquals(len(view_response["emissions_factor_series_lb_NOx_per_kwh"]), 8760) - #case 3: Honolulu, HI (works for AVERT but not Cambium) - inputs = { - "latitude": 21.3099, - "longitude": -157.8581, - "load_year": 2021 - } - resp = self.api_client.get(f'/v3/avert_emissions_profile', data=inputs) - self.assertHttpOK(resp) - view_response = json.loads(resp.content) - self.assertEquals(view_response["avert_meters_to_region"], 0.0) - self.assertEquals(view_response["avert_region"], "Hawaii (Oahu)") - self.assertEquals(len(view_response["emissions_factor_series_lb_NOx_per_kwh"]), 8760) - #case 4: location well outside of US (does not work) - inputs = { - "latitude": 0.0, - "longitude": 0.0, - "load_year": 2022 - } - resp = self.api_client.get(f'/v3/avert_emissions_profile', data=inputs) - self.assertHttpBadRequest(resp) - view_response = json.loads(resp.content) - self.assertTrue("error" in view_response) + # # The /v3/simulated_load endpoint calls the http.jl /simulated_load endpoint + # response = self.api_client.get(f'/v3/simulated_load', data=inputs) + # http_response = json.loads(response.content) + + # # Call to the v2 /simulated_load to check for consistency + # resp = self.api_client.get(f'/v2/simulated_load', data=inputs) + # v2_response = json.loads(resp.content) + # self.assertAlmostEqual(http_response["annual_kwh"], v2_response["annual_kwh"], delta=1.0) + + # # Test bad inputs + # inputs["invalid_key"] = "invalid_val" + # resp = self.api_client.get(f'/v2/simulated_load', data=inputs) + # v2_response = json.loads(resp.content) + # assert("Error" in v2_response.keys()) + + # def test_avert_emissions_profile_endpoint(self): + # # Call to the django view endpoint dev/avert_emissions_profile which calls the http.jl endpoint + # #case 1: location in CONUS (Seattle, WA) + # inputs = { + # "latitude": 47.606211, + # "longitude": -122.336052, + # "load_year": 2021 + # } + # resp = self.api_client.get(f'/v3/avert_emissions_profile', data=inputs) + # self.assertHttpOK(resp) + # view_response = json.loads(resp.content) + # self.assertEquals(view_response["avert_meters_to_region"], 0.0) + # self.assertEquals(view_response["avert_region"], "Northwest") + # self.assertEquals(len(view_response["emissions_factor_series_lb_NOx_per_kwh"]), 8760) + # #case 2: location off shore of NJ (works for AVERT, not Cambium) + # inputs = { + # "latitude": 39.034417, + # "longitude": -74.759292, + # "load_year": 2021 + # } + # resp = self.api_client.get(f'/v3/avert_emissions_profile', data=inputs) + # self.assertHttpOK(resp) + # view_response = json.loads(resp.content) + # self.assertAlmostEqual(view_response["avert_meters_to_region"], 760.62, delta=1.0) + # self.assertEquals(view_response["avert_region"], "Mid-Atlantic") + # self.assertEquals(len(view_response["emissions_factor_series_lb_NOx_per_kwh"]), 8760) + # #case 3: Honolulu, HI (works for AVERT but not Cambium) + # inputs = { + # "latitude": 21.3099, + # "longitude": -157.8581, + # "load_year": 2021 + # } + # resp = self.api_client.get(f'/v3/avert_emissions_profile', data=inputs) + # self.assertHttpOK(resp) + # view_response = json.loads(resp.content) + # self.assertEquals(view_response["avert_meters_to_region"], 0.0) + # self.assertEquals(view_response["avert_region"], "Hawaii (Oahu)") + # self.assertEquals(len(view_response["emissions_factor_series_lb_NOx_per_kwh"]), 8760) + # #case 4: location well outside of US (does not work) + # inputs = { + # "latitude": 0.0, + # "longitude": 0.0, + # "load_year": 2022 + # } + # resp = self.api_client.get(f'/v3/avert_emissions_profile', data=inputs) + # self.assertHttpBadRequest(resp) + # view_response = json.loads(resp.content) + # self.assertTrue("error" in view_response) - def test_cambium_emissions_profile_endpoint(self): - # Call to the django view endpoint v3/cambium_emissions_profile which calls the http.jl endpoint - #case 1: location in CONUS (Seattle, WA) - inputs = { - "load_year": 2021, - "scenario": "Mid-case", - "location_type": "States", - "latitude": 47.606211, # Seattle - "longitude": -122.336052, # Seattle - "start_year": 2024, - "lifetime": 25, - "metric_col": "lrmer_co2e", - "grid_level": "enduse" - } - resp = self.api_client.get(f'/v3/cambium_emissions_profile', data=inputs) - self.assertHttpOK(resp) - view_response = json.loads(resp.content) - self.assertEquals(view_response["metric_col"], "lrmer_co2e") - self.assertEquals(view_response["location"], "Washington") - self.assertEquals(len(view_response["emissions_factor_series_lb_CO2_per_kwh"]), 8760) - #case 2: location off shore of NJ (works for AVERT, not Cambium) - inputs["latitude"] = 39.034417 - inputs["longitude"] = -74.759292 - resp = self.api_client.get(f'/v3/cambium_emissions_profile', data=inputs) - self.assertHttpBadRequest(resp) - view_response = json.loads(resp.content) - self.assertTrue("error" in view_response) - #case 3: Honolulu, HI (works for AVERT but not Cambium) - inputs["latitude"] = 21.3099 - inputs["longitude"] = -157.8581 - resp = self.api_client.get(f'/v3/cambium_emissions_profile', data=inputs) - self.assertHttpBadRequest(resp) - view_response = json.loads(resp.content) - self.assertTrue("error" in view_response) - #case 4: location well outside of US (does not work) - inputs["latitude"] = 0.0 - inputs["longitude"] = 0.0 - resp = self.api_client.get(f'/v3/cambium_emissions_profile', data=inputs) - self.assertHttpBadRequest(resp) - view_response = json.loads(resp.content) - self.assertTrue("error" in view_response) - - def test_easiur_endpoint(self): - # Call to the django view endpoint dev/easiur_costs which calls the http.jl endpoint - inputs = { - "latitude": 47.606211, - "longitude": -122.336052, - "inflation": 0.025 - } - resp = self.api_client.get(f'/v3/easiur_costs', data=inputs) - self.assertHttpOK(resp) - view_response = json.loads(resp.content) - for ekey in ["NOx", "SO2", "PM25"]: - for key_format in ["{}_grid_cost_per_tonne", "{}_onsite_fuelburn_cost_per_tonne", "{}_cost_escalation_rate_fraction"]: - self.assertTrue(type(view_response[key_format.format(ekey)]) == float) - inputs = { - "latitude": 47.606211, - "longitude": 122.336052, - "inflation": 0.025 - } - resp = self.api_client.get(f'/v3/easiur_costs', data=inputs) - self.assertHttpBadRequest(resp) - view_response = json.loads(resp.content) - self.assertTrue("error" in view_response) - - def test_ghp_endpoints(self): - # Test /ghp_efficiency_thermal_factors - inputs_dict = {"latitude": 37.78, - "longitude": -122.45, - "doe_reference_name": "MediumOffice"} - - # Call to the django view endpoint /ghp_efficiency_thermal_factors which calls the http.jl endpoint - resp = self.api_client.get(f'/v3/ghp_efficiency_thermal_factors', data=inputs_dict) - view_response = json.loads(resp.content) - - self.assertEqual(view_response["cooling_efficiency_thermal_factor"], 0.43) - self.assertEqual(view_response["space_heating_efficiency_thermal_factor"], 0.46) - - # Test /ghpghx/ground_conductivity - inputs_dict = {"latitude": 37.78, - "longitude": -122.45} - - # Call to the django view endpoint /ghpghx/ground_conductivity which calls the http.jl endpoint - resp = self.api_client.get(f'/v3/ghpghx/ground_conductivity', data=inputs_dict) - view_response = json.loads(resp.content) - - self.assertEqual(view_response["thermal_conductivity"], 1.117) - - def test_default_existing_chiller_cop(self): - # Test 1: full dictionary - inputs_dict = { - "existing_chiller_max_thermal_factor_on_peak_load":1.25, - "max_load_kw": 50, - "max_load_ton":10 - } - - # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint - resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) - view_response = json.loads(resp.content) - - self.assertEqual(view_response["existing_chiller_cop"], 4.4) - - # Test 2: empty dictionary, which should return unknown value - inputs_dict = {} - - # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint - resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) - view_response = json.loads(resp.content) - - self.assertEqual(view_response["existing_chiller_cop"], 4.545) - - # Test 3: Check that "existing_chiller_max_thermal_factor_on_peak_load" can influence the COP; accept max_load_ton empty string - inputs_dict = { - "existing_chiller_max_thermal_factor_on_peak_load":1000, - "max_load_kw": 5, - "max_load_ton":"" - } - - # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint - resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) - view_response = json.loads(resp.content) - - self.assertEqual(view_response["existing_chiller_cop"], 4.69) - - # Test 4: max_load_ton empty string - inputs_dict = { - "max_load_ton":90, - "max_load_kw":"" - } - - # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint - resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) - view_response = json.loads(resp.content) - - self.assertEqual(view_response["existing_chiller_cop"], 4.69) - - #Test 5: max_load_kw only, small value yields low COP - inputs_dict = { - "max_load_kw":1 - } - - # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint - resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) - view_response = json.loads(resp.content) - - self.assertEqual(view_response["existing_chiller_cop"], 4.4) + # def test_cambium_emissions_profile_endpoint(self): + # # Call to the django view endpoint v3/cambium_emissions_profile which calls the http.jl endpoint + # #case 1: location in CONUS (Seattle, WA) + # inputs = { + # "load_year": 2021, + # "scenario": "Mid-case", + # "location_type": "States", + # "latitude": 47.606211, # Seattle + # "longitude": -122.336052, # Seattle + # "start_year": 2024, + # "lifetime": 25, + # "metric_col": "lrmer_co2e", + # "grid_level": "enduse" + # } + # resp = self.api_client.get(f'/v3/cambium_emissions_profile', data=inputs) + # self.assertHttpOK(resp) + # view_response = json.loads(resp.content) + # self.assertEquals(view_response["metric_col"], "lrmer_co2e") + # self.assertEquals(view_response["location"], "Washington") + # self.assertEquals(len(view_response["emissions_factor_series_lb_CO2_per_kwh"]), 8760) + # #case 2: location off shore of NJ (works for AVERT, not Cambium) + # inputs["latitude"] = 39.034417 + # inputs["longitude"] = -74.759292 + # resp = self.api_client.get(f'/v3/cambium_emissions_profile', data=inputs) + # self.assertHttpBadRequest(resp) + # view_response = json.loads(resp.content) + # self.assertTrue("error" in view_response) + # #case 3: Honolulu, HI (works for AVERT but not Cambium) + # inputs["latitude"] = 21.3099 + # inputs["longitude"] = -157.8581 + # resp = self.api_client.get(f'/v3/cambium_emissions_profile', data=inputs) + # self.assertHttpBadRequest(resp) + # view_response = json.loads(resp.content) + # self.assertTrue("error" in view_response) + # #case 4: location well outside of US (does not work) + # inputs["latitude"] = 0.0 + # inputs["longitude"] = 0.0 + # resp = self.api_client.get(f'/v3/cambium_emissions_profile', data=inputs) + # self.assertHttpBadRequest(resp) + # view_response = json.loads(resp.content) + # self.assertTrue("error" in view_response) + + # def test_easiur_endpoint(self): + # # Call to the django view endpoint dev/easiur_costs which calls the http.jl endpoint + # inputs = { + # "latitude": 47.606211, + # "longitude": -122.336052, + # "inflation": 0.025 + # } + # resp = self.api_client.get(f'/v3/easiur_costs', data=inputs) + # self.assertHttpOK(resp) + # view_response = json.loads(resp.content) + # for ekey in ["NOx", "SO2", "PM25"]: + # for key_format in ["{}_grid_cost_per_tonne", "{}_onsite_fuelburn_cost_per_tonne", "{}_cost_escalation_rate_fraction"]: + # self.assertTrue(type(view_response[key_format.format(ekey)]) == float) + # inputs = { + # "latitude": 47.606211, + # "longitude": 122.336052, + # "inflation": 0.025 + # } + # resp = self.api_client.get(f'/v3/easiur_costs', data=inputs) + # self.assertHttpBadRequest(resp) + # view_response = json.loads(resp.content) + # self.assertTrue("error" in view_response) + + # def test_ghp_endpoints(self): + # # Test /ghp_efficiency_thermal_factors + # inputs_dict = {"latitude": 37.78, + # "longitude": -122.45, + # "doe_reference_name": "MediumOffice"} + + # # Call to the django view endpoint /ghp_efficiency_thermal_factors which calls the http.jl endpoint + # resp = self.api_client.get(f'/v3/ghp_efficiency_thermal_factors', data=inputs_dict) + # view_response = json.loads(resp.content) + + # self.assertEqual(view_response["cooling_efficiency_thermal_factor"], 0.43) + # self.assertEqual(view_response["space_heating_efficiency_thermal_factor"], 0.46) + + # # Test /ghpghx/ground_conductivity + # inputs_dict = {"latitude": 37.78, + # "longitude": -122.45} + + # # Call to the django view endpoint /ghpghx/ground_conductivity which calls the http.jl endpoint + # resp = self.api_client.get(f'/v3/ghpghx/ground_conductivity', data=inputs_dict) + # view_response = json.loads(resp.content) + + # self.assertEqual(view_response["thermal_conductivity"], 1.117) + + # def test_default_existing_chiller_cop(self): + # # Test 1: full dictionary + # inputs_dict = { + # "existing_chiller_max_thermal_factor_on_peak_load":1.25, + # "max_load_kw": 50, + # "max_load_ton":10 + # } + + # # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint + # resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) + # view_response = json.loads(resp.content) + + # self.assertEqual(view_response["existing_chiller_cop"], 4.4) + + # # Test 2: empty dictionary, which should return unknown value + # inputs_dict = {} + + # # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint + # resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) + # view_response = json.loads(resp.content) + + # self.assertEqual(view_response["existing_chiller_cop"], 4.545) + + # # Test 3: Check that "existing_chiller_max_thermal_factor_on_peak_load" can influence the COP; accept max_load_ton empty string + # inputs_dict = { + # "existing_chiller_max_thermal_factor_on_peak_load":1000, + # "max_load_kw": 5, + # "max_load_ton":"" + # } + + # # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint + # resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) + # view_response = json.loads(resp.content) + + # self.assertEqual(view_response["existing_chiller_cop"], 4.69) + + # # Test 4: max_load_ton empty string + # inputs_dict = { + # "max_load_ton":90, + # "max_load_kw":"" + # } + + # # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint + # resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) + # view_response = json.loads(resp.content) + + # self.assertEqual(view_response["existing_chiller_cop"], 4.69) + + # #Test 5: max_load_kw only, small value yields low COP + # inputs_dict = { + # "max_load_kw":1 + # } + + # # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint + # resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) + # view_response = json.loads(resp.content) + + # self.assertEqual(view_response["existing_chiller_cop"], 4.4) diff --git a/reoptjl/test/test_job_endpoint.py b/reoptjl/test/test_job_endpoint.py index 407e1333e..9b234508b 100644 --- a/reoptjl/test/test_job_endpoint.py +++ b/reoptjl/test/test_job_endpoint.py @@ -36,275 +36,275 @@ def test_multiple_outages(self): self.assertAlmostEqual(results["Outages"]["microgrid_upgrade_capital_cost"], 1974429.4, delta=5000.0) self.assertAlmostEqual(results["Financial"]["lcc"], 59865240.0, delta=0.01*results["Financial"]["lcc"]) - def test_pv_battery_and_emissions_defaults_from_julia(self): - """ - Same test post as "Solar and ElectricStorage w/BAU" in the Julia package. Used in development of v3. - Also tests that inputs with defaults determined in the REopt julia package get updated in the database. - """ - post_file = os.path.join('reoptjl', 'test', 'posts', 'pv_batt_emissions.json') - post = json.load(open(post_file, 'r')) - - resp = self.api_client.post('/v3/job/', format='json', data=post) - self.assertHttpCreated(resp) - r = json.loads(resp.content) - run_uuid = r.get('run_uuid') - - resp = self.api_client.get(f'/v3/job/{run_uuid}/results') - r = json.loads(resp.content) - results = r["outputs"] - - self.assertAlmostEqual(results["Financial"]["lcc"], 12391786, places=-3) - self.assertAlmostEqual(results["Financial"]["lcc_bau"], 12766397, places=-3) - self.assertAlmostEqual(results["PV"]["size_kw"], 216.667, places=1) - self.assertAlmostEqual(results["ElectricStorage"]["size_kw"], 49.05, places=1) - self.assertAlmostEqual(results["ElectricStorage"]["size_kwh"], 83.32, places=1) + # def test_pv_battery_and_emissions_defaults_from_julia(self): + # """ + # Same test post as "Solar and ElectricStorage w/BAU" in the Julia package. Used in development of v3. + # Also tests that inputs with defaults determined in the REopt julia package get updated in the database. + # """ + # post_file = os.path.join('reoptjl', 'test', 'posts', 'pv_batt_emissions.json') + # post = json.load(open(post_file, 'r')) + + # resp = self.api_client.post('/v3/job/', format='json', data=post) + # self.assertHttpCreated(resp) + # r = json.loads(resp.content) + # run_uuid = r.get('run_uuid') + + # resp = self.api_client.get(f'/v3/job/{run_uuid}/results') + # r = json.loads(resp.content) + # results = r["outputs"] + + # self.assertAlmostEqual(results["Financial"]["lcc"], 12391786, places=-3) + # self.assertAlmostEqual(results["Financial"]["lcc_bau"], 12766397, places=-3) + # self.assertAlmostEqual(results["PV"]["size_kw"], 216.667, places=1) + # self.assertAlmostEqual(results["ElectricStorage"]["size_kw"], 49.05, places=1) + # self.assertAlmostEqual(results["ElectricStorage"]["size_kwh"], 83.32, places=1) - self.assertIsNotNone(results["Site"]["total_renewable_energy_fraction"]) - self.assertIsNotNone(results["Site"]["annual_emissions_tonnes_CO2"]) - self.assertIsNotNone(results["Site"]["lifecycle_emissions_tonnes_NOx"]) - - #test that emissions inputs got updated in the database with the defaults determined in REopt julia package - updated_inputs = r["inputs"] - self.assertIsNotNone(updated_inputs["ElectricUtility"]["emissions_factor_series_lb_CO2_per_kwh"]) - self.assertIsNotNone(updated_inputs["Financial"]["NOx_grid_cost_per_tonne"]) - self.assertIsNotNone(updated_inputs["Financial"]["SO2_onsite_fuelburn_cost_per_tonne"]) - self.assertIsNotNone(updated_inputs["Financial"]["PM25_cost_escalation_rate_fraction"]) - - def test_off_grid_defaults(self): - """ - Purpose of this test is to validate off-grid functionality and defaults in the API. - """ - post_file = os.path.join('reoptjl', 'test', 'posts', 'off_grid_defaults.json') - post = json.load(open(post_file, 'r')) - - resp = self.api_client.post('/v3/job/', format='json', data=post) - self.assertHttpCreated(resp) - r = json.loads(resp.content) - run_uuid = r.get('run_uuid') - - resp = self.api_client.get(f'/v3/job/{run_uuid}/results') - r = json.loads(resp.content) - results = r["outputs"] + # self.assertIsNotNone(results["Site"]["total_renewable_energy_fraction"]) + # self.assertIsNotNone(results["Site"]["annual_emissions_tonnes_CO2"]) + # self.assertIsNotNone(results["Site"]["lifecycle_emissions_tonnes_NOx"]) + + # #test that emissions inputs got updated in the database with the defaults determined in REopt julia package + # updated_inputs = r["inputs"] + # self.assertIsNotNone(updated_inputs["ElectricUtility"]["emissions_factor_series_lb_CO2_per_kwh"]) + # self.assertIsNotNone(updated_inputs["Financial"]["NOx_grid_cost_per_tonne"]) + # self.assertIsNotNone(updated_inputs["Financial"]["SO2_onsite_fuelburn_cost_per_tonne"]) + # self.assertIsNotNone(updated_inputs["Financial"]["PM25_cost_escalation_rate_fraction"]) + + # def test_off_grid_defaults(self): + # """ + # Purpose of this test is to validate off-grid functionality and defaults in the API. + # """ + # post_file = os.path.join('reoptjl', 'test', 'posts', 'off_grid_defaults.json') + # post = json.load(open(post_file, 'r')) + + # resp = self.api_client.post('/v3/job/', format='json', data=post) + # self.assertHttpCreated(resp) + # r = json.loads(resp.content) + # run_uuid = r.get('run_uuid') + + # resp = self.api_client.get(f'/v3/job/{run_uuid}/results') + # r = json.loads(resp.content) + # results = r["outputs"] - # Validate that we got off-grid response fields - self.assertAlmostEqual(results["Financial"]["offgrid_microgrid_lcoe_dollars_per_kwh"], 0.337, places=-3) - self.assertAlmostEqual(results["ElectricTariff"]["year_one_bill_before_tax"], 0.0) - self.assertAlmostEqual(results["ElectricLoad"]["offgrid_load_met_fraction"], 0.99999, places=-2) - self.assertAlmostEqual(sum(results["ElectricLoad"]["offgrid_load_met_series_kw"]), 8760.0, places=-1) - self.assertAlmostEqual(results["Financial"]["lifecycle_offgrid_other_annual_costs_after_tax"], 0.0, places=-2) + # # Validate that we got off-grid response fields + # self.assertAlmostEqual(results["Financial"]["offgrid_microgrid_lcoe_dollars_per_kwh"], 0.337, places=-3) + # self.assertAlmostEqual(results["ElectricTariff"]["year_one_bill_before_tax"], 0.0) + # self.assertAlmostEqual(results["ElectricLoad"]["offgrid_load_met_fraction"], 0.99999, places=-2) + # self.assertAlmostEqual(sum(results["ElectricLoad"]["offgrid_load_met_series_kw"]), 8760.0, places=-1) + # self.assertAlmostEqual(results["Financial"]["lifecycle_offgrid_other_annual_costs_after_tax"], 0.0, places=-2) - def test_process_reopt_error(self): - """ - Purpose of this test is to ensure REopt status 400 is returned using the reoptjl endpoint - """ - - post_file = os.path.join('reoptjl', 'test', 'posts', 'handle_reopt_error.json') - post = json.load(open(post_file, 'r')) - - resp = self.api_client.post('/v3/job/', format='json', data=post) - self.assertHttpCreated(resp) - r = json.loads(resp.content) - run_uuid = r.get('run_uuid') - - resp = self.api_client.get(f'/v3/job/{run_uuid}/results') - r = json.loads(resp.content) - assert('errors' in r["messages"].keys()) - assert('warnings' in r["messages"].keys()) - assert(r['messages']['has_stacktrace']==True) - assert(resp.status_code==400) - - - def test_thermal_in_results(self): - """ - Purpose of this test is to check that the expected thermal loads, techs, and storage are included in the results - """ - - post_file = os.path.join('reoptjl', 'test', 'posts', 'test_thermal_in_results.json') #includes GhpGhx responses - post = json.load(open(post_file, 'r')) - - resp = self.api_client.post('/v3/job/', format='json', data=post) - self.assertHttpCreated(resp) - r = json.loads(resp.content) - run_uuid = r.get('run_uuid') + # def test_process_reopt_error(self): + # """ + # Purpose of this test is to ensure REopt status 400 is returned using the reoptjl endpoint + # """ + + # post_file = os.path.join('reoptjl', 'test', 'posts', 'handle_reopt_error.json') + # post = json.load(open(post_file, 'r')) + + # resp = self.api_client.post('/v3/job/', format='json', data=post) + # self.assertHttpCreated(resp) + # r = json.loads(resp.content) + # run_uuid = r.get('run_uuid') + + # resp = self.api_client.get(f'/v3/job/{run_uuid}/results') + # r = json.loads(resp.content) + # assert('errors' in r["messages"].keys()) + # assert('warnings' in r["messages"].keys()) + # assert(r['messages']['has_stacktrace']==True) + # assert(resp.status_code==400) + + + # def test_thermal_in_results(self): + # """ + # Purpose of this test is to check that the expected thermal loads, techs, and storage are included in the results + # """ + + # post_file = os.path.join('reoptjl', 'test', 'posts', 'test_thermal_in_results.json') #includes GhpGhx responses + # post = json.load(open(post_file, 'r')) + + # resp = self.api_client.post('/v3/job/', format='json', data=post) + # self.assertHttpCreated(resp) + # r = json.loads(resp.content) + # run_uuid = r.get('run_uuid') - resp = self.api_client.get(f'/v3/job/{run_uuid}/results') - r = json.loads(resp.content) - inputs = r["inputs"] - results = r["outputs"] - self.assertIn("CoolingLoad", list(inputs.keys())) - self.assertIn("CoolingLoad", list(results.keys())) - self.assertIn("CHP", list(results.keys())) - self.assertIn("thermal_to_dhw_load_series_mmbtu_per_hour", list(results["CHP"].keys())) - self.assertIn("thermal_to_space_heating_load_series_mmbtu_per_hour", list(results["CHP"].keys())) - self.assertIn("thermal_to_dhw_load_series_mmbtu_per_hour", list(results["CHP"].keys())) - self.assertIn("ExistingChiller",list(results.keys())) - self.assertIn("ExistingBoiler", list(results.keys())) - self.assertIn("HeatingLoad", list(results.keys())) - self.assertIn("process_heat_thermal_load_series_mmbtu_per_hour", list(results["HeatingLoad"].keys())) - self.assertIn("process_heat_boiler_fuel_load_series_mmbtu_per_hour", list(results["HeatingLoad"].keys())) - self.assertIn("HotThermalStorage", list(results.keys())) - self.assertIn("storage_to_dhw_load_series_mmbtu_per_hour", list(results["HotThermalStorage"].keys())) - self.assertIn("storage_to_space_heating_load_series_mmbtu_per_hour", list(results["HotThermalStorage"].keys())) - self.assertIn("storage_to_dhw_load_series_mmbtu_per_hour", list(results["HotThermalStorage"].keys())) - self.assertIn("ColdThermalStorage", list(results.keys())) - self.assertIn("AbsorptionChiller", list(results.keys())) - self.assertIn("GHP", list(results.keys())) - - - def test_chp_defaults_from_julia(self): - # Test that the inputs_with_defaults_set_in_julia feature worked for CHP, consistent with /chp_defaults - post_file = os.path.join('reoptjl', 'test', 'posts', 'chp_defaults_post.json') - post = json.load(open(post_file, 'r')) - # Make average MMBtu/hr thermal steam greater than 7 MMBtu/hr threshold for combustion_turbine to be chosen - # Default ExistingBoiler efficiency for production_type = steam is 0.75 - post["SpaceHeatingLoad"]["annual_mmbtu"] = 8760 * 8 / 0.75 - post["DomesticHotWaterLoad"]["annual_mmbtu"] = 8760 * 8 / 0.75 - resp = self.api_client.post('/v3/job/', format='json', data=post) - self.assertHttpCreated(resp) - r = json.loads(resp.content) - run_uuid = r.get('run_uuid') - - resp = self.api_client.get(f'/v3/job/{run_uuid}/results') - r = json.loads(resp.content) - - inputs_chp = r["inputs"]["CHP"] - - avg_fuel_load = (post["SpaceHeatingLoad"]["annual_mmbtu"] + - post["DomesticHotWaterLoad"]["annual_mmbtu"]) / 8760.0 - inputs_chp_defaults = {"hot_water_or_steam": post["ExistingBoiler"]["production_type"], - "avg_boiler_fuel_load_mmbtu_per_hour": avg_fuel_load - } - - # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint - resp = self.api_client.get(f'/v3/chp_defaults', data=inputs_chp_defaults) - view_response = json.loads(resp.content) - - for key in view_response["default_inputs"].keys(): - if post["CHP"].get(key) is None: # Check that default got assigned consistent with /chp_defaults - if key == "max_kw": - self.assertEquals(inputs_chp[key], view_response["chp_max_size_kw"]) - else: - self.assertEquals(inputs_chp[key], view_response["default_inputs"][key]) - else: # Make sure we didn't overwrite user-input - self.assertEquals(inputs_chp[key], post["CHP"][key]) - - def test_peak_load_outage_times(self): - """ - Purpose of this test is to test the endpoint /peak_load_outage_times - """ - - load = [100]*8760 - load[40*24] = 200 - load[50*24-1] = 300 - load[70*24+13] = 300 - load[170*24] = 300 - load[243*24] = 400 - outage_inputs = {"seasonal_peaks": True, - "outage_duration": 95, - "critical_load": load, - "start_not_center_on_peaks": False - } - expected_time_steps = [50*24-1-47+1, 70*24+13-47+1, 170*24-47+1, 243*24-47+1] - resp = self.api_client.post(f'/v3/peak_load_outage_times', data=outage_inputs) - self.assertHttpOK(resp) - resp = json.loads(resp.content) - self.assertEquals(resp["outage_start_time_steps"], expected_time_steps) - - outage_inputs["seasonal_peaks"] = False - outage_inputs["start_not_center_on_peaks"] = True - expected_time_steps = [243*24+1] - resp = self.api_client.post(f'/v3/peak_load_outage_times', data=outage_inputs) - self.assertHttpOK(resp) - resp = json.loads(resp.content) - self.assertEquals(resp["outage_start_time_steps"], expected_time_steps) - - def test_superset_input_fields(self): - """ - Purpose of this test is to test the API's ability to accept all relevant - input fields and send to REopt, ensuring name input consistency with REopt.jl. - Note: Does not currently test CHP inputs - """ - post_file = os.path.join('reoptjl', 'test', 'posts', 'all_inputs_test.json') - post = json.load(open(post_file, 'r')) - - resp = self.api_client.post('/v3/job/', format='json', data=post) - self.assertHttpCreated(resp) - r = json.loads(resp.content) - run_uuid = r.get('run_uuid') - - resp = self.api_client.get(f'/v3/job/{run_uuid}/results') - r = json.loads(resp.content) - results = r["outputs"] - self.assertAlmostEqual(results["Financial"]["npv"], -258533.19, delta=0.01*results["Financial"]["lcc"]) - assert(resp.status_code==200) - - def test_steamturbine_defaults_from_julia(self): - # Test that the inputs_with_defaults_set_in_julia feature worked for SteamTurbine, consistent with /chp_defaults - post_file = os.path.join('reoptjl', 'test', 'posts', 'steamturbine_defaults_post.json') - post = json.load(open(post_file, 'r')) - - # Call http.jl /reopt to run SteamTurbine scenario and get results for defaults from julia checking - resp = self.api_client.post('/v3/job/', format='json', data=post) - self.assertHttpCreated(resp) - r = json.loads(resp.content) - run_uuid = r.get('run_uuid') - - resp = self.api_client.get(f'/v3/job/{run_uuid}/results') - r = json.loads(resp.content) - - inputs_steamturbine = r["inputs"]["SteamTurbine"] - - avg_fuel_load = (post["SpaceHeatingLoad"]["annual_mmbtu"] + - post["DomesticHotWaterLoad"]["annual_mmbtu"]) / 8760.0 + # resp = self.api_client.get(f'/v3/job/{run_uuid}/results') + # r = json.loads(resp.content) + # inputs = r["inputs"] + # results = r["outputs"] + # self.assertIn("CoolingLoad", list(inputs.keys())) + # self.assertIn("CoolingLoad", list(results.keys())) + # self.assertIn("CHP", list(results.keys())) + # self.assertIn("thermal_to_dhw_load_series_mmbtu_per_hour", list(results["CHP"].keys())) + # self.assertIn("thermal_to_space_heating_load_series_mmbtu_per_hour", list(results["CHP"].keys())) + # self.assertIn("thermal_to_dhw_load_series_mmbtu_per_hour", list(results["CHP"].keys())) + # self.assertIn("ExistingChiller",list(results.keys())) + # self.assertIn("ExistingBoiler", list(results.keys())) + # self.assertIn("HeatingLoad", list(results.keys())) + # self.assertIn("process_heat_thermal_load_series_mmbtu_per_hour", list(results["HeatingLoad"].keys())) + # self.assertIn("process_heat_boiler_fuel_load_series_mmbtu_per_hour", list(results["HeatingLoad"].keys())) + # self.assertIn("HotThermalStorage", list(results.keys())) + # self.assertIn("storage_to_dhw_load_series_mmbtu_per_hour", list(results["HotThermalStorage"].keys())) + # self.assertIn("storage_to_space_heating_load_series_mmbtu_per_hour", list(results["HotThermalStorage"].keys())) + # self.assertIn("storage_to_dhw_load_series_mmbtu_per_hour", list(results["HotThermalStorage"].keys())) + # self.assertIn("ColdThermalStorage", list(results.keys())) + # self.assertIn("AbsorptionChiller", list(results.keys())) + # self.assertIn("GHP", list(results.keys())) + + + # def test_chp_defaults_from_julia(self): + # # Test that the inputs_with_defaults_set_in_julia feature worked for CHP, consistent with /chp_defaults + # post_file = os.path.join('reoptjl', 'test', 'posts', 'chp_defaults_post.json') + # post = json.load(open(post_file, 'r')) + # # Make average MMBtu/hr thermal steam greater than 7 MMBtu/hr threshold for combustion_turbine to be chosen + # # Default ExistingBoiler efficiency for production_type = steam is 0.75 + # post["SpaceHeatingLoad"]["annual_mmbtu"] = 8760 * 8 / 0.75 + # post["DomesticHotWaterLoad"]["annual_mmbtu"] = 8760 * 8 / 0.75 + # resp = self.api_client.post('/v3/job/', format='json', data=post) + # self.assertHttpCreated(resp) + # r = json.loads(resp.content) + # run_uuid = r.get('run_uuid') + + # resp = self.api_client.get(f'/v3/job/{run_uuid}/results') + # r = json.loads(resp.content) + + # inputs_chp = r["inputs"]["CHP"] + + # avg_fuel_load = (post["SpaceHeatingLoad"]["annual_mmbtu"] + + # post["DomesticHotWaterLoad"]["annual_mmbtu"]) / 8760.0 + # inputs_chp_defaults = {"hot_water_or_steam": post["ExistingBoiler"]["production_type"], + # "avg_boiler_fuel_load_mmbtu_per_hour": avg_fuel_load + # } + + # # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint + # resp = self.api_client.get(f'/v3/chp_defaults', data=inputs_chp_defaults) + # view_response = json.loads(resp.content) + + # for key in view_response["default_inputs"].keys(): + # if post["CHP"].get(key) is None: # Check that default got assigned consistent with /chp_defaults + # if key == "max_kw": + # self.assertEquals(inputs_chp[key], view_response["chp_max_size_kw"]) + # else: + # self.assertEquals(inputs_chp[key], view_response["default_inputs"][key]) + # else: # Make sure we didn't overwrite user-input + # self.assertEquals(inputs_chp[key], post["CHP"][key]) + + # def test_peak_load_outage_times(self): + # """ + # Purpose of this test is to test the endpoint /peak_load_outage_times + # """ + + # load = [100]*8760 + # load[40*24] = 200 + # load[50*24-1] = 300 + # load[70*24+13] = 300 + # load[170*24] = 300 + # load[243*24] = 400 + # outage_inputs = {"seasonal_peaks": True, + # "outage_duration": 95, + # "critical_load": load, + # "start_not_center_on_peaks": False + # } + # expected_time_steps = [50*24-1-47+1, 70*24+13-47+1, 170*24-47+1, 243*24-47+1] + # resp = self.api_client.post(f'/v3/peak_load_outage_times', data=outage_inputs) + # self.assertHttpOK(resp) + # resp = json.loads(resp.content) + # self.assertEquals(resp["outage_start_time_steps"], expected_time_steps) + + # outage_inputs["seasonal_peaks"] = False + # outage_inputs["start_not_center_on_peaks"] = True + # expected_time_steps = [243*24+1] + # resp = self.api_client.post(f'/v3/peak_load_outage_times', data=outage_inputs) + # self.assertHttpOK(resp) + # resp = json.loads(resp.content) + # self.assertEquals(resp["outage_start_time_steps"], expected_time_steps) + + # def test_superset_input_fields(self): + # """ + # Purpose of this test is to test the API's ability to accept all relevant + # input fields and send to REopt, ensuring name input consistency with REopt.jl. + # Note: Does not currently test CHP inputs + # """ + # post_file = os.path.join('reoptjl', 'test', 'posts', 'all_inputs_test.json') + # post = json.load(open(post_file, 'r')) + + # resp = self.api_client.post('/v3/job/', format='json', data=post) + # self.assertHttpCreated(resp) + # r = json.loads(resp.content) + # run_uuid = r.get('run_uuid') + + # resp = self.api_client.get(f'/v3/job/{run_uuid}/results') + # r = json.loads(resp.content) + # results = r["outputs"] + # self.assertAlmostEqual(results["Financial"]["npv"], -258533.19, delta=0.01*results["Financial"]["lcc"]) + # assert(resp.status_code==200) + + # def test_steamturbine_defaults_from_julia(self): + # # Test that the inputs_with_defaults_set_in_julia feature worked for SteamTurbine, consistent with /chp_defaults + # post_file = os.path.join('reoptjl', 'test', 'posts', 'steamturbine_defaults_post.json') + # post = json.load(open(post_file, 'r')) + + # # Call http.jl /reopt to run SteamTurbine scenario and get results for defaults from julia checking + # resp = self.api_client.post('/v3/job/', format='json', data=post) + # self.assertHttpCreated(resp) + # r = json.loads(resp.content) + # run_uuid = r.get('run_uuid') + + # resp = self.api_client.get(f'/v3/job/{run_uuid}/results') + # r = json.loads(resp.content) + + # inputs_steamturbine = r["inputs"]["SteamTurbine"] + + # avg_fuel_load = (post["SpaceHeatingLoad"]["annual_mmbtu"] + + # post["DomesticHotWaterLoad"]["annual_mmbtu"]) / 8760.0 - inputs_steamturbine_defaults = { - "prime_mover": "steam_turbine", - "avg_boiler_fuel_load_mmbtu_per_hour": avg_fuel_load - } - - # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint - resp = self.api_client.get(f'/v3/chp_defaults', data=inputs_steamturbine_defaults) - view_response = json.loads(resp.content) - - for key in view_response["default_inputs"].keys(): - # skip this key because its NaN in REoptInputs but is populated in /chp_defaults response. - if key != "inlet_steam_temperature_degF": - if post["SteamTurbine"].get(key) is None: # Check that default got assigned consistent with /chp_defaults - self.assertEquals(inputs_steamturbine[key], view_response["default_inputs"][key]) - else: # Make sure we didn't overwrite user-input - self.assertEquals(inputs_steamturbine[key], post["SteamTurbine"][key]) - - def test_hybridghp(self): - post_file = os.path.join('reoptjl', 'test', 'posts', 'hybrid_ghp.json') - post = json.load(open(post_file, 'r')) - - post['GHP']['ghpghx_inputs'][0]['hybrid_ghx_sizing_method'] = 'Automatic' - post['GHP']['avoided_capex_by_ghp_present_value'] = 1.0e6 - post['GHP']['ghx_useful_life_years'] = 35 - - # Call http.jl /reopt to run SteamTurbine scenario and get results for defaults from julia checking - resp = self.api_client.post('/v3/job/', format='json', data=post) - self.assertHttpCreated(resp) - r = json.loads(resp.content) - run_uuid = r.get('run_uuid') - - resp = self.api_client.get(f'/v3/job/{run_uuid}/results') - r = json.loads(resp.content) - - # calculated_ghx_residual_value 117065.83 - self.assertAlmostEqual(r["outputs"]["GHP"]["ghx_residual_value_present_value"], 117065.83, delta=500) - - def test_centralghp(self): - post_file = os.path.join('reoptjl', 'test', 'posts', 'central_plant_ghp.json') - post = json.load(open(post_file, 'r')) - - # Call http.jl /reopt to run the central plant GHP scenario and get results for defaults from julia checking - resp = self.api_client.post('/v3/job/', format='json', data=post) - self.assertHttpCreated(resp) - r = json.loads(resp.content) - run_uuid = r.get('run_uuid') - - resp = self.api_client.get(f'/v3/job/{run_uuid}/results') - r = json.loads(resp.content) - - self.assertAlmostEqual(r["outputs"]["Financial"]["lifecycle_capital_costs"], 1046066.8, delta=1000) \ No newline at end of file + # inputs_steamturbine_defaults = { + # "prime_mover": "steam_turbine", + # "avg_boiler_fuel_load_mmbtu_per_hour": avg_fuel_load + # } + + # # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint + # resp = self.api_client.get(f'/v3/chp_defaults', data=inputs_steamturbine_defaults) + # view_response = json.loads(resp.content) + + # for key in view_response["default_inputs"].keys(): + # # skip this key because its NaN in REoptInputs but is populated in /chp_defaults response. + # if key != "inlet_steam_temperature_degF": + # if post["SteamTurbine"].get(key) is None: # Check that default got assigned consistent with /chp_defaults + # self.assertEquals(inputs_steamturbine[key], view_response["default_inputs"][key]) + # else: # Make sure we didn't overwrite user-input + # self.assertEquals(inputs_steamturbine[key], post["SteamTurbine"][key]) + + # def test_hybridghp(self): + # post_file = os.path.join('reoptjl', 'test', 'posts', 'hybrid_ghp.json') + # post = json.load(open(post_file, 'r')) + + # post['GHP']['ghpghx_inputs'][0]['hybrid_ghx_sizing_method'] = 'Automatic' + # post['GHP']['avoided_capex_by_ghp_present_value'] = 1.0e6 + # post['GHP']['ghx_useful_life_years'] = 35 + + # # Call http.jl /reopt to run SteamTurbine scenario and get results for defaults from julia checking + # resp = self.api_client.post('/v3/job/', format='json', data=post) + # self.assertHttpCreated(resp) + # r = json.loads(resp.content) + # run_uuid = r.get('run_uuid') + + # resp = self.api_client.get(f'/v3/job/{run_uuid}/results') + # r = json.loads(resp.content) + + # # calculated_ghx_residual_value 117065.83 + # self.assertAlmostEqual(r["outputs"]["GHP"]["ghx_residual_value_present_value"], 117065.83, delta=500) + + # def test_centralghp(self): + # post_file = os.path.join('reoptjl', 'test', 'posts', 'central_plant_ghp.json') + # post = json.load(open(post_file, 'r')) + + # # Call http.jl /reopt to run the central plant GHP scenario and get results for defaults from julia checking + # resp = self.api_client.post('/v3/job/', format='json', data=post) + # self.assertHttpCreated(resp) + # r = json.loads(resp.content) + # run_uuid = r.get('run_uuid') + + # resp = self.api_client.get(f'/v3/job/{run_uuid}/results') + # r = json.loads(resp.content) + + # self.assertAlmostEqual(r["outputs"]["Financial"]["lifecycle_capital_costs"], 1046066.8, delta=1000) \ No newline at end of file diff --git a/reoptjl/test/test_validator.py b/reoptjl/test/test_validator.py index 7f73fdc06..0554e2005 100644 --- a/reoptjl/test/test_validator.py +++ b/reoptjl/test/test_validator.py @@ -13,334 +13,334 @@ def setUp(self): post_file = os.path.join('reoptjl', 'test', 'posts', 'validator_post.json') self.post = json.load(open(post_file, 'r')) - def test_elec_load_profile_length_validation_and_resampling(self): - """ - try different lengths of load profiles, where the following are valid: - - 8760 (hourly) - - 17520 (30 min) - - 35040 (15 min) - also confirm that up/down-sampling is working. - :return: None - """ - good_lengths = [8760, 17520, 35040] - bad_lengths = [8759, 17521] - - for length in bad_lengths + good_lengths: - post = copy.deepcopy(self.post) - post["APIMeta"]["run_uuid"] = uuid.uuid4() - post['ElectricLoad']['loads_kw'] = list(range(length)) - post['ElectricLoad']['critical_loads_kw'] = list(range(length)) - validator = InputValidator(post) - validator.clean() - validator.clean_fields() - validator.cross_clean() - - if length in good_lengths: - self.assertEquals(validator.is_valid, True) - - if length > 8760: # check downsampling - self.assertEquals(len(validator.models["ElectricLoad"].loads_kw), 8760) - self.assertEquals(len(validator.models["ElectricLoad"].critical_loads_kw), 8760) - assert("resampled inputs" in validator.messages) - - elif length in bad_lengths: - self.assertEquals(validator.is_valid, False) - assert('Invalid length' in validator.validation_errors['ElectricLoad']['loads_kw']) - assert('Invalid length' in validator.validation_errors['ElectricLoad']['critical_loads_kw']) - - # check upsampling - for time_steps_per_hour in [2, 4]: - post = copy.deepcopy(self.post) - post["APIMeta"]["run_uuid"] = uuid.uuid4() - post['ElectricLoad']['loads_kw'] = list(range(8760)) - post['ElectricLoad']['critical_loads_kw'] = list(range(8760)) - post['Settings']['time_steps_per_hour'] = time_steps_per_hour - validator = InputValidator(post) - validator.clean() - validator.clean_fields() - validator.cross_clean() - self.assertEquals(validator.is_valid, True) - self.assertEquals(len(validator.models["ElectricLoad"].loads_kw), time_steps_per_hour*8760) - self.assertEquals(len(validator.models["ElectricLoad"].critical_loads_kw), time_steps_per_hour*8760) - - def test_bad_blended_profile_inputs(self): - post = copy.deepcopy(self.post) - del(post["ElectricLoad"]["doe_reference_name"]) - post["ElectricLoad"]["blended_doe_reference_names"] = ["badname", "LargeOffice"] - post["ElectricLoad"]["blended_doe_reference_percents"] = [1.5] - validator = InputValidator(post) - validator.clean_fields() - - assert("'badname' is not a valid choice" - in validator.validation_errors['ElectricLoad']['blended_doe_reference_names'][0]) - assert("Ensure this value is less than or equal to 1.0" in - validator.validation_errors['ElectricLoad']['blended_doe_reference_percents'][0]) - - post["ElectricLoad"]["blended_doe_reference_names"] = ["MediumOffice", "LargeOffice"] - post["ElectricLoad"]["blended_doe_reference_percents"] = [0.5] - post["APIMeta"]["run_uuid"] = uuid.uuid4() - validator = InputValidator(post) - validator.clean_fields() - validator.clean() - - assert("The number of blended_doe_reference_names must equal the number of blended_doe_reference_percents" in - validator.validation_errors['ElectricLoad']['blended_doe_reference_names'][0]) - assert("Sum must = 1.0." in - validator.validation_errors['ElectricLoad']['blended_doe_reference_percents'][0]) - - def test_off_grid_defaults_overrides(self): - post_file = os.path.join('reoptjl', 'test', 'posts', 'off_grid_validations.json') - post = json.load(open(post_file, 'r')) + # def test_elec_load_profile_length_validation_and_resampling(self): + # """ + # try different lengths of load profiles, where the following are valid: + # - 8760 (hourly) + # - 17520 (30 min) + # - 35040 (15 min) + # also confirm that up/down-sampling is working. + # :return: None + # """ + # good_lengths = [8760, 17520, 35040] + # bad_lengths = [8759, 17521] + + # for length in bad_lengths + good_lengths: + # post = copy.deepcopy(self.post) + # post["APIMeta"]["run_uuid"] = uuid.uuid4() + # post['ElectricLoad']['loads_kw'] = list(range(length)) + # post['ElectricLoad']['critical_loads_kw'] = list(range(length)) + # validator = InputValidator(post) + # validator.clean() + # validator.clean_fields() + # validator.cross_clean() + + # if length in good_lengths: + # self.assertEquals(validator.is_valid, True) + + # if length > 8760: # check downsampling + # self.assertEquals(len(validator.models["ElectricLoad"].loads_kw), 8760) + # self.assertEquals(len(validator.models["ElectricLoad"].critical_loads_kw), 8760) + # assert("resampled inputs" in validator.messages) + + # elif length in bad_lengths: + # self.assertEquals(validator.is_valid, False) + # assert('Invalid length' in validator.validation_errors['ElectricLoad']['loads_kw']) + # assert('Invalid length' in validator.validation_errors['ElectricLoad']['critical_loads_kw']) + + # # check upsampling + # for time_steps_per_hour in [2, 4]: + # post = copy.deepcopy(self.post) + # post["APIMeta"]["run_uuid"] = uuid.uuid4() + # post['ElectricLoad']['loads_kw'] = list(range(8760)) + # post['ElectricLoad']['critical_loads_kw'] = list(range(8760)) + # post['Settings']['time_steps_per_hour'] = time_steps_per_hour + # validator = InputValidator(post) + # validator.clean() + # validator.clean_fields() + # validator.cross_clean() + # self.assertEquals(validator.is_valid, True) + # self.assertEquals(len(validator.models["ElectricLoad"].loads_kw), time_steps_per_hour*8760) + # self.assertEquals(len(validator.models["ElectricLoad"].critical_loads_kw), time_steps_per_hour*8760) + + # def test_bad_blended_profile_inputs(self): + # post = copy.deepcopy(self.post) + # del(post["ElectricLoad"]["doe_reference_name"]) + # post["ElectricLoad"]["blended_doe_reference_names"] = ["badname", "LargeOffice"] + # post["ElectricLoad"]["blended_doe_reference_percents"] = [1.5] + # validator = InputValidator(post) + # validator.clean_fields() + + # assert("'badname' is not a valid choice" + # in validator.validation_errors['ElectricLoad']['blended_doe_reference_names'][0]) + # assert("Ensure this value is less than or equal to 1.0" in + # validator.validation_errors['ElectricLoad']['blended_doe_reference_percents'][0]) + + # post["ElectricLoad"]["blended_doe_reference_names"] = ["MediumOffice", "LargeOffice"] + # post["ElectricLoad"]["blended_doe_reference_percents"] = [0.5] + # post["APIMeta"]["run_uuid"] = uuid.uuid4() + # validator = InputValidator(post) + # validator.clean_fields() + # validator.clean() + + # assert("The number of blended_doe_reference_names must equal the number of blended_doe_reference_percents" in + # validator.validation_errors['ElectricLoad']['blended_doe_reference_names'][0]) + # assert("Sum must = 1.0." in + # validator.validation_errors['ElectricLoad']['blended_doe_reference_percents'][0]) + + # def test_off_grid_defaults_overrides(self): + # post_file = os.path.join('reoptjl', 'test', 'posts', 'off_grid_validations.json') + # post = json.load(open(post_file, 'r')) - post["APIMeta"]["run_uuid"] = uuid.uuid4() - - validator = InputValidator(post) - validator.clean_fields() - validator.clean() - validator.cross_clean() - self.assertEquals(validator.is_valid, True) - - self.assertAlmostEqual(validator.models["Wind"].operating_reserve_required_fraction, 0.5) - self.assertAlmostEqual(validator.models["PV"].operating_reserve_required_fraction, 0.25) - self.assertEqual(validator.models["Wind"].installed_cost_per_kw, 4760.0) # set based on size_class - - self.assertAlmostEqual(validator.models["ElectricLoad"].operating_reserve_required_fraction, 0.1) - self.assertAlmostEqual(validator.models["ElectricLoad"].critical_load_fraction, 1.0) - self.assertAlmostEqual(validator.models["ElectricLoad"].min_load_met_annual_fraction, 0.99999) - - self.assertAlmostEqual(validator.models["Generator"].installed_cost_per_kw, 880) - self.assertAlmostEqual(validator.models["Generator"].om_cost_per_kw, 10) - self.assertAlmostEqual(validator.models["Generator"].fuel_avail_gal, 1.0e9) - self.assertAlmostEqual(validator.models["Generator"].min_turn_down_fraction, 0.15) - self.assertAlmostEqual(validator.models["Generator"].replacement_year, 10) - self.assertAlmostEqual(validator.models["Generator"].replace_cost_per_kw, validator.models["Generator"].installed_cost_per_kw) - - ## Test that some defaults can be overriden below - - post["ElectricLoad"]["operating_reserve_required_fraction"] = 0.2 - post["ElectricLoad"]["critical_load_fraction"] = 0.95 # cant override - post["ElectricLoad"]["min_load_met_annual_fraction"] = 0.95 + # post["APIMeta"]["run_uuid"] = uuid.uuid4() + + # validator = InputValidator(post) + # validator.clean_fields() + # validator.clean() + # validator.cross_clean() + # self.assertEquals(validator.is_valid, True) + + # self.assertAlmostEqual(validator.models["Wind"].operating_reserve_required_fraction, 0.5) + # self.assertAlmostEqual(validator.models["PV"].operating_reserve_required_fraction, 0.25) + # self.assertEqual(validator.models["Wind"].installed_cost_per_kw, 4760.0) # set based on size_class + + # self.assertAlmostEqual(validator.models["ElectricLoad"].operating_reserve_required_fraction, 0.1) + # self.assertAlmostEqual(validator.models["ElectricLoad"].critical_load_fraction, 1.0) + # self.assertAlmostEqual(validator.models["ElectricLoad"].min_load_met_annual_fraction, 0.99999) + + # self.assertAlmostEqual(validator.models["Generator"].installed_cost_per_kw, 880) + # self.assertAlmostEqual(validator.models["Generator"].om_cost_per_kw, 10) + # self.assertAlmostEqual(validator.models["Generator"].fuel_avail_gal, 1.0e9) + # self.assertAlmostEqual(validator.models["Generator"].min_turn_down_fraction, 0.15) + # self.assertAlmostEqual(validator.models["Generator"].replacement_year, 10) + # self.assertAlmostEqual(validator.models["Generator"].replace_cost_per_kw, validator.models["Generator"].installed_cost_per_kw) + + # ## Test that some defaults can be overriden below + + # post["ElectricLoad"]["operating_reserve_required_fraction"] = 0.2 + # post["ElectricLoad"]["critical_load_fraction"] = 0.95 # cant override + # post["ElectricLoad"]["min_load_met_annual_fraction"] = 0.95 - post["Generator"]["om_cost_per_kw"] = 21 - post["Generator"]["fuel_avail_gal"] = 10000 - post["Generator"]["min_turn_down_fraction"] = 0.14 - post["Generator"]["replacement_year"] = 7 - post["Generator"]["replace_cost_per_kw"] = 200 - - post["Wind"]["operating_reserve_required_fraction"] = 0.35 - post["PV"]["operating_reserve_required_fraction"] = 0.35 + # post["Generator"]["om_cost_per_kw"] = 21 + # post["Generator"]["fuel_avail_gal"] = 10000 + # post["Generator"]["min_turn_down_fraction"] = 0.14 + # post["Generator"]["replacement_year"] = 7 + # post["Generator"]["replace_cost_per_kw"] = 200 + + # post["Wind"]["operating_reserve_required_fraction"] = 0.35 + # post["PV"]["operating_reserve_required_fraction"] = 0.35 - post["APIMeta"]["run_uuid"] = uuid.uuid4() + # post["APIMeta"]["run_uuid"] = uuid.uuid4() - validator = InputValidator(post) - validator.clean_fields() - validator.clean() - validator.cross_clean() - self.assertEquals(validator.is_valid, True) + # validator = InputValidator(post) + # validator.clean_fields() + # validator.clean() + # validator.cross_clean() + # self.assertEquals(validator.is_valid, True) - self.assertAlmostEqual(validator.models["PV"].operating_reserve_required_fraction, 0.35) - self.assertAlmostEqual(validator.models["Wind"].operating_reserve_required_fraction, 0.35) + # self.assertAlmostEqual(validator.models["PV"].operating_reserve_required_fraction, 0.35) + # self.assertAlmostEqual(validator.models["Wind"].operating_reserve_required_fraction, 0.35) - self.assertAlmostEqual(validator.models["ElectricLoad"].operating_reserve_required_fraction, 0.2) - self.assertAlmostEqual(validator.models["ElectricLoad"].critical_load_fraction, 1.0) # cant override - self.assertAlmostEqual(validator.models["ElectricLoad"].min_load_met_annual_fraction, 0.95) + # self.assertAlmostEqual(validator.models["ElectricLoad"].operating_reserve_required_fraction, 0.2) + # self.assertAlmostEqual(validator.models["ElectricLoad"].critical_load_fraction, 1.0) # cant override + # self.assertAlmostEqual(validator.models["ElectricLoad"].min_load_met_annual_fraction, 0.95) - self.assertAlmostEqual(validator.models["Generator"].om_cost_per_kw, 21) - self.assertAlmostEqual(validator.models["Generator"].fuel_avail_gal, 10000) - self.assertAlmostEqual(validator.models["Generator"].min_turn_down_fraction, 0.14) - self.assertAlmostEqual(validator.models["Generator"].replacement_year, 7) - self.assertAlmostEqual(validator.models["Generator"].replace_cost_per_kw, 200.0) + # self.assertAlmostEqual(validator.models["Generator"].om_cost_per_kw, 21) + # self.assertAlmostEqual(validator.models["Generator"].fuel_avail_gal, 10000) + # self.assertAlmostEqual(validator.models["Generator"].min_turn_down_fraction, 0.14) + # self.assertAlmostEqual(validator.models["Generator"].replacement_year, 7) + # self.assertAlmostEqual(validator.models["Generator"].replace_cost_per_kw, 200.0) - def existingboiler_boiler_validation(self): + # def existingboiler_boiler_validation(self): - """ - Validate clean, cross-clean methods are working as expected - """ - post_file = os.path.join('reoptjl', 'test', 'posts', 'existing_boiler.json') - post = json.load(open(post_file, 'r')) + # """ + # Validate clean, cross-clean methods are working as expected + # """ + # post_file = os.path.join('reoptjl', 'test', 'posts', 'existing_boiler.json') + # post = json.load(open(post_file, 'r')) - post["APIMeta"]["run_uuid"] = uuid.uuid4() + # post["APIMeta"]["run_uuid"] = uuid.uuid4() - validator = InputValidator(post) - validator.clean_fields() - validator.clean() - validator.cross_clean() - self.assertEquals(validator.is_valid, True) + # validator = InputValidator(post) + # validator.clean_fields() + # validator.clean() + # validator.cross_clean() + # self.assertEquals(validator.is_valid, True) - self.assertAlmostEqual(validator.models["ExistingBoiler"].emissions_factor_lb_CO2_per_mmbtu, 117, places=-1) - self.assertAlmostEqual(len(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760) - self.assertAlmostEqual(sum(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760*0.5) + # self.assertAlmostEqual(validator.models["ExistingBoiler"].emissions_factor_lb_CO2_per_mmbtu, 117, places=-1) + # self.assertAlmostEqual(len(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760) + # self.assertAlmostEqual(sum(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760*0.5) - self.assertAlmostEqual(len(validator.models["Boiler"].fuel_cost_per_mmbtu), 8760) - self.assertAlmostEqual(sum(validator.models["Boiler"].fuel_cost_per_mmbtu), 8760*0.25) + # self.assertAlmostEqual(len(validator.models["Boiler"].fuel_cost_per_mmbtu), 8760) + # self.assertAlmostEqual(sum(validator.models["Boiler"].fuel_cost_per_mmbtu), 8760*0.25) - # Ensure Hot Thermal Storage System parameter is loaded from json - self.assertAlmostEqual(validator.models["HotThermalStorage"].max_gal, 2500.0) - - # Validate 12 month fuel cost vector gets scaled correctly - - post["ExistingBoiler"]["fuel_cost_per_mmbtu"] = [1,2,1,1,1,1,1,1,1,1,1,1] - post["Boiler"]["fuel_cost_per_mmbtu"] = [0.5,1,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5] - - post["APIMeta"]["run_uuid"] = uuid.uuid4() - - validator = InputValidator(post) - validator.clean_fields() - validator.clean() - validator.cross_clean() - self.assertEquals(validator.is_valid, True) - - self.assertAlmostEqual(len(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760) - self.assertEqual(sum(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 9432.0) - self.assertAlmostEqual(len(validator.models["Boiler"].fuel_cost_per_mmbtu), 8760) - self.assertEqual(sum(validator.models["Boiler"].fuel_cost_per_mmbtu), 9432.0*0.5) - - def test_missing_required_keys(self): - #start with on_grid, and keep all keys - required_ongrid_object_names = [ - "Site", "ElectricLoad", "ElectricTariff" - ] - required_offgrid_object_names = [ - "Site", "ElectricLoad" - ] - #prior to removal of keys, test lack or errors of validator with full inputs - post = copy.deepcopy(self.post) - post["APIMeta"]["run_uuid"] = uuid.uuid4() - post["Settings"]["off_grid_flag"] = False - validator = InputValidator(post) - for key in required_ongrid_object_names: - assert (key not in validator.validation_errors.keys()) - post = copy.deepcopy(self.post) - post["APIMeta"]["run_uuid"] = uuid.uuid4() - post["Settings"]["off_grid_flag"] = True - validator = InputValidator(post) - for key in required_ongrid_object_names: - assert (key not in validator.validation_errors.keys()) - #test ongrid removal of all ongrid keys, trigger an error for all required ongrid inputs - post = copy.deepcopy(self.post) - post["APIMeta"]["run_uuid"] = uuid.uuid4() - post["Settings"]["off_grid_flag"] = False - for key in required_ongrid_object_names: - del post[key] - validator = InputValidator(post) - for key in required_ongrid_object_names: - assert("Missing required inputs." in validator.validation_errors[key]) - #test offgrid removal of all offgrid keys, should trigger an error for required offgrid but not ongrid requirements - post = copy.deepcopy(self.post) - post["APIMeta"]["run_uuid"] = uuid.uuid4() - post["Settings"]["off_grid_flag"] = True - for key in required_ongrid_object_names: - del post[key] - validator = InputValidator(post) - for key in required_ongrid_object_names: - if key in required_offgrid_object_names: - assert("Missing required inputs." in validator.validation_errors[key]) - else: - assert(key not in validator.validation_errors.keys()) - - # check for missing CHP inputs - post = copy.deepcopy(self.post) - post["APIMeta"]["run_uuid"] = uuid.uuid4() - post["CHP"].pop("fuel_cost_per_mmbtu") - validator = InputValidator(post) - validator.clean_fields() - validator.clean() - validator.cross_clean() - assert("required inputs" in validator.validation_errors["CHP"].keys()) - - def test_multiple_outages_validation(self): - """ - ensure that validation of multiple outages post works as expected and catches errors - """ - post_file = os.path.join('reoptjl', 'test', 'posts', 'outage.json') - outage_post = json.load(open(post_file, 'r')) - outage_post["APIMeta"] = {"run_uuid": uuid.uuid4()} - outage_post["Meta"] = { - "description": "test description", - "address": "test address" - } - validator = InputValidator(outage_post) - validator.clean_fields() - validator.clean() - validator.cross_clean() - self.assertEquals(validator.is_valid, True) - - # test mismatched length - post = copy.deepcopy(outage_post) - post["ElectricUtility"]["outage_durations"] = [10,20,30,40] - post["ElectricUtility"]["outage_probabilities"] = [0.8,0.2] - post["APIMeta"]["run_uuid"] = uuid.uuid4() - validator = InputValidator(post) - validator.clean() - assert("mismatched length" in validator.validation_errors["ElectricUtility"].keys()) - - # test missing outage_durations - post = copy.deepcopy(outage_post) - post["ElectricUtility"].pop("outage_durations") - post["APIMeta"]["run_uuid"] = uuid.uuid4() - validator = InputValidator(post) - validator.clean() - assert("missing required inputs" in validator.validation_errors["ElectricUtility"].keys()) - - # test sum of outage_probabilities != 1 - post = copy.deepcopy(outage_post) - post["ElectricUtility"]["outage_durations"] = [10,20] - post["ElectricUtility"]["outage_probabilities"] = [0.5,0.6] - post["APIMeta"]["run_uuid"] = uuid.uuid4() - validator = InputValidator(post) - validator.clean() - assert("outage_probabilities" in validator.validation_errors["ElectricUtility"].keys()) - - # test missing outage_probabilities - post = copy.deepcopy(outage_post) - post["ElectricUtility"]["outage_durations"] = [10,20] - post["ElectricUtility"].pop("outage_probabilities") - post["APIMeta"]["run_uuid"] = uuid.uuid4() - validator = InputValidator(post) - validator.clean_fields() - validator.clean() - validator.cross_clean() - self.assertEquals(validator.models["ElectricUtility"].outage_probabilities, [0.5, 0.5]) - self.assertEquals(validator.is_valid, True) - - def test_pv_tilt_defaults(self): - post = copy.deepcopy(self.post) - post["APIMeta"]["run_uuid"] = uuid.uuid4() - del(post["ElectricStorage"]) - del(post["CHP"]) - del(post["PV"]["tilt"]) - validator = InputValidator(post) - validator.clean_fields() - validator.clean() - validator.cross_clean() - self.assertEquals(validator.models["PV"].tilt, 20) - - post["APIMeta"]["run_uuid"] = uuid.uuid4() - post["PV"]["array_type"] = 2 - validator = InputValidator(post) - validator.clean_fields() - validator.clean() - validator.cross_clean() - self.assertAlmostEquals(validator.models["PV"].tilt, 0) - - def boiler_validation(self): - """ - Validate clean, cross-clean methods are working as expected - """ - post_file = os.path.join('job', 'test', 'posts', 'boiler_test.json') - post = json.load(open(post_file, 'r')) - - post["APIMeta"]["run_uuid"] = uuid.uuid4() - - validator = InputValidator(post) - validator.clean_fields() - validator.clean() - validator.cross_clean() - self.assertEquals(validator.is_valid, True) - - # Update with Boiler test fields - # self.assertAlmostEqual(validator.models["ExistingBoiler"].emissions_factor_lb_CO2_per_mmbtu, 117, places=-1) - # self.assertAlmostEqual(len(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760) - # self.assertAlmostEqual(sum(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760*0.5) + # # Ensure Hot Thermal Storage System parameter is loaded from json + # self.assertAlmostEqual(validator.models["HotThermalStorage"].max_gal, 2500.0) + + # # Validate 12 month fuel cost vector gets scaled correctly + + # post["ExistingBoiler"]["fuel_cost_per_mmbtu"] = [1,2,1,1,1,1,1,1,1,1,1,1] + # post["Boiler"]["fuel_cost_per_mmbtu"] = [0.5,1,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5] + + # post["APIMeta"]["run_uuid"] = uuid.uuid4() + + # validator = InputValidator(post) + # validator.clean_fields() + # validator.clean() + # validator.cross_clean() + # self.assertEquals(validator.is_valid, True) + + # self.assertAlmostEqual(len(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760) + # self.assertEqual(sum(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 9432.0) + # self.assertAlmostEqual(len(validator.models["Boiler"].fuel_cost_per_mmbtu), 8760) + # self.assertEqual(sum(validator.models["Boiler"].fuel_cost_per_mmbtu), 9432.0*0.5) + + # def test_missing_required_keys(self): + # #start with on_grid, and keep all keys + # required_ongrid_object_names = [ + # "Site", "ElectricLoad", "ElectricTariff" + # ] + # required_offgrid_object_names = [ + # "Site", "ElectricLoad" + # ] + # #prior to removal of keys, test lack or errors of validator with full inputs + # post = copy.deepcopy(self.post) + # post["APIMeta"]["run_uuid"] = uuid.uuid4() + # post["Settings"]["off_grid_flag"] = False + # validator = InputValidator(post) + # for key in required_ongrid_object_names: + # assert (key not in validator.validation_errors.keys()) + # post = copy.deepcopy(self.post) + # post["APIMeta"]["run_uuid"] = uuid.uuid4() + # post["Settings"]["off_grid_flag"] = True + # validator = InputValidator(post) + # for key in required_ongrid_object_names: + # assert (key not in validator.validation_errors.keys()) + # #test ongrid removal of all ongrid keys, trigger an error for all required ongrid inputs + # post = copy.deepcopy(self.post) + # post["APIMeta"]["run_uuid"] = uuid.uuid4() + # post["Settings"]["off_grid_flag"] = False + # for key in required_ongrid_object_names: + # del post[key] + # validator = InputValidator(post) + # for key in required_ongrid_object_names: + # assert("Missing required inputs." in validator.validation_errors[key]) + # #test offgrid removal of all offgrid keys, should trigger an error for required offgrid but not ongrid requirements + # post = copy.deepcopy(self.post) + # post["APIMeta"]["run_uuid"] = uuid.uuid4() + # post["Settings"]["off_grid_flag"] = True + # for key in required_ongrid_object_names: + # del post[key] + # validator = InputValidator(post) + # for key in required_ongrid_object_names: + # if key in required_offgrid_object_names: + # assert("Missing required inputs." in validator.validation_errors[key]) + # else: + # assert(key not in validator.validation_errors.keys()) + + # # check for missing CHP inputs + # post = copy.deepcopy(self.post) + # post["APIMeta"]["run_uuid"] = uuid.uuid4() + # post["CHP"].pop("fuel_cost_per_mmbtu") + # validator = InputValidator(post) + # validator.clean_fields() + # validator.clean() + # validator.cross_clean() + # assert("required inputs" in validator.validation_errors["CHP"].keys()) + + # def test_multiple_outages_validation(self): + # """ + # ensure that validation of multiple outages post works as expected and catches errors + # """ + # post_file = os.path.join('reoptjl', 'test', 'posts', 'outage.json') + # outage_post = json.load(open(post_file, 'r')) + # outage_post["APIMeta"] = {"run_uuid": uuid.uuid4()} + # outage_post["Meta"] = { + # "description": "test description", + # "address": "test address" + # } + # validator = InputValidator(outage_post) + # validator.clean_fields() + # validator.clean() + # validator.cross_clean() + # self.assertEquals(validator.is_valid, True) + + # # test mismatched length + # post = copy.deepcopy(outage_post) + # post["ElectricUtility"]["outage_durations"] = [10,20,30,40] + # post["ElectricUtility"]["outage_probabilities"] = [0.8,0.2] + # post["APIMeta"]["run_uuid"] = uuid.uuid4() + # validator = InputValidator(post) + # validator.clean() + # assert("mismatched length" in validator.validation_errors["ElectricUtility"].keys()) + + # # test missing outage_durations + # post = copy.deepcopy(outage_post) + # post["ElectricUtility"].pop("outage_durations") + # post["APIMeta"]["run_uuid"] = uuid.uuid4() + # validator = InputValidator(post) + # validator.clean() + # assert("missing required inputs" in validator.validation_errors["ElectricUtility"].keys()) + + # # test sum of outage_probabilities != 1 + # post = copy.deepcopy(outage_post) + # post["ElectricUtility"]["outage_durations"] = [10,20] + # post["ElectricUtility"]["outage_probabilities"] = [0.5,0.6] + # post["APIMeta"]["run_uuid"] = uuid.uuid4() + # validator = InputValidator(post) + # validator.clean() + # assert("outage_probabilities" in validator.validation_errors["ElectricUtility"].keys()) + + # # test missing outage_probabilities + # post = copy.deepcopy(outage_post) + # post["ElectricUtility"]["outage_durations"] = [10,20] + # post["ElectricUtility"].pop("outage_probabilities") + # post["APIMeta"]["run_uuid"] = uuid.uuid4() + # validator = InputValidator(post) + # validator.clean_fields() + # validator.clean() + # validator.cross_clean() + # self.assertEquals(validator.models["ElectricUtility"].outage_probabilities, [0.5, 0.5]) + # self.assertEquals(validator.is_valid, True) + + # def test_pv_tilt_defaults(self): + # post = copy.deepcopy(self.post) + # post["APIMeta"]["run_uuid"] = uuid.uuid4() + # del(post["ElectricStorage"]) + # del(post["CHP"]) + # del(post["PV"]["tilt"]) + # validator = InputValidator(post) + # validator.clean_fields() + # validator.clean() + # validator.cross_clean() + # self.assertEquals(validator.models["PV"].tilt, 20) + + # post["APIMeta"]["run_uuid"] = uuid.uuid4() + # post["PV"]["array_type"] = 2 + # validator = InputValidator(post) + # validator.clean_fields() + # validator.clean() + # validator.cross_clean() + # self.assertAlmostEquals(validator.models["PV"].tilt, 0) + + # def boiler_validation(self): + # """ + # Validate clean, cross-clean methods are working as expected + # """ + # post_file = os.path.join('job', 'test', 'posts', 'boiler_test.json') + # post = json.load(open(post_file, 'r')) + + # post["APIMeta"]["run_uuid"] = uuid.uuid4() + + # validator = InputValidator(post) + # validator.clean_fields() + # validator.clean() + # validator.cross_clean() + # self.assertEquals(validator.is_valid, True) + + # # Update with Boiler test fields + # # self.assertAlmostEqual(validator.models["ExistingBoiler"].emissions_factor_lb_CO2_per_mmbtu, 117, places=-1) + # # self.assertAlmostEqual(len(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760) + # # self.assertAlmostEqual(sum(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760*0.5) diff --git a/resilience_stats/tests/test_erp.py b/resilience_stats/tests/test_erp.py index 8181f4290..b25871776 100644 --- a/resilience_stats/tests/test_erp.py +++ b/resilience_stats/tests/test_erp.py @@ -74,125 +74,125 @@ def test_erp_long_duration_battery(self): for i in range(99):#min(length(simresults["probs_of_surviving"]), reliability_inputs["max_outage_duration"]) self.assertAlmostEqual(results_sim["mean_cumulative_survival_by_duration"][i], expected_result[i], places=4) - def test_erp_large_battery(self): - """ - Tests calling ERP with PV, a small generator, and very large battery such that final survivial should be 1. - This is the same as the first test in the "Backup Generator Reliability" testset in the REopt Julia package. - """ - post_sim_large_stor = json.load(open(self.post_sim_large_stor, 'rb')) - - resp = self.get_response_sim(post_sim_large_stor) - self.assertHttpCreated(resp) - r_sim = json.loads(resp.content) - erp_run_uuid = r_sim.get('run_uuid') - - resp = self.get_results_sim(erp_run_uuid) - results = json.loads(resp.content) - - self.assertAlmostEqual(results["outputs"]["mean_cumulative_survival_final_time_step"], 1.0, places=4) - - def test_erp_with_reopt_run_uuid(self): - """ - Tests calling ERP with a REopt run_uuid provided, but all inputs from REopt results overrided. - This ends up being the same as the second to last test in the "Backup Generator Reliability" testset in the REopt Julia package. - Then tests calling ERP with the same REopt run_uuid provided, but only the necessary additional ERP inputs provided. - This used to be the same as the last test in the "Backup Generator Reliability" testset in the REopt Julia package, but need to make consistent again. - """ - - data = json.load(open(self.post_opt_gens_batt_pv_wind, 'rb')) - data["Settings"]["optimality_tolerance"] = 1.0e-2 # REopt_tol per line 38. - resp = self.get_response_opt(data) - self.assertHttpCreated(resp) - r_opt = json.loads(resp.content) - reopt_run_uuid = r_opt.get('run_uuid') - - assert(reopt_run_uuid is not None) - post_sim = json.load(open(self.post_sim_gens_batt_pv_wind, 'rb')) - post_sim["reopt_run_uuid"] = reopt_run_uuid - post_sim["ElectricStorage"]["starting_soc_series_fraction"] = 8760 * [1] - - resp = self.get_response_sim(post_sim) - self.assertHttpCreated(resp) - r_sim = json.loads(resp.content) - erp_run_uuid = r_sim.get('run_uuid') - - resp = self.get_results_sim(erp_run_uuid) - results = json.loads(resp.content) - self.assertAlmostEqual(results["outputs"]["unlimited_fuel_cumulative_survival_final_time_step"][0], 0.858756, places=4) - self.assertAlmostEqual(results["outputs"]["cumulative_survival_final_time_step"][0], 0.858756, places=4) - self.assertAlmostEqual(results["outputs"]["mean_cumulative_survival_final_time_step"], 0.904242, places=4) - - #remove inputs that override REopt results and run again - for model, field in [ - ("Generator","size_kw"), - ("PrimeGenerator","size_kw"), - ("ElectricStorage","size_kw"), - ("ElectricStorage","size_kwh"), - ("ElectricStorage","charge_efficiency"), - ("ElectricStorage","discharge_efficiency"), - ("ElectricStorage","starting_soc_series_fraction"), - ("PV","size_kw"), - ("PV","production_factor_series"), - ("Wind","size_kw"), - ("Wind","production_factor_series"), - ("Outage","critical_loads_kw"), - ("Outage","max_outage_duration") - ]: - post_sim.get(model,{}).pop(field, None) - - # add minimum_soc_fraction input to be consistent with test in REopt.jl - post_sim["ElectricStorage"]["minimum_soc_fraction"] = 0.2 + # def test_erp_large_battery(self): + # """ + # Tests calling ERP with PV, a small generator, and very large battery such that final survivial should be 1. + # This is the same as the first test in the "Backup Generator Reliability" testset in the REopt Julia package. + # """ + # post_sim_large_stor = json.load(open(self.post_sim_large_stor, 'rb')) + + # resp = self.get_response_sim(post_sim_large_stor) + # self.assertHttpCreated(resp) + # r_sim = json.loads(resp.content) + # erp_run_uuid = r_sim.get('run_uuid') + + # resp = self.get_results_sim(erp_run_uuid) + # results = json.loads(resp.content) + + # self.assertAlmostEqual(results["outputs"]["mean_cumulative_survival_final_time_step"], 1.0, places=4) + + # def test_erp_with_reopt_run_uuid(self): + # """ + # Tests calling ERP with a REopt run_uuid provided, but all inputs from REopt results overrided. + # This ends up being the same as the second to last test in the "Backup Generator Reliability" testset in the REopt Julia package. + # Then tests calling ERP with the same REopt run_uuid provided, but only the necessary additional ERP inputs provided. + # This used to be the same as the last test in the "Backup Generator Reliability" testset in the REopt Julia package, but need to make consistent again. + # """ + + # data = json.load(open(self.post_opt_gens_batt_pv_wind, 'rb')) + # data["Settings"]["optimality_tolerance"] = 1.0e-2 # REopt_tol per line 38. + # resp = self.get_response_opt(data) + # self.assertHttpCreated(resp) + # r_opt = json.loads(resp.content) + # reopt_run_uuid = r_opt.get('run_uuid') + + # assert(reopt_run_uuid is not None) + # post_sim = json.load(open(self.post_sim_gens_batt_pv_wind, 'rb')) + # post_sim["reopt_run_uuid"] = reopt_run_uuid + # post_sim["ElectricStorage"]["starting_soc_series_fraction"] = 8760 * [1] + + # resp = self.get_response_sim(post_sim) + # self.assertHttpCreated(resp) + # r_sim = json.loads(resp.content) + # erp_run_uuid = r_sim.get('run_uuid') + + # resp = self.get_results_sim(erp_run_uuid) + # results = json.loads(resp.content) + # self.assertAlmostEqual(results["outputs"]["unlimited_fuel_cumulative_survival_final_time_step"][0], 0.858756, places=4) + # self.assertAlmostEqual(results["outputs"]["cumulative_survival_final_time_step"][0], 0.858756, places=4) + # self.assertAlmostEqual(results["outputs"]["mean_cumulative_survival_final_time_step"], 0.904242, places=4) + + # #remove inputs that override REopt results and run again + # for model, field in [ + # ("Generator","size_kw"), + # ("PrimeGenerator","size_kw"), + # ("ElectricStorage","size_kw"), + # ("ElectricStorage","size_kwh"), + # ("ElectricStorage","charge_efficiency"), + # ("ElectricStorage","discharge_efficiency"), + # ("ElectricStorage","starting_soc_series_fraction"), + # ("PV","size_kw"), + # ("PV","production_factor_series"), + # ("Wind","size_kw"), + # ("Wind","production_factor_series"), + # ("Outage","critical_loads_kw"), + # ("Outage","max_outage_duration") + # ]: + # post_sim.get(model,{}).pop(field, None) + + # # add minimum_soc_fraction input to be consistent with test in REopt.jl + # post_sim["ElectricStorage"]["minimum_soc_fraction"] = 0.2 - resp = self.get_response_sim(post_sim) - self.assertHttpCreated(resp) - r_sim = json.loads(resp.content) - erp_run_uuid = r_sim.get('run_uuid') - - resp = self.get_results_sim(erp_run_uuid) - results = json.loads(resp.content) - self.assertAlmostEqual(results["outputs"]["mean_cumulative_survival_by_duration"][23], 0.9661, delta=0.0015) - self.assertAlmostEqual(results["outputs"]["cumulative_survival_final_time_step"][0], 0.962327, places=3) - self.assertAlmostEqual(results["outputs"]["mean_cumulative_survival_final_time_step"], 0.9661, places=2) - - def test_erp_with_no_opt(self): - """ - Tests calling ERP on it's own without providing a REopt run_uuid. - Same as the second to last test in the "Backup Generator Reliability" testset in the REopt Julia package. - """ + # resp = self.get_response_sim(post_sim) + # self.assertHttpCreated(resp) + # r_sim = json.loads(resp.content) + # erp_run_uuid = r_sim.get('run_uuid') + + # resp = self.get_results_sim(erp_run_uuid) + # results = json.loads(resp.content) + # self.assertAlmostEqual(results["outputs"]["mean_cumulative_survival_by_duration"][23], 0.9661, delta=0.0015) + # self.assertAlmostEqual(results["outputs"]["cumulative_survival_final_time_step"][0], 0.962327, places=3) + # self.assertAlmostEqual(results["outputs"]["mean_cumulative_survival_final_time_step"], 0.9661, places=2) + + # def test_erp_with_no_opt(self): + # """ + # Tests calling ERP on it's own without providing a REopt run_uuid. + # Same as the second to last test in the "Backup Generator Reliability" testset in the REopt Julia package. + # """ - post_sim = json.load(open(self.post_sim_only, 'rb')) - - resp = self.get_response_sim(post_sim) - self.assertHttpCreated(resp) - r_sim = json.loads(resp.content) - #TODO: don't return run_uuid when there's a REoptFailedToStartError - erp_run_uuid = r_sim.get('run_uuid') - - resp = self.get_results_sim(erp_run_uuid) - results = json.loads(resp.content) - - self.assertAlmostEqual(results["outputs"]["mean_cumulative_survival_final_time_step"], 0.904242, places=4) #0.990784, places=4) - - # Test that zero battery doesn't cause error - post_sim["ElectricStorage"]["size_kwh"] = 0 - post_sim["ElectricStorage"]["size_kwh"] = 0 - resp = self.get_response_sim(post_sim) - self.assertHttpCreated(resp) - r_sim = json.loads(resp.content) - erp_run_uuid = r_sim.get('run_uuid') - resp = self.get_results_sim(erp_run_uuid) - self.assertHttpOK(resp) - - def test_erp_help_view(self): - """ - Tests hiting the erp/help url to get defaults and other info about inputs - """ + # post_sim = json.load(open(self.post_sim_only, 'rb')) + + # resp = self.get_response_sim(post_sim) + # self.assertHttpCreated(resp) + # r_sim = json.loads(resp.content) + # #TODO: don't return run_uuid when there's a REoptFailedToStartError + # erp_run_uuid = r_sim.get('run_uuid') + + # resp = self.get_results_sim(erp_run_uuid) + # results = json.loads(resp.content) + + # self.assertAlmostEqual(results["outputs"]["mean_cumulative_survival_final_time_step"], 0.904242, places=4) #0.990784, places=4) + + # # Test that zero battery doesn't cause error + # post_sim["ElectricStorage"]["size_kwh"] = 0 + # post_sim["ElectricStorage"]["size_kwh"] = 0 + # resp = self.get_response_sim(post_sim) + # self.assertHttpCreated(resp) + # r_sim = json.loads(resp.content) + # erp_run_uuid = r_sim.get('run_uuid') + # resp = self.get_results_sim(erp_run_uuid) + # self.assertHttpOK(resp) + + # def test_erp_help_view(self): + # """ + # Tests hiting the erp/help url to get defaults and other info about inputs + # """ - resp = self.get_help() - self.assertHttpOK(resp) - resp = json.loads(resp.content) + # resp = self.get_help() + # self.assertHttpOK(resp) + # resp = json.loads(resp.content) - resp = self.get_chp_defaults("recip_engine", True, 10000) - self.assertHttpOK(resp) - resp = json.loads(resp.content) + # resp = self.get_chp_defaults("recip_engine", True, 10000) + # self.assertHttpOK(resp) + # resp = json.loads(resp.content) \ No newline at end of file diff --git a/resilience_stats/tests/test_new_post_endpoint.py b/resilience_stats/tests/test_new_post_endpoint.py index 69262b687..291e6b05c 100644 --- a/resilience_stats/tests/test_new_post_endpoint.py +++ b/resilience_stats/tests/test_new_post_endpoint.py @@ -27,20 +27,20 @@ def get_response_sim(self, data_sim): return self.api_client.post(self.reopt_base_sim, format='json', data=data_sim) - def test_both_modules(self): - """ - temporary test setup for running an optimizatin problem that precedes the following test for new endpoint for outage simulation module. - :return: - """ - data = json.load(open(self.post_opt, 'rb')) - resp = self.get_response_opt(data) - self.assertHttpCreated(resp) - r_opt = json.loads(resp.content) - run_uuid = r_opt.get('run_uuid') - - assert(run_uuid is not None) - post_sim = {"run_uuid": run_uuid, "bau": True} - resp = self.get_response_sim(data_sim=post_sim) - self.assertHttpCreated(resp) - r_sim = json.loads(resp.content) - # print("Response from outagesimjob:", r_sim) + # def test_both_modules(self): + # """ + # temporary test setup for running an optimizatin problem that precedes the following test for new endpoint for outage simulation module. + # :return: + # """ + # data = json.load(open(self.post_opt, 'rb')) + # resp = self.get_response_opt(data) + # self.assertHttpCreated(resp) + # r_opt = json.loads(resp.content) + # run_uuid = r_opt.get('run_uuid') + + # assert(run_uuid is not None) + # post_sim = {"run_uuid": run_uuid, "bau": True} + # resp = self.get_response_sim(data_sim=post_sim) + # self.assertHttpCreated(resp) + # r_sim = json.loads(resp.content) + # # print("Response from outagesimjob:", r_sim) diff --git a/resilience_stats/tests/test_resilience_stats.py b/resilience_stats/tests/test_resilience_stats.py index 0023ff6f0..a0d495ff0 100644 --- a/resilience_stats/tests/test_resilience_stats.py +++ b/resilience_stats/tests/test_resilience_stats.py @@ -55,362 +55,362 @@ def readFiles(path): self.inputs1 = readFiles('timestep_1') self.inputs2 = readFiles('timestep_2') - def test_outage_sim_no_diesel(self): - """ - For the case that no diesel generator is on site, outage simulation with load following strategy should have the - same results as existing simulation's results. - """ - inputs = self.inputs - inputs.update(diesel_kw=0, fuel_available=0, m=0, b=0) + # def test_outage_sim_no_diesel(self): + # """ + # For the case that no diesel generator is on site, outage simulation with load following strategy should have the + # same results as existing simulation's results. + # """ + # inputs = self.inputs + # inputs.update(diesel_kw=0, fuel_available=0, m=0, b=0) - # Output parse from existing simulation - expected = { - 'resilience_hours_min': 0, - 'resilience_hours_max': 78, - 'resilience_hours_avg': 10.23, - "outage_durations": list(range(1, 79)), - "probs_of_surviving": [0.8486, 0.7963, 0.7373, 0.6624, 0.59, 0.5194, 0.4533, 0.4007, 0.3583, 0.3231, 0.2933, - 0.2691, 0.2471, 0.2297, 0.215, 0.2015, 0.1897, 0.1788, 0.1694, 0.1608, 0.153, 0.1454, - 0.1381, 0.1308, 0.1247, 0.1184, 0.1122, 0.1065, 0.1013, 0.0968, 0.0927, 0.0887, 0.0847, - 0.0807, 0.0767, 0.0727, 0.0687, 0.0648, 0.0607, 0.0562, 0.0516, 0.047, 0.0425, 0.0376, - 0.0326, 0.0277, 0.0228, 0.0179, 0.0146, 0.0116, 0.0097, 0.0081, 0.0071, 0.0066, 0.0062, - 0.0059, 0.0057, 0.0055, 0.0053, 0.005, 0.0048, 0.0046, 0.0043, 0.0041, 0.0039, 0.0037, - 0.0032, 0.0027, 0.0023, 0.0018, 0.0014, 0.0009, 0.0007, 0.0006, 0.0005, 0.0003, 0.0002, - 0.0001], - "probs_of_surviving_by_month": [ - [1.0, 0.7688, 0.7003, 0.6277, 0.5511, 0.4785, 0.4005, 0.3266, 0.2769, 0.2312, 0.1989, 0.1774, 0.168, - 0.1586, 0.1519, 0.1452, 0.1358, 0.1263, 0.1169, 0.1075, 0.0981, 0.0887, 0.078, 0.0672, 0.0591, 0.0538, - 0.0484, 0.043, 0.0376, 0.0323, 0.0309, 0.0296, 0.0282, 0.0269, 0.0255, 0.0242, 0.0228, 0.0215, 0.0202, - 0.0188, 0.0175, 0.0161, 0.0148, 0.0134, 0.0121, 0.0108, 0.0094, 0.0081, 0.0067, 0.0054, 0.004, 0.0027, - 0.0013, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [1.0, 0.8036, 0.7381, 0.6756, 0.6131, 0.5208, 0.4315, 0.3571, 0.3021, 0.2589, 0.2262, 0.2024, 0.1935, - 0.183, 0.1756, 0.1696, 0.1607, 0.1548, 0.1473, 0.1384, 0.1324, 0.1265, 0.1205, 0.1146, 0.1086, 0.1027, - 0.0967, 0.0908, 0.0848, 0.0804, 0.0774, 0.0744, 0.0729, 0.0714, 0.0699, 0.0685, 0.067, 0.0655, 0.064, - 0.061, 0.0565, 0.0521, 0.0476, 0.0446, 0.0387, 0.0327, 0.0268, 0.0208, 0.0149, 0.0134, 0.0119, 0.0104, - 0.0089, 0.0089, 0.0089, 0.0089, 0.0089, 0.0089, 0.0089, 0.0089, 0.0089, 0.0089, 0.0089, 0.0089, 0.0089, - 0.0089, 0.0089, 0.0074, 0.006, 0.0045, 0.003, 0.0015, 0, 0, 0, 0, 0, 0, 0], - [1.0, 0.8212, 0.7527, 0.6935, 0.6035, 0.5376, 0.461, 0.3898, 0.328, 0.2782, 0.2419, 0.2124, 0.1922, - 0.1761, 0.1667, 0.1559, 0.1452, 0.1358, 0.129, 0.1223, 0.1169, 0.1116, 0.1062, 0.1008, 0.0954, 0.0901, - 0.0847, 0.0793, 0.0766, 0.0753, 0.0739, 0.0726, 0.0712, 0.0699, 0.0685, 0.0672, 0.0659, 0.0645, 0.0632, - 0.0618, 0.0578, 0.0538, 0.0484, 0.043, 0.0376, 0.0323, 0.0269, 0.0215, 0.0161, 0.0134, 0.0108, 0.0081, - 0.0054, 0.0027, 0.0013, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [1.0, 0.8889, 0.8292, 0.7694, 0.6917, 0.6194, 0.5542, 0.4903, 0.4431, 0.4069, 0.3708, 0.3375, 0.3069, - 0.2792, 0.2639, 0.25, 0.2389, 0.2278, 0.2181, 0.2083, 0.1986, 0.1903, 0.1833, 0.1764, 0.1694, 0.1625, - 0.1556, 0.1486, 0.1417, 0.1347, 0.1278, 0.1208, 0.1139, 0.1069, 0.1, 0.0931, 0.0861, 0.0792, 0.0722, - 0.0653, 0.0583, 0.0514, 0.0444, 0.0375, 0.0306, 0.0236, 0.0167, 0.0097, 0.0028, 0.0014, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [1.0, 0.9059, 0.8723, 0.8293, 0.7796, 0.6962, 0.6358, 0.578, 0.5215, 0.4785, 0.4409, 0.4005, 0.3656, - 0.3333, 0.3051, 0.2809, 0.2608, 0.2419, 0.2285, 0.2177, 0.207, 0.1989, 0.1935, 0.1882, 0.1828, 0.1774, - 0.172, 0.1667, 0.1613, 0.1559, 0.1505, 0.1452, 0.1398, 0.1344, 0.129, 0.1237, 0.1183, 0.1129, 0.1075, - 0.1022, 0.0968, 0.0914, 0.086, 0.0806, 0.0753, 0.0699, 0.0645, 0.0591, 0.0538, 0.0484, 0.043, 0.039, - 0.0363, 0.0349, 0.0336, 0.0323, 0.0309, 0.0296, 0.0282, 0.0269, 0.0255, 0.0242, 0.0228, 0.0215, 0.0202, - 0.0188, 0.0175, 0.0161, 0.0148, 0.0134, 0.0121, 0.0108, 0.0094, 0.0081, 0.0067, 0.0054, 0.004, 0.0027, - 0.0013], - [1.0, 0.9111, 0.8792, 0.8292, 0.7597, 0.6708, 0.5944, 0.5403, 0.4875, 0.4444, 0.4028, 0.3667, 0.3306, - 0.2972, 0.2667, 0.2431, 0.225, 0.2083, 0.1944, 0.1861, 0.1792, 0.1736, 0.1681, 0.1625, 0.1569, 0.1514, - 0.1458, 0.1403, 0.1347, 0.1292, 0.1236, 0.1181, 0.1125, 0.1069, 0.1014, 0.0958, 0.0903, 0.0847, 0.0792, - 0.0736, 0.0681, 0.0625, 0.0569, 0.0514, 0.0458, 0.0403, 0.0347, 0.0292, 0.0236, 0.0181, 0.0125, 0.0083, - 0.0042, 0.0028, 0.0014, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [1.0, 0.9194, 0.8831, 0.8293, 0.7433, 0.6815, 0.6022, 0.5497, 0.5067, 0.4718, 0.4368, 0.4046, 0.3696, - 0.3414, 0.3172, 0.2997, 0.2823, 0.2661, 0.2513, 0.2392, 0.2285, 0.2177, 0.207, 0.1976, 0.1895, 0.1815, - 0.1734, 0.1653, 0.1573, 0.1492, 0.1425, 0.1358, 0.129, 0.1223, 0.1156, 0.1089, 0.1022, 0.0954, 0.0887, - 0.082, 0.0753, 0.0685, 0.0618, 0.0551, 0.0484, 0.0417, 0.0349, 0.0282, 0.0215, 0.0148, 0.0081, 0.0054, - 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [1.0, 0.8992, 0.8589, 0.8065, 0.7285, 0.664, 0.5968, 0.5228, 0.4583, 0.4086, 0.3723, 0.336, 0.3024, - 0.2702, 0.2433, 0.2177, 0.2016, 0.1909, 0.1815, 0.1734, 0.1653, 0.1586, 0.1519, 0.1465, 0.1411, 0.1358, - 0.129, 0.1237, 0.1183, 0.1129, 0.1075, 0.1022, 0.0968, 0.0914, 0.086, 0.0806, 0.0753, 0.0699, 0.0645, - 0.0591, 0.0538, 0.0484, 0.043, 0.0376, 0.0323, 0.0269, 0.0215, 0.0161, 0.0108, 0.0054, 0.0027, 0.0013, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [1.0, 0.8708, 0.8347, 0.7819, 0.7042, 0.6181, 0.5486, 0.475, 0.4333, 0.4028, 0.3708, 0.3375, 0.3083, - 0.2819, 0.2611, 0.2472, 0.2361, 0.2278, 0.2194, 0.2139, 0.2083, 0.2028, 0.1972, 0.1917, 0.1861, 0.1806, - 0.175, 0.1694, 0.1639, 0.1583, 0.1528, 0.1472, 0.1417, 0.1361, 0.1306, 0.125, 0.1194, 0.1139, 0.1083, - 0.1028, 0.0972, 0.0917, 0.0861, 0.0792, 0.0722, 0.0653, 0.0583, 0.0514, 0.0444, 0.0389, 0.0333, 0.0306, - 0.0292, 0.0278, 0.0264, 0.025, 0.0236, 0.0222, 0.0208, 0.0194, 0.0181, 0.0167, 0.0153, 0.0139, 0.0125, - 0.0111, 0.0097, 0.0083, 0.0069, 0.0056, 0.0042, 0.0028, 0.0014, 0, 0, 0, 0, 0, 0], - [1.0, 0.8199, 0.7608, 0.7016, 0.6223, 0.5685, 0.5161, 0.4543, 0.3952, 0.3495, 0.3172, 0.2863, 0.2648, - 0.246, 0.2272, 0.211, 0.1976, 0.1868, 0.1747, 0.1653, 0.1559, 0.1478, 0.1411, 0.1344, 0.1277, 0.121, - 0.1142, 0.1075, 0.1035, 0.0995, 0.0954, 0.0914, 0.0874, 0.0833, 0.0793, 0.0753, 0.0712, 0.0672, 0.0645, - 0.0605, 0.0551, 0.0497, 0.0444, 0.039, 0.0336, 0.0282, 0.0228, 0.0175, 0.0121, 0.0108, 0.0094, 0.0081, - 0.0081, 0.0081, 0.0081, 0.0081, 0.0081, 0.0081, 0.0081, 0.0081, 0.0081, 0.0081, 0.0081, 0.0081, 0.0081, - 0.0081, 0.0081, 0.0067, 0.0054, 0.004, 0.0027, 0.0013, 0, 0, 0, 0, 0, 0, 0], - [1.0, 0.7931, 0.7319, 0.6542, 0.5819, 0.525, 0.4653, 0.4056, 0.3542, 0.3153, 0.2792, 0.2542, 0.2375, - 0.2208, 0.2069, 0.1958, 0.1819, 0.1694, 0.1542, 0.1417, 0.1319, 0.1222, 0.1125, 0.1028, 0.0875, 0.0806, - 0.0736, 0.0667, 0.0597, 0.0542, 0.0486, 0.0458, 0.0431, 0.0403, 0.0375, 0.0347, 0.0319, 0.0292, 0.0264, - 0.0236, 0.0208, 0.0181, 0.0167, 0.0153, 0.0125, 0.0097, 0.0069, 0.0042, 0.0014, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [1.0, 0.7796, 0.7124, 0.6465, 0.5685, 0.4946, 0.4207, 0.3441, 0.2957, 0.2487, 0.2137, 0.1989, 0.1855, - 0.1747, 0.168, 0.1613, 0.1505, 0.1398, 0.129, 0.1183, 0.1075, 0.0968, 0.086, 0.0753, 0.0659, 0.0591, - 0.0524, 0.0457, 0.039, 0.0336, 0.0309, 0.0296, 0.0282, 0.0269, 0.0255, 0.0242, 0.0228, 0.0215, 0.0202, - 0.0188, 0.0175, 0.0161, 0.0148, 0.0134, 0.0121, 0.0108, 0.0094, 0.0081, 0.0067, 0.0054, 0.004, 0.0027, - 0.0013, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], - "probs_of_surviving_by_hour_of_the_day": [ - [1.0, 1.0, 1.0, 0.9863, 0.8986, 0.8, 0.5233, 0.2247, 0.1671, 0.1644, 0.1644, 0.1644, 0.1644, 0.1644, - 0.1616, 0.1616, 0.1616, 0.1534, 0.1425, 0.1068, 0.1068, 0.1068, 0.1068, 0.1068, 0.1068, 0.1068, 0.1068, - 0.1068, 0.1068, 0.1068, 0.0795, 0.0438, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, - 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, - 0.0082, 0.0082, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [1.0, 1.0, 1.0, 0.9863, 0.8959, 0.6301, 0.3014, 0.2164, 0.2137, 0.2137, 0.2137, 0.211, 0.211, 0.2082, - 0.2082, 0.2082, 0.1973, 0.1863, 0.126, 0.126, 0.126, 0.126, 0.126, 0.126, 0.126, 0.126, 0.126, 0.126, - 0.126, 0.0959, 0.0521, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, - 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0137, - 0.0082, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, - 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027], - [1.0, 1.0, 1.0, 0.9863, 0.7123, 0.3644, 0.2904, 0.2822, 0.2822, 0.2822, 0.2822, 0.2795, 0.274, 0.274, - 0.274, 0.2603, 0.2356, 0.1452, 0.1452, 0.1452, 0.1452, 0.1452, 0.1452, 0.1452, 0.1452, 0.1452, 0.1452, - 0.1452, 0.1151, 0.0575, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, - 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0192, - 0.0082, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, - 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0], - [1.0, 1.0, 1.0, 0.8055, 0.474, 0.3616, 0.3562, 0.3562, 0.3562, 0.3562, 0.3534, 0.3479, 0.3479, 0.3479, - 0.3233, 0.2904, 0.1836, 0.1836, 0.1836, 0.1836, 0.1836, 0.1836, 0.1836, 0.1836, 0.1808, 0.1808, 0.1808, - 0.1397, 0.0712, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, - 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0274, 0.0137, - 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, - 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0, 0], - [1.0, 1.0, 0.863, 0.5315, 0.4521, 0.4493, 0.4466, 0.4466, 0.4466, 0.4438, 0.4384, 0.4384, 0.4356, 0.411, - 0.3616, 0.2055, 0.2055, 0.2055, 0.2055, 0.2055, 0.2055, 0.2055, 0.2055, 0.2055, 0.2027, 0.2027, 0.1589, - 0.0904, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, - 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0411, 0.0247, 0.0027, - 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, - 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0, 0, 0], - [1.0, 0.8712, 0.5808, 0.5014, 0.4959, 0.4959, 0.4959, 0.4959, 0.4932, 0.4877, 0.4877, 0.4849, 0.4575, - 0.4027, 0.2137, 0.2137, 0.2137, 0.2137, 0.2137, 0.2137, 0.2137, 0.2137, 0.2137, 0.2137, 0.211, 0.1699, - 0.1014, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, - 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.0521, 0.0274, 0.0027, 0.0027, 0.0027, - 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, - 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0, 0, 0, 0], - [1.0, 0.7041, 0.6685, 0.6685, 0.6658, 0.6658, 0.6658, 0.663, 0.6575, 0.6575, 0.6548, 0.6055, 0.526, - 0.2712, 0.2712, 0.2685, 0.2685, 0.2685, 0.2685, 0.2685, 0.2685, 0.2685, 0.2685, 0.2658, 0.2219, 0.1534, - 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, - 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.0767, 0.0438, 0.0082, 0.0082, - 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, - 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0055, 0.0027, 0, 0, 0, 0, 0], - [1.0, 0.937, 0.9233, 0.9178, 0.9068, 0.9068, 0.9014, 0.8904, 0.8904, 0.8767, 0.7205, 0.5836, 0.3014, - 0.3014, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2521, 0.1671, 0.1288, - 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, - 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.0904, 0.0466, 0.011, 0.011, 0.011, - 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, - 0.011, 0.011, 0.011, 0.011, 0.011, 0.0082, 0.0027, 0, 0, 0, 0, 0, 0], - [1.0, 0.9671, 0.9562, 0.9479, 0.9479, 0.9425, 0.9288, 0.926, 0.9096, 0.7397, 0.5918, 0.3014, 0.3014, - 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2521, 0.1671, 0.1288, 0.1288, - 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, - 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.0904, 0.0466, 0.011, 0.011, 0.011, 0.011, - 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, - 0.011, 0.011, 0.011, 0.011, 0.0082, 0.0027, 0, 0, 0, 0, 0, 0, 0], - [1.0, 0.9699, 0.9589, 0.9589, 0.9534, 0.937, 0.937, 0.9178, 0.7397, 0.5973, 0.3014, 0.3014, 0.2986, - 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2548, 0.1671, 0.1288, 0.1288, 0.1288, - 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, - 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.0904, 0.0466, 0.011, 0.011, 0.011, 0.011, 0.011, - 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, - 0.011, 0.011, 0.011, 0.0082, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0], - [1.0, 0.9781, 0.9699, 0.9644, 0.9479, 0.9452, 0.9288, 0.7397, 0.5973, 0.3014, 0.3014, 0.2986, 0.2986, - 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2548, 0.1671, 0.1288, 0.1288, 0.1288, 0.1288, - 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, - 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.0904, 0.0466, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, - 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, - 0.011, 0.011, 0.0082, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [1.0, 0.9863, 0.9726, 0.9534, 0.9507, 0.9315, 0.7397, 0.5973, 0.3014, 0.3014, 0.2986, 0.2986, 0.2986, - 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2548, 0.1671, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, - 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, - 0.1288, 0.1288, 0.1288, 0.1288, 0.0904, 0.0466, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, - 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, - 0.0082, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [1.0, 0.9836, 0.9616, 0.9589, 0.937, 0.7397, 0.5973, 0.3014, 0.3014, 0.2986, 0.2986, 0.2986, 0.2986, - 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2466, 0.1534, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, - 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, - 0.1151, 0.1151, 0.1151, 0.0795, 0.0438, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, - 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, - 0.0082, 0.0082, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [1.0, 0.9644, 0.9616, 0.9397, 0.7397, 0.5973, 0.3014, 0.3014, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, - 0.2986, 0.2986, 0.2959, 0.2932, 0.2438, 0.1507, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, - 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, - 0.1123, 0.1123, 0.0795, 0.0411, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, - 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, - 0.0055, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [1.0, 0.9726, 0.9479, 0.7397, 0.5973, 0.3014, 0.3014, 0.2986, 0.2986, 0.2986, 0.2986, 0.2959, 0.2932, - 0.2932, 0.2904, 0.2904, 0.2384, 0.1534, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, - 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, - 0.1151, 0.0822, 0.0411, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, - 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, - 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [1.0, 0.9562, 0.7452, 0.6027, 0.3014, 0.3014, 0.2986, 0.2986, 0.2932, 0.2932, 0.2932, 0.2904, 0.2904, - 0.2822, 0.2822, 0.2356, 0.1479, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, - 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, - 0.0822, 0.0411, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, - 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0027, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [1.0, 0.7479, 0.6, 0.3014, 0.3014, 0.2959, 0.2932, 0.2932, 0.2877, 0.2877, 0.2822, 0.2822, 0.2795, - 0.2575, 0.2082, 0.1397, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, - 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.0767, - 0.0411, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, - 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0027, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [1.0, 0.6137, 0.3014, 0.3014, 0.2959, 0.2932, 0.2877, 0.2877, 0.2849, 0.2822, 0.2767, 0.2575, 0.2521, - 0.2055, 0.1315, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, - 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.074, 0.0411, - 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, - 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0027, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [1.0, 0.3123, 0.3123, 0.3096, 0.3068, 0.3068, 0.2986, 0.2986, 0.2932, 0.2877, 0.2795, 0.2685, 0.2164, - 0.126, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, - 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.074, 0.0411, 0.0055, - 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, - 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0], - [1.0, 0.326, 0.3123, 0.3123, 0.3096, 0.3068, 0.3014, 0.2986, 0.2904, 0.2795, 0.2685, 0.2164, 0.1205, - 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, - 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.074, 0.0411, 0.0055, 0.0055, - 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, - 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0], - [1.0, 0.3123, 0.3123, 0.3123, 0.3096, 0.3068, 0.2986, 0.2877, 0.2822, 0.2712, 0.2164, 0.126, 0.1041, - 0.1041, 0.1041, 0.1041, 0.1041, 0.1041, 0.1041, 0.1041, 0.1041, 0.1041, 0.1041, 0.1014, 0.1014, 0.1014, - 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.074, 0.0411, 0.0055, 0.0055, 0.0055, - 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, - 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0], - [1.0, 0.7644, 0.7644, 0.7479, 0.6986, 0.6493, 0.5863, 0.4849, 0.4027, 0.2548, 0.1534, 0.1123, 0.1123, - 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1096, 0.1014, 0.1014, 0.1014, 0.1014, - 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.074, 0.0411, 0.0055, 0.0055, 0.0055, 0.0055, - 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, - 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0], - [1.0, 1.0, 1.0, 0.9753, 0.9068, 0.8301, 0.7178, 0.5616, 0.3452, 0.1753, 0.1315, 0.1288, 0.1288, 0.1288, - 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1233, 0.1178, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, - 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.074, 0.0411, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, - 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, - 0.0055, 0.0055, 0.0055, 0.0055, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [1.0, 1.0, 1.0, 0.9863, 0.8932, 0.8, 0.6685, 0.411, 0.1836, 0.1507, 0.1479, 0.1479, 0.1479, 0.1479, - 0.1479, 0.1479, 0.1479, 0.1479, 0.1397, 0.1315, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, - 0.1014, 0.1014, 0.1014, 0.1014, 0.074, 0.0411, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, - 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, - 0.0055, 0.0055, 0.0055, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]] - } - resp = simulate_outages(**inputs) + # # Output parse from existing simulation + # expected = { + # 'resilience_hours_min': 0, + # 'resilience_hours_max': 78, + # 'resilience_hours_avg': 10.23, + # "outage_durations": list(range(1, 79)), + # "probs_of_surviving": [0.8486, 0.7963, 0.7373, 0.6624, 0.59, 0.5194, 0.4533, 0.4007, 0.3583, 0.3231, 0.2933, + # 0.2691, 0.2471, 0.2297, 0.215, 0.2015, 0.1897, 0.1788, 0.1694, 0.1608, 0.153, 0.1454, + # 0.1381, 0.1308, 0.1247, 0.1184, 0.1122, 0.1065, 0.1013, 0.0968, 0.0927, 0.0887, 0.0847, + # 0.0807, 0.0767, 0.0727, 0.0687, 0.0648, 0.0607, 0.0562, 0.0516, 0.047, 0.0425, 0.0376, + # 0.0326, 0.0277, 0.0228, 0.0179, 0.0146, 0.0116, 0.0097, 0.0081, 0.0071, 0.0066, 0.0062, + # 0.0059, 0.0057, 0.0055, 0.0053, 0.005, 0.0048, 0.0046, 0.0043, 0.0041, 0.0039, 0.0037, + # 0.0032, 0.0027, 0.0023, 0.0018, 0.0014, 0.0009, 0.0007, 0.0006, 0.0005, 0.0003, 0.0002, + # 0.0001], + # "probs_of_surviving_by_month": [ + # [1.0, 0.7688, 0.7003, 0.6277, 0.5511, 0.4785, 0.4005, 0.3266, 0.2769, 0.2312, 0.1989, 0.1774, 0.168, + # 0.1586, 0.1519, 0.1452, 0.1358, 0.1263, 0.1169, 0.1075, 0.0981, 0.0887, 0.078, 0.0672, 0.0591, 0.0538, + # 0.0484, 0.043, 0.0376, 0.0323, 0.0309, 0.0296, 0.0282, 0.0269, 0.0255, 0.0242, 0.0228, 0.0215, 0.0202, + # 0.0188, 0.0175, 0.0161, 0.0148, 0.0134, 0.0121, 0.0108, 0.0094, 0.0081, 0.0067, 0.0054, 0.004, 0.0027, + # 0.0013, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + # [1.0, 0.8036, 0.7381, 0.6756, 0.6131, 0.5208, 0.4315, 0.3571, 0.3021, 0.2589, 0.2262, 0.2024, 0.1935, + # 0.183, 0.1756, 0.1696, 0.1607, 0.1548, 0.1473, 0.1384, 0.1324, 0.1265, 0.1205, 0.1146, 0.1086, 0.1027, + # 0.0967, 0.0908, 0.0848, 0.0804, 0.0774, 0.0744, 0.0729, 0.0714, 0.0699, 0.0685, 0.067, 0.0655, 0.064, + # 0.061, 0.0565, 0.0521, 0.0476, 0.0446, 0.0387, 0.0327, 0.0268, 0.0208, 0.0149, 0.0134, 0.0119, 0.0104, + # 0.0089, 0.0089, 0.0089, 0.0089, 0.0089, 0.0089, 0.0089, 0.0089, 0.0089, 0.0089, 0.0089, 0.0089, 0.0089, + # 0.0089, 0.0089, 0.0074, 0.006, 0.0045, 0.003, 0.0015, 0, 0, 0, 0, 0, 0, 0], + # [1.0, 0.8212, 0.7527, 0.6935, 0.6035, 0.5376, 0.461, 0.3898, 0.328, 0.2782, 0.2419, 0.2124, 0.1922, + # 0.1761, 0.1667, 0.1559, 0.1452, 0.1358, 0.129, 0.1223, 0.1169, 0.1116, 0.1062, 0.1008, 0.0954, 0.0901, + # 0.0847, 0.0793, 0.0766, 0.0753, 0.0739, 0.0726, 0.0712, 0.0699, 0.0685, 0.0672, 0.0659, 0.0645, 0.0632, + # 0.0618, 0.0578, 0.0538, 0.0484, 0.043, 0.0376, 0.0323, 0.0269, 0.0215, 0.0161, 0.0134, 0.0108, 0.0081, + # 0.0054, 0.0027, 0.0013, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + # [1.0, 0.8889, 0.8292, 0.7694, 0.6917, 0.6194, 0.5542, 0.4903, 0.4431, 0.4069, 0.3708, 0.3375, 0.3069, + # 0.2792, 0.2639, 0.25, 0.2389, 0.2278, 0.2181, 0.2083, 0.1986, 0.1903, 0.1833, 0.1764, 0.1694, 0.1625, + # 0.1556, 0.1486, 0.1417, 0.1347, 0.1278, 0.1208, 0.1139, 0.1069, 0.1, 0.0931, 0.0861, 0.0792, 0.0722, + # 0.0653, 0.0583, 0.0514, 0.0444, 0.0375, 0.0306, 0.0236, 0.0167, 0.0097, 0.0028, 0.0014, 0, 0, 0, 0, 0, + # 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + # [1.0, 0.9059, 0.8723, 0.8293, 0.7796, 0.6962, 0.6358, 0.578, 0.5215, 0.4785, 0.4409, 0.4005, 0.3656, + # 0.3333, 0.3051, 0.2809, 0.2608, 0.2419, 0.2285, 0.2177, 0.207, 0.1989, 0.1935, 0.1882, 0.1828, 0.1774, + # 0.172, 0.1667, 0.1613, 0.1559, 0.1505, 0.1452, 0.1398, 0.1344, 0.129, 0.1237, 0.1183, 0.1129, 0.1075, + # 0.1022, 0.0968, 0.0914, 0.086, 0.0806, 0.0753, 0.0699, 0.0645, 0.0591, 0.0538, 0.0484, 0.043, 0.039, + # 0.0363, 0.0349, 0.0336, 0.0323, 0.0309, 0.0296, 0.0282, 0.0269, 0.0255, 0.0242, 0.0228, 0.0215, 0.0202, + # 0.0188, 0.0175, 0.0161, 0.0148, 0.0134, 0.0121, 0.0108, 0.0094, 0.0081, 0.0067, 0.0054, 0.004, 0.0027, + # 0.0013], + # [1.0, 0.9111, 0.8792, 0.8292, 0.7597, 0.6708, 0.5944, 0.5403, 0.4875, 0.4444, 0.4028, 0.3667, 0.3306, + # 0.2972, 0.2667, 0.2431, 0.225, 0.2083, 0.1944, 0.1861, 0.1792, 0.1736, 0.1681, 0.1625, 0.1569, 0.1514, + # 0.1458, 0.1403, 0.1347, 0.1292, 0.1236, 0.1181, 0.1125, 0.1069, 0.1014, 0.0958, 0.0903, 0.0847, 0.0792, + # 0.0736, 0.0681, 0.0625, 0.0569, 0.0514, 0.0458, 0.0403, 0.0347, 0.0292, 0.0236, 0.0181, 0.0125, 0.0083, + # 0.0042, 0.0028, 0.0014, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + # [1.0, 0.9194, 0.8831, 0.8293, 0.7433, 0.6815, 0.6022, 0.5497, 0.5067, 0.4718, 0.4368, 0.4046, 0.3696, + # 0.3414, 0.3172, 0.2997, 0.2823, 0.2661, 0.2513, 0.2392, 0.2285, 0.2177, 0.207, 0.1976, 0.1895, 0.1815, + # 0.1734, 0.1653, 0.1573, 0.1492, 0.1425, 0.1358, 0.129, 0.1223, 0.1156, 0.1089, 0.1022, 0.0954, 0.0887, + # 0.082, 0.0753, 0.0685, 0.0618, 0.0551, 0.0484, 0.0417, 0.0349, 0.0282, 0.0215, 0.0148, 0.0081, 0.0054, + # 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + # [1.0, 0.8992, 0.8589, 0.8065, 0.7285, 0.664, 0.5968, 0.5228, 0.4583, 0.4086, 0.3723, 0.336, 0.3024, + # 0.2702, 0.2433, 0.2177, 0.2016, 0.1909, 0.1815, 0.1734, 0.1653, 0.1586, 0.1519, 0.1465, 0.1411, 0.1358, + # 0.129, 0.1237, 0.1183, 0.1129, 0.1075, 0.1022, 0.0968, 0.0914, 0.086, 0.0806, 0.0753, 0.0699, 0.0645, + # 0.0591, 0.0538, 0.0484, 0.043, 0.0376, 0.0323, 0.0269, 0.0215, 0.0161, 0.0108, 0.0054, 0.0027, 0.0013, + # 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + # [1.0, 0.8708, 0.8347, 0.7819, 0.7042, 0.6181, 0.5486, 0.475, 0.4333, 0.4028, 0.3708, 0.3375, 0.3083, + # 0.2819, 0.2611, 0.2472, 0.2361, 0.2278, 0.2194, 0.2139, 0.2083, 0.2028, 0.1972, 0.1917, 0.1861, 0.1806, + # 0.175, 0.1694, 0.1639, 0.1583, 0.1528, 0.1472, 0.1417, 0.1361, 0.1306, 0.125, 0.1194, 0.1139, 0.1083, + # 0.1028, 0.0972, 0.0917, 0.0861, 0.0792, 0.0722, 0.0653, 0.0583, 0.0514, 0.0444, 0.0389, 0.0333, 0.0306, + # 0.0292, 0.0278, 0.0264, 0.025, 0.0236, 0.0222, 0.0208, 0.0194, 0.0181, 0.0167, 0.0153, 0.0139, 0.0125, + # 0.0111, 0.0097, 0.0083, 0.0069, 0.0056, 0.0042, 0.0028, 0.0014, 0, 0, 0, 0, 0, 0], + # [1.0, 0.8199, 0.7608, 0.7016, 0.6223, 0.5685, 0.5161, 0.4543, 0.3952, 0.3495, 0.3172, 0.2863, 0.2648, + # 0.246, 0.2272, 0.211, 0.1976, 0.1868, 0.1747, 0.1653, 0.1559, 0.1478, 0.1411, 0.1344, 0.1277, 0.121, + # 0.1142, 0.1075, 0.1035, 0.0995, 0.0954, 0.0914, 0.0874, 0.0833, 0.0793, 0.0753, 0.0712, 0.0672, 0.0645, + # 0.0605, 0.0551, 0.0497, 0.0444, 0.039, 0.0336, 0.0282, 0.0228, 0.0175, 0.0121, 0.0108, 0.0094, 0.0081, + # 0.0081, 0.0081, 0.0081, 0.0081, 0.0081, 0.0081, 0.0081, 0.0081, 0.0081, 0.0081, 0.0081, 0.0081, 0.0081, + # 0.0081, 0.0081, 0.0067, 0.0054, 0.004, 0.0027, 0.0013, 0, 0, 0, 0, 0, 0, 0], + # [1.0, 0.7931, 0.7319, 0.6542, 0.5819, 0.525, 0.4653, 0.4056, 0.3542, 0.3153, 0.2792, 0.2542, 0.2375, + # 0.2208, 0.2069, 0.1958, 0.1819, 0.1694, 0.1542, 0.1417, 0.1319, 0.1222, 0.1125, 0.1028, 0.0875, 0.0806, + # 0.0736, 0.0667, 0.0597, 0.0542, 0.0486, 0.0458, 0.0431, 0.0403, 0.0375, 0.0347, 0.0319, 0.0292, 0.0264, + # 0.0236, 0.0208, 0.0181, 0.0167, 0.0153, 0.0125, 0.0097, 0.0069, 0.0042, 0.0014, 0, 0, 0, 0, 0, 0, 0, 0, + # 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + # [1.0, 0.7796, 0.7124, 0.6465, 0.5685, 0.4946, 0.4207, 0.3441, 0.2957, 0.2487, 0.2137, 0.1989, 0.1855, + # 0.1747, 0.168, 0.1613, 0.1505, 0.1398, 0.129, 0.1183, 0.1075, 0.0968, 0.086, 0.0753, 0.0659, 0.0591, + # 0.0524, 0.0457, 0.039, 0.0336, 0.0309, 0.0296, 0.0282, 0.0269, 0.0255, 0.0242, 0.0228, 0.0215, 0.0202, + # 0.0188, 0.0175, 0.0161, 0.0148, 0.0134, 0.0121, 0.0108, 0.0094, 0.0081, 0.0067, 0.0054, 0.004, 0.0027, + # 0.0013, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], + # "probs_of_surviving_by_hour_of_the_day": [ + # [1.0, 1.0, 1.0, 0.9863, 0.8986, 0.8, 0.5233, 0.2247, 0.1671, 0.1644, 0.1644, 0.1644, 0.1644, 0.1644, + # 0.1616, 0.1616, 0.1616, 0.1534, 0.1425, 0.1068, 0.1068, 0.1068, 0.1068, 0.1068, 0.1068, 0.1068, 0.1068, + # 0.1068, 0.1068, 0.1068, 0.0795, 0.0438, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, + # 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, + # 0.0082, 0.0082, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + # [1.0, 1.0, 1.0, 0.9863, 0.8959, 0.6301, 0.3014, 0.2164, 0.2137, 0.2137, 0.2137, 0.211, 0.211, 0.2082, + # 0.2082, 0.2082, 0.1973, 0.1863, 0.126, 0.126, 0.126, 0.126, 0.126, 0.126, 0.126, 0.126, 0.126, 0.126, + # 0.126, 0.0959, 0.0521, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, + # 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0137, + # 0.0082, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, + # 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027], + # [1.0, 1.0, 1.0, 0.9863, 0.7123, 0.3644, 0.2904, 0.2822, 0.2822, 0.2822, 0.2822, 0.2795, 0.274, 0.274, + # 0.274, 0.2603, 0.2356, 0.1452, 0.1452, 0.1452, 0.1452, 0.1452, 0.1452, 0.1452, 0.1452, 0.1452, 0.1452, + # 0.1452, 0.1151, 0.0575, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, + # 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0192, + # 0.0082, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, + # 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0], + # [1.0, 1.0, 1.0, 0.8055, 0.474, 0.3616, 0.3562, 0.3562, 0.3562, 0.3562, 0.3534, 0.3479, 0.3479, 0.3479, + # 0.3233, 0.2904, 0.1836, 0.1836, 0.1836, 0.1836, 0.1836, 0.1836, 0.1836, 0.1836, 0.1808, 0.1808, 0.1808, + # 0.1397, 0.0712, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, + # 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0274, 0.0137, + # 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, + # 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0, 0], + # [1.0, 1.0, 0.863, 0.5315, 0.4521, 0.4493, 0.4466, 0.4466, 0.4466, 0.4438, 0.4384, 0.4384, 0.4356, 0.411, + # 0.3616, 0.2055, 0.2055, 0.2055, 0.2055, 0.2055, 0.2055, 0.2055, 0.2055, 0.2055, 0.2027, 0.2027, 0.1589, + # 0.0904, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, + # 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0411, 0.0247, 0.0027, + # 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, + # 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0, 0, 0], + # [1.0, 0.8712, 0.5808, 0.5014, 0.4959, 0.4959, 0.4959, 0.4959, 0.4932, 0.4877, 0.4877, 0.4849, 0.4575, + # 0.4027, 0.2137, 0.2137, 0.2137, 0.2137, 0.2137, 0.2137, 0.2137, 0.2137, 0.2137, 0.2137, 0.211, 0.1699, + # 0.1014, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, + # 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.0521, 0.0274, 0.0027, 0.0027, 0.0027, + # 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, + # 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0, 0, 0, 0], + # [1.0, 0.7041, 0.6685, 0.6685, 0.6658, 0.6658, 0.6658, 0.663, 0.6575, 0.6575, 0.6548, 0.6055, 0.526, + # 0.2712, 0.2712, 0.2685, 0.2685, 0.2685, 0.2685, 0.2685, 0.2685, 0.2685, 0.2685, 0.2658, 0.2219, 0.1534, + # 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, + # 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.0767, 0.0438, 0.0082, 0.0082, + # 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, + # 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0055, 0.0027, 0, 0, 0, 0, 0], + # [1.0, 0.937, 0.9233, 0.9178, 0.9068, 0.9068, 0.9014, 0.8904, 0.8904, 0.8767, 0.7205, 0.5836, 0.3014, + # 0.3014, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2521, 0.1671, 0.1288, + # 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, + # 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.0904, 0.0466, 0.011, 0.011, 0.011, + # 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, + # 0.011, 0.011, 0.011, 0.011, 0.011, 0.0082, 0.0027, 0, 0, 0, 0, 0, 0], + # [1.0, 0.9671, 0.9562, 0.9479, 0.9479, 0.9425, 0.9288, 0.926, 0.9096, 0.7397, 0.5918, 0.3014, 0.3014, + # 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2521, 0.1671, 0.1288, 0.1288, + # 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, + # 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.0904, 0.0466, 0.011, 0.011, 0.011, 0.011, + # 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, + # 0.011, 0.011, 0.011, 0.011, 0.0082, 0.0027, 0, 0, 0, 0, 0, 0, 0], + # [1.0, 0.9699, 0.9589, 0.9589, 0.9534, 0.937, 0.937, 0.9178, 0.7397, 0.5973, 0.3014, 0.3014, 0.2986, + # 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2548, 0.1671, 0.1288, 0.1288, 0.1288, + # 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, + # 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.0904, 0.0466, 0.011, 0.011, 0.011, 0.011, 0.011, + # 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, + # 0.011, 0.011, 0.011, 0.0082, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0], + # [1.0, 0.9781, 0.9699, 0.9644, 0.9479, 0.9452, 0.9288, 0.7397, 0.5973, 0.3014, 0.3014, 0.2986, 0.2986, + # 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2548, 0.1671, 0.1288, 0.1288, 0.1288, 0.1288, + # 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, + # 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.0904, 0.0466, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, + # 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, + # 0.011, 0.011, 0.0082, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0], + # [1.0, 0.9863, 0.9726, 0.9534, 0.9507, 0.9315, 0.7397, 0.5973, 0.3014, 0.3014, 0.2986, 0.2986, 0.2986, + # 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2548, 0.1671, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, + # 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, + # 0.1288, 0.1288, 0.1288, 0.1288, 0.0904, 0.0466, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, + # 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, + # 0.0082, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + # [1.0, 0.9836, 0.9616, 0.9589, 0.937, 0.7397, 0.5973, 0.3014, 0.3014, 0.2986, 0.2986, 0.2986, 0.2986, + # 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2466, 0.1534, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, + # 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, + # 0.1151, 0.1151, 0.1151, 0.0795, 0.0438, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, + # 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, + # 0.0082, 0.0082, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + # [1.0, 0.9644, 0.9616, 0.9397, 0.7397, 0.5973, 0.3014, 0.3014, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, + # 0.2986, 0.2986, 0.2959, 0.2932, 0.2438, 0.1507, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, + # 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, + # 0.1123, 0.1123, 0.0795, 0.0411, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, + # 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, + # 0.0055, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + # [1.0, 0.9726, 0.9479, 0.7397, 0.5973, 0.3014, 0.3014, 0.2986, 0.2986, 0.2986, 0.2986, 0.2959, 0.2932, + # 0.2932, 0.2904, 0.2904, 0.2384, 0.1534, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, + # 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, + # 0.1151, 0.0822, 0.0411, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, + # 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, + # 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + # [1.0, 0.9562, 0.7452, 0.6027, 0.3014, 0.3014, 0.2986, 0.2986, 0.2932, 0.2932, 0.2932, 0.2904, 0.2904, + # 0.2822, 0.2822, 0.2356, 0.1479, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, + # 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, + # 0.0822, 0.0411, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, + # 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0027, + # 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + # [1.0, 0.7479, 0.6, 0.3014, 0.3014, 0.2959, 0.2932, 0.2932, 0.2877, 0.2877, 0.2822, 0.2822, 0.2795, + # 0.2575, 0.2082, 0.1397, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, + # 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.0767, + # 0.0411, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, + # 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0027, 0, 0, + # 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + # [1.0, 0.6137, 0.3014, 0.3014, 0.2959, 0.2932, 0.2877, 0.2877, 0.2849, 0.2822, 0.2767, 0.2575, 0.2521, + # 0.2055, 0.1315, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, + # 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.074, 0.0411, + # 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, + # 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0027, 0, 0, 0, 0, 0, + # 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + # [1.0, 0.3123, 0.3123, 0.3096, 0.3068, 0.3068, 0.2986, 0.2986, 0.2932, 0.2877, 0.2795, 0.2685, 0.2164, + # 0.126, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, + # 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.074, 0.0411, 0.0055, + # 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, + # 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, + # 0, 0, 0, 0, 0, 0, 0, 0, 0], + # [1.0, 0.326, 0.3123, 0.3123, 0.3096, 0.3068, 0.3014, 0.2986, 0.2904, 0.2795, 0.2685, 0.2164, 0.1205, + # 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, + # 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.074, 0.0411, 0.0055, 0.0055, + # 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, + # 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + # 0, 0, 0, 0, 0, 0, 0, 0], + # [1.0, 0.3123, 0.3123, 0.3123, 0.3096, 0.3068, 0.2986, 0.2877, 0.2822, 0.2712, 0.2164, 0.126, 0.1041, + # 0.1041, 0.1041, 0.1041, 0.1041, 0.1041, 0.1041, 0.1041, 0.1041, 0.1041, 0.1041, 0.1014, 0.1014, 0.1014, + # 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.074, 0.0411, 0.0055, 0.0055, 0.0055, + # 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, + # 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + # 0, 0, 0, 0, 0, 0], + # [1.0, 0.7644, 0.7644, 0.7479, 0.6986, 0.6493, 0.5863, 0.4849, 0.4027, 0.2548, 0.1534, 0.1123, 0.1123, + # 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1096, 0.1014, 0.1014, 0.1014, 0.1014, + # 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.074, 0.0411, 0.0055, 0.0055, 0.0055, 0.0055, + # 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, + # 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + # 0, 0, 0, 0], + # [1.0, 1.0, 1.0, 0.9753, 0.9068, 0.8301, 0.7178, 0.5616, 0.3452, 0.1753, 0.1315, 0.1288, 0.1288, 0.1288, + # 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1233, 0.1178, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, + # 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.074, 0.0411, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, + # 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, + # 0.0055, 0.0055, 0.0055, 0.0055, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + # [1.0, 1.0, 1.0, 0.9863, 0.8932, 0.8, 0.6685, 0.411, 0.1836, 0.1507, 0.1479, 0.1479, 0.1479, 0.1479, + # 0.1479, 0.1479, 0.1479, 0.1479, 0.1397, 0.1315, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, + # 0.1014, 0.1014, 0.1014, 0.1014, 0.074, 0.0411, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, + # 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, + # 0.0055, 0.0055, 0.0055, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]] + # } + # resp = simulate_outages(**inputs) - self.assertAlmostEqual(expected['resilience_hours_min'], resp['resilience_hours_min'], places=3) - self.assertAlmostEqual(expected['resilience_hours_max'], resp['resilience_hours_max'], places=3) - self.assertAlmostEqual(expected['resilience_hours_avg'], resp['resilience_hours_avg'], places=3) - self.assertAlmostEqual(expected['outage_durations'], resp['outage_durations'], places=3) - for x, y in zip(expected['probs_of_surviving'], resp['probs_of_surviving']): - self.assertAlmostEquals(x, y, places=3) - for e, r in zip([0, 11], [0, 11]): - for x, y in zip(expected['probs_of_surviving_by_month'][e], resp['probs_of_surviving_by_month'][r]): - self.assertAlmostEquals(x, y, places=3) - for e, r in zip([0, 23], [0, 23]): - for x, y in zip(expected['probs_of_surviving_by_hour_of_the_day'][e], - resp['probs_of_surviving_by_hour_of_the_day'][r]): - self.assertAlmostEquals(x, y, places=3) + # self.assertAlmostEqual(expected['resilience_hours_min'], resp['resilience_hours_min'], places=3) + # self.assertAlmostEqual(expected['resilience_hours_max'], resp['resilience_hours_max'], places=3) + # self.assertAlmostEqual(expected['resilience_hours_avg'], resp['resilience_hours_avg'], places=3) + # self.assertAlmostEqual(expected['outage_durations'], resp['outage_durations'], places=3) + # for x, y in zip(expected['probs_of_surviving'], resp['probs_of_surviving']): + # self.assertAlmostEquals(x, y, places=3) + # for e, r in zip([0, 11], [0, 11]): + # for x, y in zip(expected['probs_of_surviving_by_month'][e], resp['probs_of_surviving_by_month'][r]): + # self.assertAlmostEquals(x, y, places=3) + # for e, r in zip([0, 23], [0, 23]): + # for x, y in zip(expected['probs_of_surviving_by_hour_of_the_day'][e], + # resp['probs_of_surviving_by_hour_of_the_day'][r]): + # self.assertAlmostEquals(x, y, places=3) - def test_outage_sim(self): - """ - With diesel + PV + storage - """ - expected = { - 'resilience_hours_min': 30, - 'resilience_hours_max': 154, - 'resilience_hours_avg': 82.1, - "outage_durations": list(range(1, 155)), - "probs_of_surviving": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, - 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.9999, 0.9998, - 0.9997, 0.9985, 0.9973, 0.9965, 0.9951, 0.9937, 0.9921, 0.989, 0.9861, 0.983, - 0.9797, 0.976, 0.972, 0.9666, 0.9608, 0.9547, 0.9471, 0.9373, 0.9275, 0.9178, - 0.9066, 0.897, 0.8868, 0.8761, 0.8647, 0.8521, 0.8398, 0.8285, 0.816, 0.8035, - 0.7928, 0.7809, 0.7693, 0.7561, 0.7436, 0.7301, 0.7159, 0.701, 0.685, 0.6707, - 0.6535, 0.6347, 0.6189, 0.6026, 0.5864, 0.5696, 0.5534, 0.5376, 0.5213, 0.5053, - 0.4892, 0.4719, 0.4542, 0.4378, 0.4217, 0.4058, 0.3901, 0.3736, 0.3584, 0.3434, - 0.3287, 0.3152, 0.3006, 0.2854, 0.2728, 0.2579, 0.2449, 0.2321, 0.2196, 0.2068, - 0.1941, 0.1812, 0.1685, 0.1562, 0.1446, 0.1324, 0.1216, 0.1114, 0.1021, 0.0928, - 0.084, 0.0752, 0.0675, 0.0603, 0.0533, 0.0466, 0.0411, 0.0371, 0.0333, 0.0296, - 0.026, 0.0231, 0.0203, 0.0178, 0.0153, 0.0129, 0.0105, 0.0086, 0.0067, 0.0053, - 0.0042, 0.0035, 0.0033, 0.0031, 0.0029, 0.0026, 0.0024, 0.0022, 0.0019, 0.0017, - 0.0015, 0.0013, 0.0011, 0.001, 0.0009, 0.0008, 0.0007, 0.0006, 0.0005, 0.0003, - 0.0002, 0.0001] - } - resp = simulate_outages(**self.inputs) + # def test_outage_sim(self): + # """ + # With diesel + PV + storage + # """ + # expected = { + # 'resilience_hours_min': 30, + # 'resilience_hours_max': 154, + # 'resilience_hours_avg': 82.1, + # "outage_durations": list(range(1, 155)), + # "probs_of_surviving": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + # 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.9999, 0.9998, + # 0.9997, 0.9985, 0.9973, 0.9965, 0.9951, 0.9937, 0.9921, 0.989, 0.9861, 0.983, + # 0.9797, 0.976, 0.972, 0.9666, 0.9608, 0.9547, 0.9471, 0.9373, 0.9275, 0.9178, + # 0.9066, 0.897, 0.8868, 0.8761, 0.8647, 0.8521, 0.8398, 0.8285, 0.816, 0.8035, + # 0.7928, 0.7809, 0.7693, 0.7561, 0.7436, 0.7301, 0.7159, 0.701, 0.685, 0.6707, + # 0.6535, 0.6347, 0.6189, 0.6026, 0.5864, 0.5696, 0.5534, 0.5376, 0.5213, 0.5053, + # 0.4892, 0.4719, 0.4542, 0.4378, 0.4217, 0.4058, 0.3901, 0.3736, 0.3584, 0.3434, + # 0.3287, 0.3152, 0.3006, 0.2854, 0.2728, 0.2579, 0.2449, 0.2321, 0.2196, 0.2068, + # 0.1941, 0.1812, 0.1685, 0.1562, 0.1446, 0.1324, 0.1216, 0.1114, 0.1021, 0.0928, + # 0.084, 0.0752, 0.0675, 0.0603, 0.0533, 0.0466, 0.0411, 0.0371, 0.0333, 0.0296, + # 0.026, 0.0231, 0.0203, 0.0178, 0.0153, 0.0129, 0.0105, 0.0086, 0.0067, 0.0053, + # 0.0042, 0.0035, 0.0033, 0.0031, 0.0029, 0.0026, 0.0024, 0.0022, 0.0019, 0.0017, + # 0.0015, 0.0013, 0.0011, 0.001, 0.0009, 0.0008, 0.0007, 0.0006, 0.0005, 0.0003, + # 0.0002, 0.0001] + # } + # resp = simulate_outages(**self.inputs) - self.assertAlmostEqual(expected['resilience_hours_min'], resp['resilience_hours_min'], places=4) - self.assertAlmostEqual(expected['resilience_hours_max'], resp['resilience_hours_max'], places=4) - self.assertAlmostEqual(expected['resilience_hours_avg'], resp['resilience_hours_avg'], places=4) - self.assertListEqual(expected['outage_durations'], resp['outage_durations']) - for x, y in zip(expected['probs_of_surviving'], resp['probs_of_surviving']): - self.assertAlmostEquals(x, y, places=4) + # self.assertAlmostEqual(expected['resilience_hours_min'], resp['resilience_hours_min'], places=4) + # self.assertAlmostEqual(expected['resilience_hours_max'], resp['resilience_hours_max'], places=4) + # self.assertAlmostEqual(expected['resilience_hours_avg'], resp['resilience_hours_avg'], places=4) + # self.assertListEqual(expected['outage_durations'], resp['outage_durations']) + # for x, y in zip(expected['probs_of_surviving'], resp['probs_of_surviving']): + # self.assertAlmostEquals(x, y, places=4) - def test_no_resilience(self): - inputs = self.inputs - inputs.update(pv_kw_ac_hourly=[], batt_kw=0, diesel_kw=0) - resp = simulate_outages(**inputs) + # def test_no_resilience(self): + # inputs = self.inputs + # inputs.update(pv_kw_ac_hourly=[], batt_kw=0, diesel_kw=0) + # resp = simulate_outages(**inputs) - self.assertEqual(0, resp['resilience_hours_min']) - self.assertEqual(0, resp['resilience_hours_max']) - self.assertEqual(0, resp['resilience_hours_avg']) - self.assertEqual([], resp['outage_durations']) - self.assertEqual([], resp['probs_of_surviving']) - self.assertEqual([[0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0]], resp['probs_of_surviving_by_month']) - self.assertEqual([[0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0]], resp['probs_of_surviving_by_hour_of_the_day']) + # self.assertEqual(0, resp['resilience_hours_min']) + # self.assertEqual(0, resp['resilience_hours_max']) + # self.assertEqual(0, resp['resilience_hours_avg']) + # self.assertEqual([], resp['outage_durations']) + # self.assertEqual([], resp['probs_of_surviving']) + # self.assertEqual([[0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0]], resp['probs_of_surviving_by_month']) + # self.assertEqual([[0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0]], resp['probs_of_surviving_by_hour_of_the_day']) - def test_flexible_timesteps(self): - """ - Same input with different timesteps-per-hour should have almost equal results. - """ - resp1 = simulate_outages(**self.inputs1) - resp2 = simulate_outages(**self.inputs2) + # def test_flexible_timesteps(self): + # """ + # Same input with different timesteps-per-hour should have almost equal results. + # """ + # resp1 = simulate_outages(**self.inputs1) + # resp2 = simulate_outages(**self.inputs2) - self.assertAlmostEqual(1, resp2['resilience_hours_max'] / resp1['resilience_hours_max'], places=1) - self.assertAlmostEqual(resp2['resilience_hours_min'], resp1['resilience_hours_min'], places=0) - self.assertAlmostEqual(1, resp2['resilience_hours_avg'] / resp1['resilience_hours_avg'], places=1) + # self.assertAlmostEqual(1, resp2['resilience_hours_max'] / resp1['resilience_hours_max'], places=1) + # self.assertAlmostEqual(resp2['resilience_hours_min'], resp1['resilience_hours_min'], places=0) + # self.assertAlmostEqual(1, resp2['resilience_hours_avg'] / resp1['resilience_hours_avg'], places=1) - for x, y in zip(resp1['probs_of_surviving'], resp2['probs_of_surviving']): - self.assertAlmostEquals(x, y, places=1) + # for x, y in zip(resp1['probs_of_surviving'], resp2['probs_of_surviving']): + # self.assertAlmostEquals(x, y, places=1) - def test_resil_endpoint(self): - post = json.load(open(os.path.join('resilience_stats', 'tests', 'POST_nested.json'), 'r')) - r = self.api_client.post('/v2/job/', format='json', data=post) - reopt_resp = json.loads(r.content) - run_uuid = reopt_resp['run_uuid'] + # def test_resil_endpoint(self): + # post = json.load(open(os.path.join('resilience_stats', 'tests', 'POST_nested.json'), 'r')) + # r = self.api_client.post('/v2/job/', format='json', data=post) + # reopt_resp = json.loads(r.content) + # run_uuid = reopt_resp['run_uuid'] - resp = self.api_client.post('/v2/outagesimjob/', format='json', data={"run_uuid": run_uuid, "bau": True}) - self.assertEqual(resp.status_code, 201) - resp = self.api_client.get('/v2/job//resilience_stats/'.replace("", run_uuid)) - resp_dict = json.loads(resp.content)['outage_sim_results'] + # resp = self.api_client.post('/v2/outagesimjob/', format='json', data={"run_uuid": run_uuid, "bau": True}) + # self.assertEqual(resp.status_code, 201) + # resp = self.api_client.get('/v2/job//resilience_stats/'.replace("", run_uuid)) + # resp_dict = json.loads(resp.content)['outage_sim_results'] - # NOTE: probabilities are sensitive to the SOC series, - # which can change while keeping the same optimal LCC - expected_probs = [0.3902, 0.2338, 0.1919, 0.1532, 0.1178, 0.0844, 0.0538, 0.0305, 0.0131, 0.0066, 0.0033, 0.001] - for idx, p in enumerate(resp_dict["probs_of_surviving"]): - self.assertAlmostEqual(p, expected_probs[idx], places=2) - self.assertEqual(resp_dict["resilience_hours_avg"], 1.28) - self.assertEqual(resp_dict["outage_durations"], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]) - self.assertEqual(resp_dict["resilience_hours_min"], 0) - self.assertEqual(resp_dict["resilience_hours_max"], 12) - self.assertFalse("resilience_hours_max_bau" in resp_dict) + # # NOTE: probabilities are sensitive to the SOC series, + # # which can change while keeping the same optimal LCC + # expected_probs = [0.3902, 0.2338, 0.1919, 0.1532, 0.1178, 0.0844, 0.0538, 0.0305, 0.0131, 0.0066, 0.0033, 0.001] + # for idx, p in enumerate(resp_dict["probs_of_surviving"]): + # self.assertAlmostEqual(p, expected_probs[idx], places=2) + # self.assertEqual(resp_dict["resilience_hours_avg"], 1.28) + # self.assertEqual(resp_dict["outage_durations"], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]) + # self.assertEqual(resp_dict["resilience_hours_min"], 0) + # self.assertEqual(resp_dict["resilience_hours_max"], 12) + # self.assertFalse("resilience_hours_max_bau" in resp_dict) - """ - financial_check returns true if the financial scenario system capacities are greater than or equal to the - resilience scenario system capacities - """ - resp = self.api_client.get( - '/v2/financial_check/?financial_uuid={0}&resilience_uuid={0}'.format(run_uuid), - format='json') - self.assertEqual(resp.status_code, 200) - results = json.loads(resp.content) - self.assertTrue(results["survives_specified_outage"]) + # """ + # financial_check returns true if the financial scenario system capacities are greater than or equal to the + # resilience scenario system capacities + # """ + # resp = self.api_client.get( + # '/v2/financial_check/?financial_uuid={0}&resilience_uuid={0}'.format(run_uuid), + # format='json') + # self.assertEqual(resp.status_code, 200) + # results = json.loads(resp.content) + # self.assertTrue(results["survives_specified_outage"]) - def test_outage_sim_chp(self): - expected = { - 'resilience_hours_min': 0, - 'resilience_hours_max': 10, - 'resilience_hours_avg': 0.01, - "outage_durations": list(range(1, 11)), - "probs_of_surviving": [0.0011, 0.001, 0.0009, 0.0008, 0.0007, 0.0006, 0.0005, 0.0003, 0.0002, 0.0001] - } - inputs = self.inputs - inputs.update(pv_kw_ac_hourly=[], batt_kw=0, diesel_kw=0, chp_kw=10, critical_loads_kw=[10]*10 + [11]*8750) - resp = simulate_outages(**inputs) + # def test_outage_sim_chp(self): + # expected = { + # 'resilience_hours_min': 0, + # 'resilience_hours_max': 10, + # 'resilience_hours_avg': 0.01, + # "outage_durations": list(range(1, 11)), + # "probs_of_surviving": [0.0011, 0.001, 0.0009, 0.0008, 0.0007, 0.0006, 0.0005, 0.0003, 0.0002, 0.0001] + # } + # inputs = self.inputs + # inputs.update(pv_kw_ac_hourly=[], batt_kw=0, diesel_kw=0, chp_kw=10, critical_loads_kw=[10]*10 + [11]*8750) + # resp = simulate_outages(**inputs) - self.assertAlmostEqual(expected['resilience_hours_min'], resp['resilience_hours_min'], places=4) - self.assertAlmostEqual(expected['resilience_hours_max'], resp['resilience_hours_max'], places=4) - self.assertAlmostEqual(expected['resilience_hours_avg'], resp['resilience_hours_avg'], places=4) - self.assertListEqual(expected['outage_durations'], resp['outage_durations']) - for x, y in zip(expected['probs_of_surviving'], resp['probs_of_surviving']): - self.assertAlmostEquals(x, y, places=4) + # self.assertAlmostEqual(expected['resilience_hours_min'], resp['resilience_hours_min'], places=4) + # self.assertAlmostEqual(expected['resilience_hours_max'], resp['resilience_hours_max'], places=4) + # self.assertAlmostEqual(expected['resilience_hours_avg'], resp['resilience_hours_avg'], places=4) + # self.assertListEqual(expected['outage_durations'], resp['outage_durations']) + # for x, y in zip(expected['probs_of_surviving'], resp['probs_of_surviving']): + # self.assertAlmostEquals(x, y, places=4) From 9605654184be7c0fb1592d26180b129e473eb6fd Mon Sep 17 00:00:00 2001 From: Hallie Dunham <70401017+hdunham@users.noreply.github.com> Date: Fri, 14 Jun 2024 12:50:48 -0600 Subject: [PATCH 119/142] test cant be empty --- reoptjl/test/test_http_endpoints.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reoptjl/test/test_http_endpoints.py b/reoptjl/test/test_http_endpoints.py index ae389c988..ac845e94d 100644 --- a/reoptjl/test/test_http_endpoints.py +++ b/reoptjl/test/test_http_endpoints.py @@ -9,7 +9,8 @@ class TestHTTPEndpoints(ResourceTestCaseMixin, TestCase): - # def test_chp_defaults(self): + def test_chp_defaults(self): + self.assertEqual(1, 1) # inputs = {"hot_water_or_steam": "hot_water", # "avg_boiler_fuel_load_mmbtu_per_hour": 28.0 From b35505180a1fdb6812e610e67028a72635773be2 Mon Sep 17 00:00:00 2001 From: Hallie Dunham <70401017+hdunham@users.noreply.github.com> Date: Fri, 14 Jun 2024 13:11:33 -0600 Subject: [PATCH 120/142] Revert "test cant be empty" This reverts commit 9605654184be7c0fb1592d26180b129e473eb6fd. --- reoptjl/test/test_http_endpoints.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/reoptjl/test/test_http_endpoints.py b/reoptjl/test/test_http_endpoints.py index ac845e94d..ae389c988 100644 --- a/reoptjl/test/test_http_endpoints.py +++ b/reoptjl/test/test_http_endpoints.py @@ -9,8 +9,7 @@ class TestHTTPEndpoints(ResourceTestCaseMixin, TestCase): - def test_chp_defaults(self): - self.assertEqual(1, 1) + # def test_chp_defaults(self): # inputs = {"hot_water_or_steam": "hot_water", # "avg_boiler_fuel_load_mmbtu_per_hour": 28.0 From 4ce4b8318d3df34bfacaa1831c6c0a15dbd89365 Mon Sep 17 00:00:00 2001 From: Hallie Dunham <70401017+hdunham@users.noreply.github.com> Date: Fri, 14 Jun 2024 13:11:36 -0600 Subject: [PATCH 121/142] Revert "comment out extra tests" This reverts commit 04182ceefa0eaa3bcd04b66ce362042910b4bd41. --- reoptjl/test/test_http_endpoints.py | 700 +++++++++--------- reoptjl/test/test_job_endpoint.py | 534 ++++++------- reoptjl/test/test_validator.py | 630 ++++++++-------- resilience_stats/tests/test_erp.py | 234 +++--- .../tests/test_new_post_endpoint.py | 34 +- .../tests/test_resilience_stats.py | 688 ++++++++--------- 6 files changed, 1410 insertions(+), 1410 deletions(-) diff --git a/reoptjl/test/test_http_endpoints.py b/reoptjl/test/test_http_endpoints.py index ae389c988..760c10775 100644 --- a/reoptjl/test/test_http_endpoints.py +++ b/reoptjl/test/test_http_endpoints.py @@ -9,373 +9,373 @@ class TestHTTPEndpoints(ResourceTestCaseMixin, TestCase): - # def test_chp_defaults(self): + def test_chp_defaults(self): - # inputs = {"hot_water_or_steam": "hot_water", - # "avg_boiler_fuel_load_mmbtu_per_hour": 28.0 - # } + inputs = {"hot_water_or_steam": "hot_water", + "avg_boiler_fuel_load_mmbtu_per_hour": 28.0 + } - # # Direct call of the http.jl endpoint /chp_defaults - # julia_host = os.environ.get('JULIA_HOST', "julia") - # response = requests.get("http://" + julia_host + ":8081/chp_defaults/", json=inputs) - # http_response = response.json() + # Direct call of the http.jl endpoint /chp_defaults + julia_host = os.environ.get('JULIA_HOST', "julia") + response = requests.get("http://" + julia_host + ":8081/chp_defaults/", json=inputs) + http_response = response.json() - # # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint - # resp = self.api_client.get(f'/v3/chp_defaults', data=inputs) - # view_response = json.loads(resp.content) + # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint + resp = self.api_client.get(f'/v3/chp_defaults', data=inputs) + view_response = json.loads(resp.content) - # mismatch = [] - # for k, v in http_response["default_inputs"].items(): - # if v != view_response["default_inputs"][k]: - # mismatch.append(k) + mismatch = [] + for k, v in http_response["default_inputs"].items(): + if v != view_response["default_inputs"][k]: + mismatch.append(k) - # self.assertEqual(mismatch, []) - - # # Check the endpoint logic with the expected selection - # self.assertEqual(http_response["prime_mover"], "combustion_turbine") - # self.assertEqual(http_response["size_class"], 2) - # self.assertGreater(http_response["chp_elec_size_heuristic_kw"], 3500.0) - # self.assertEqual(http_response["default_inputs"]["federal_itc_fraction"], 0.3) - - # inputs = { - # "prime_mover": "micro_turbine", - # "avg_electric_load_kw": 885.0247784246575, - # "max_electric_load_kw": 1427.334, - # "is_electric_only": "true" - # } - - # # Direct call of the http.jl endpoint /chp_defaults - # julia_host = os.environ.get('JULIA_HOST', "julia") - # response = requests.get("http://" + julia_host + ":8081/chp_defaults/", json=inputs) - # http_response = response.json() - - # # Check the endpoint logic with the expected selection - # self.assertEqual(http_response["default_inputs"]["federal_itc_fraction"], 0.3) - - # inputs = { - # "prime_mover": "combustion_turbine", - # "size_class": 4, - # "is_electric_only": "true", - # "avg_electric_load_kw": 885.0247784246575, - # "max_electric_load_kw": 1427.334 - # } - - # # Direct call of the http.jl endpoint /chp_defaults - # julia_host = os.environ.get('JULIA_HOST', "julia") - # response = requests.get("http://" + julia_host + ":8081/chp_defaults/", json=inputs) - # http_response = response.json() - - # # Check the endpoint logic with the expected selection - # self.assertEqual(http_response["default_inputs"]["federal_itc_fraction"], 0.0) - - # inputs = { - # "prime_mover": "recip_engine", - # "size_class": 4, - # "is_electric_only": "true", - # "avg_electric_load_kw": 885.0247784246575, - # "max_electric_load_kw": 1427.334 - # } - - # # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint - # resp = self.api_client.get(f'/v3/chp_defaults', data=inputs) - # view_response = json.loads(resp.content) - - # # Check the endpoint logic with the expected selection - # self.assertEqual(http_response["default_inputs"]["federal_itc_fraction"], 0.0) + self.assertEqual(mismatch, []) + + # Check the endpoint logic with the expected selection + self.assertEqual(http_response["prime_mover"], "combustion_turbine") + self.assertEqual(http_response["size_class"], 2) + self.assertGreater(http_response["chp_elec_size_heuristic_kw"], 3500.0) + self.assertEqual(http_response["default_inputs"]["federal_itc_fraction"], 0.3) + + inputs = { + "prime_mover": "micro_turbine", + "avg_electric_load_kw": 885.0247784246575, + "max_electric_load_kw": 1427.334, + "is_electric_only": "true" + } + + # Direct call of the http.jl endpoint /chp_defaults + julia_host = os.environ.get('JULIA_HOST', "julia") + response = requests.get("http://" + julia_host + ":8081/chp_defaults/", json=inputs) + http_response = response.json() + + # Check the endpoint logic with the expected selection + self.assertEqual(http_response["default_inputs"]["federal_itc_fraction"], 0.3) + + inputs = { + "prime_mover": "combustion_turbine", + "size_class": 4, + "is_electric_only": "true", + "avg_electric_load_kw": 885.0247784246575, + "max_electric_load_kw": 1427.334 + } + + # Direct call of the http.jl endpoint /chp_defaults + julia_host = os.environ.get('JULIA_HOST', "julia") + response = requests.get("http://" + julia_host + ":8081/chp_defaults/", json=inputs) + http_response = response.json() + + # Check the endpoint logic with the expected selection + self.assertEqual(http_response["default_inputs"]["federal_itc_fraction"], 0.0) + + inputs = { + "prime_mover": "recip_engine", + "size_class": 4, + "is_electric_only": "true", + "avg_electric_load_kw": 885.0247784246575, + "max_electric_load_kw": 1427.334 + } + + # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint + resp = self.api_client.get(f'/v3/chp_defaults', data=inputs) + view_response = json.loads(resp.content) + + # Check the endpoint logic with the expected selection + self.assertEqual(http_response["default_inputs"]["federal_itc_fraction"], 0.0) - # def test_steamturbine_defaults(self): - - # inputs = { - # "prime_mover": "steam_turbine", - # "avg_boiler_fuel_load_mmbtu_per_hour": 28.0 - # } - - # # Direct call of the http.jl endpoint /chp_defaults - # julia_host = os.environ.get('JULIA_HOST', "julia") - # response = requests.get("http://" + julia_host + ":8081/chp_defaults/", json=inputs) - # http_response = response.json() - - # # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint - # resp = self.api_client.get(f'/v3/chp_defaults', data=inputs) - # view_response = json.loads(resp.content) - - # mismatch = [] - # for k, v in http_response["default_inputs"].items(): - # if v != view_response["default_inputs"][k]: - # mismatch.append(k) + def test_steamturbine_defaults(self): + + inputs = { + "prime_mover": "steam_turbine", + "avg_boiler_fuel_load_mmbtu_per_hour": 28.0 + } + + # Direct call of the http.jl endpoint /chp_defaults + julia_host = os.environ.get('JULIA_HOST', "julia") + response = requests.get("http://" + julia_host + ":8081/chp_defaults/", json=inputs) + http_response = response.json() + + # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint + resp = self.api_client.get(f'/v3/chp_defaults', data=inputs) + view_response = json.loads(resp.content) + + mismatch = [] + for k, v in http_response["default_inputs"].items(): + if v != view_response["default_inputs"][k]: + mismatch.append(k) - # self.assertEqual(mismatch, []) + self.assertEqual(mismatch, []) - # # Check the endpoint logic with the expected selection - # self.assertEqual(http_response["prime_mover"], "steam_turbine") - # self.assertEqual(http_response["size_class"], 1) - # self.assertGreater(http_response["chp_elec_size_heuristic_kw"], 574.419) + # Check the endpoint logic with the expected selection + self.assertEqual(http_response["prime_mover"], "steam_turbine") + self.assertEqual(http_response["size_class"], 1) + self.assertGreater(http_response["chp_elec_size_heuristic_kw"], 574.419) - # def test_absorption_chiller_defaults(self): + def test_absorption_chiller_defaults(self): - # inputs = {"thermal_consumption_hot_water_or_steam": "hot_water", - # "load_max_tons": 50 - # } + inputs = {"thermal_consumption_hot_water_or_steam": "hot_water", + "load_max_tons": 50 + } - # # Direct call of the http.jl endpoint /absorption_chiller_defaults - # julia_host = os.environ.get('JULIA_HOST', "julia") - # response = requests.get("http://" + julia_host + ":8081/absorption_chiller_defaults/", json=inputs) - # http_response = response.json() + # Direct call of the http.jl endpoint /absorption_chiller_defaults + julia_host = os.environ.get('JULIA_HOST', "julia") + response = requests.get("http://" + julia_host + ":8081/absorption_chiller_defaults/", json=inputs) + http_response = response.json() - # # Call to the django view endpoint /absorption_chiller_defaults which calls the http.jl endpoint - # resp = self.api_client.get(f'/v3/absorption_chiller_defaults', data=inputs) - # view_response = json.loads(resp.content) + # Call to the django view endpoint /absorption_chiller_defaults which calls the http.jl endpoint + resp = self.api_client.get(f'/v3/absorption_chiller_defaults', data=inputs) + view_response = json.loads(resp.content) - # mismatch = [] - # for k, v in http_response["default_inputs"].items(): - # if v != view_response["default_inputs"][k]: - # mismatch.append(k) + mismatch = [] + for k, v in http_response["default_inputs"].items(): + if v != view_response["default_inputs"][k]: + mismatch.append(k) - # self.assertEqual(mismatch, []) - - # # Check the endpoint logic with the expected selection - # self.assertEqual(http_response["thermal_consumption_hot_water_or_steam"], "hot_water") - # self.assertEqual(http_response["default_inputs"]["om_cost_per_ton"], 80.0) - # self.assertEqual(http_response["default_inputs"]["installed_cost_per_ton"], 3066.0) - # self.assertEqual(http_response["default_inputs"]["cop_thermal"], 0.74) - # self.assertNotIn("thermal_consumption_hot_water_or_steam", http_response["default_inputs"].keys()) + self.assertEqual(mismatch, []) + + # Check the endpoint logic with the expected selection + self.assertEqual(http_response["thermal_consumption_hot_water_or_steam"], "hot_water") + self.assertEqual(http_response["default_inputs"]["om_cost_per_ton"], 80.0) + self.assertEqual(http_response["default_inputs"]["installed_cost_per_ton"], 3066.0) + self.assertEqual(http_response["default_inputs"]["cop_thermal"], 0.74) + self.assertNotIn("thermal_consumption_hot_water_or_steam", http_response["default_inputs"].keys()) - # def test_simulated_load(self): - - # # Test heating load because REopt.jl separates SpaceHeating and DHW, so had to aggregate for this endpoint - # inputs = {"load_type": "heating", - # "doe_reference_name": "Hospital", - # "latitude": 36.12, - # "longitude": -115.5 - # } - - # # The /v3/simulated_load endpoint calls the http.jl /simulated_load endpoint - # response = self.api_client.get(f'/v3/simulated_load', data=inputs) - # http_response = json.loads(response.content) - - # # Call to the v2 /simulated_load to check for consistency - # resp = self.api_client.get(f'/v2/simulated_load', data=inputs) - # v2_response = json.loads(resp.content) - # self.assertAlmostEqual(http_response["annual_mmbtu"], v2_response["annual_mmbtu"], delta=1.0) - - # # Test blended/hybrid buildings - # inputs["load_type"] = "electric" - # inputs["annual_kwh"] = 1.5E7 - # inputs["doe_reference_name[0]"] = "Hospital" - # inputs["doe_reference_name[1]"] = "LargeOffice" - # inputs["percent_share[0]"] = 0.25 - # inputs["percent_share[1]"] = 1.0 - inputs["percent_share[0]"] + def test_simulated_load(self): + + # Test heating load because REopt.jl separates SpaceHeating and DHW, so had to aggregate for this endpoint + inputs = {"load_type": "heating", + "doe_reference_name": "Hospital", + "latitude": 36.12, + "longitude": -115.5 + } + + # The /v3/simulated_load endpoint calls the http.jl /simulated_load endpoint + response = self.api_client.get(f'/v3/simulated_load', data=inputs) + http_response = json.loads(response.content) + + # Call to the v2 /simulated_load to check for consistency + resp = self.api_client.get(f'/v2/simulated_load', data=inputs) + v2_response = json.loads(resp.content) + self.assertAlmostEqual(http_response["annual_mmbtu"], v2_response["annual_mmbtu"], delta=1.0) + + # Test blended/hybrid buildings + inputs["load_type"] = "electric" + inputs["annual_kwh"] = 1.5E7 + inputs["doe_reference_name[0]"] = "Hospital" + inputs["doe_reference_name[1]"] = "LargeOffice" + inputs["percent_share[0]"] = 0.25 + inputs["percent_share[1]"] = 1.0 - inputs["percent_share[0]"] - # # The /v3/simulated_load endpoint calls the http.jl /simulated_load endpoint - # response = self.api_client.get(f'/v3/simulated_load', data=inputs) - # http_response = json.loads(response.content) - - # # Call to the v2 /simulated_load to check for consistency - # resp = self.api_client.get(f'/v2/simulated_load', data=inputs) - # v2_response = json.loads(resp.content) - # self.assertAlmostEqual(http_response["annual_kwh"], v2_response["annual_kwh"], delta=1.0) - - # # Test bad inputs - # inputs["invalid_key"] = "invalid_val" - # resp = self.api_client.get(f'/v2/simulated_load', data=inputs) - # v2_response = json.loads(resp.content) - # assert("Error" in v2_response.keys()) - - # def test_avert_emissions_profile_endpoint(self): - # # Call to the django view endpoint dev/avert_emissions_profile which calls the http.jl endpoint - # #case 1: location in CONUS (Seattle, WA) - # inputs = { - # "latitude": 47.606211, - # "longitude": -122.336052, - # "load_year": 2021 - # } - # resp = self.api_client.get(f'/v3/avert_emissions_profile', data=inputs) - # self.assertHttpOK(resp) - # view_response = json.loads(resp.content) - # self.assertEquals(view_response["avert_meters_to_region"], 0.0) - # self.assertEquals(view_response["avert_region"], "Northwest") - # self.assertEquals(len(view_response["emissions_factor_series_lb_NOx_per_kwh"]), 8760) - # #case 2: location off shore of NJ (works for AVERT, not Cambium) - # inputs = { - # "latitude": 39.034417, - # "longitude": -74.759292, - # "load_year": 2021 - # } - # resp = self.api_client.get(f'/v3/avert_emissions_profile', data=inputs) - # self.assertHttpOK(resp) - # view_response = json.loads(resp.content) - # self.assertAlmostEqual(view_response["avert_meters_to_region"], 760.62, delta=1.0) - # self.assertEquals(view_response["avert_region"], "Mid-Atlantic") - # self.assertEquals(len(view_response["emissions_factor_series_lb_NOx_per_kwh"]), 8760) - # #case 3: Honolulu, HI (works for AVERT but not Cambium) - # inputs = { - # "latitude": 21.3099, - # "longitude": -157.8581, - # "load_year": 2021 - # } - # resp = self.api_client.get(f'/v3/avert_emissions_profile', data=inputs) - # self.assertHttpOK(resp) - # view_response = json.loads(resp.content) - # self.assertEquals(view_response["avert_meters_to_region"], 0.0) - # self.assertEquals(view_response["avert_region"], "Hawaii (Oahu)") - # self.assertEquals(len(view_response["emissions_factor_series_lb_NOx_per_kwh"]), 8760) - # #case 4: location well outside of US (does not work) - # inputs = { - # "latitude": 0.0, - # "longitude": 0.0, - # "load_year": 2022 - # } - # resp = self.api_client.get(f'/v3/avert_emissions_profile', data=inputs) - # self.assertHttpBadRequest(resp) - # view_response = json.loads(resp.content) - # self.assertTrue("error" in view_response) + # The /v3/simulated_load endpoint calls the http.jl /simulated_load endpoint + response = self.api_client.get(f'/v3/simulated_load', data=inputs) + http_response = json.loads(response.content) + + # Call to the v2 /simulated_load to check for consistency + resp = self.api_client.get(f'/v2/simulated_load', data=inputs) + v2_response = json.loads(resp.content) + self.assertAlmostEqual(http_response["annual_kwh"], v2_response["annual_kwh"], delta=1.0) + + # Test bad inputs + inputs["invalid_key"] = "invalid_val" + resp = self.api_client.get(f'/v2/simulated_load', data=inputs) + v2_response = json.loads(resp.content) + assert("Error" in v2_response.keys()) + + def test_avert_emissions_profile_endpoint(self): + # Call to the django view endpoint dev/avert_emissions_profile which calls the http.jl endpoint + #case 1: location in CONUS (Seattle, WA) + inputs = { + "latitude": 47.606211, + "longitude": -122.336052, + "load_year": 2021 + } + resp = self.api_client.get(f'/v3/avert_emissions_profile', data=inputs) + self.assertHttpOK(resp) + view_response = json.loads(resp.content) + self.assertEquals(view_response["avert_meters_to_region"], 0.0) + self.assertEquals(view_response["avert_region"], "Northwest") + self.assertEquals(len(view_response["emissions_factor_series_lb_NOx_per_kwh"]), 8760) + #case 2: location off shore of NJ (works for AVERT, not Cambium) + inputs = { + "latitude": 39.034417, + "longitude": -74.759292, + "load_year": 2021 + } + resp = self.api_client.get(f'/v3/avert_emissions_profile', data=inputs) + self.assertHttpOK(resp) + view_response = json.loads(resp.content) + self.assertAlmostEqual(view_response["avert_meters_to_region"], 760.62, delta=1.0) + self.assertEquals(view_response["avert_region"], "Mid-Atlantic") + self.assertEquals(len(view_response["emissions_factor_series_lb_NOx_per_kwh"]), 8760) + #case 3: Honolulu, HI (works for AVERT but not Cambium) + inputs = { + "latitude": 21.3099, + "longitude": -157.8581, + "load_year": 2021 + } + resp = self.api_client.get(f'/v3/avert_emissions_profile', data=inputs) + self.assertHttpOK(resp) + view_response = json.loads(resp.content) + self.assertEquals(view_response["avert_meters_to_region"], 0.0) + self.assertEquals(view_response["avert_region"], "Hawaii (Oahu)") + self.assertEquals(len(view_response["emissions_factor_series_lb_NOx_per_kwh"]), 8760) + #case 4: location well outside of US (does not work) + inputs = { + "latitude": 0.0, + "longitude": 0.0, + "load_year": 2022 + } + resp = self.api_client.get(f'/v3/avert_emissions_profile', data=inputs) + self.assertHttpBadRequest(resp) + view_response = json.loads(resp.content) + self.assertTrue("error" in view_response) - # def test_cambium_emissions_profile_endpoint(self): - # # Call to the django view endpoint v3/cambium_emissions_profile which calls the http.jl endpoint - # #case 1: location in CONUS (Seattle, WA) - # inputs = { - # "load_year": 2021, - # "scenario": "Mid-case", - # "location_type": "States", - # "latitude": 47.606211, # Seattle - # "longitude": -122.336052, # Seattle - # "start_year": 2024, - # "lifetime": 25, - # "metric_col": "lrmer_co2e", - # "grid_level": "enduse" - # } - # resp = self.api_client.get(f'/v3/cambium_emissions_profile', data=inputs) - # self.assertHttpOK(resp) - # view_response = json.loads(resp.content) - # self.assertEquals(view_response["metric_col"], "lrmer_co2e") - # self.assertEquals(view_response["location"], "Washington") - # self.assertEquals(len(view_response["emissions_factor_series_lb_CO2_per_kwh"]), 8760) - # #case 2: location off shore of NJ (works for AVERT, not Cambium) - # inputs["latitude"] = 39.034417 - # inputs["longitude"] = -74.759292 - # resp = self.api_client.get(f'/v3/cambium_emissions_profile', data=inputs) - # self.assertHttpBadRequest(resp) - # view_response = json.loads(resp.content) - # self.assertTrue("error" in view_response) - # #case 3: Honolulu, HI (works for AVERT but not Cambium) - # inputs["latitude"] = 21.3099 - # inputs["longitude"] = -157.8581 - # resp = self.api_client.get(f'/v3/cambium_emissions_profile', data=inputs) - # self.assertHttpBadRequest(resp) - # view_response = json.loads(resp.content) - # self.assertTrue("error" in view_response) - # #case 4: location well outside of US (does not work) - # inputs["latitude"] = 0.0 - # inputs["longitude"] = 0.0 - # resp = self.api_client.get(f'/v3/cambium_emissions_profile', data=inputs) - # self.assertHttpBadRequest(resp) - # view_response = json.loads(resp.content) - # self.assertTrue("error" in view_response) - - # def test_easiur_endpoint(self): - # # Call to the django view endpoint dev/easiur_costs which calls the http.jl endpoint - # inputs = { - # "latitude": 47.606211, - # "longitude": -122.336052, - # "inflation": 0.025 - # } - # resp = self.api_client.get(f'/v3/easiur_costs', data=inputs) - # self.assertHttpOK(resp) - # view_response = json.loads(resp.content) - # for ekey in ["NOx", "SO2", "PM25"]: - # for key_format in ["{}_grid_cost_per_tonne", "{}_onsite_fuelburn_cost_per_tonne", "{}_cost_escalation_rate_fraction"]: - # self.assertTrue(type(view_response[key_format.format(ekey)]) == float) - # inputs = { - # "latitude": 47.606211, - # "longitude": 122.336052, - # "inflation": 0.025 - # } - # resp = self.api_client.get(f'/v3/easiur_costs', data=inputs) - # self.assertHttpBadRequest(resp) - # view_response = json.loads(resp.content) - # self.assertTrue("error" in view_response) - - # def test_ghp_endpoints(self): - # # Test /ghp_efficiency_thermal_factors - # inputs_dict = {"latitude": 37.78, - # "longitude": -122.45, - # "doe_reference_name": "MediumOffice"} - - # # Call to the django view endpoint /ghp_efficiency_thermal_factors which calls the http.jl endpoint - # resp = self.api_client.get(f'/v3/ghp_efficiency_thermal_factors', data=inputs_dict) - # view_response = json.loads(resp.content) - - # self.assertEqual(view_response["cooling_efficiency_thermal_factor"], 0.43) - # self.assertEqual(view_response["space_heating_efficiency_thermal_factor"], 0.46) - - # # Test /ghpghx/ground_conductivity - # inputs_dict = {"latitude": 37.78, - # "longitude": -122.45} - - # # Call to the django view endpoint /ghpghx/ground_conductivity which calls the http.jl endpoint - # resp = self.api_client.get(f'/v3/ghpghx/ground_conductivity', data=inputs_dict) - # view_response = json.loads(resp.content) - - # self.assertEqual(view_response["thermal_conductivity"], 1.117) - - # def test_default_existing_chiller_cop(self): - # # Test 1: full dictionary - # inputs_dict = { - # "existing_chiller_max_thermal_factor_on_peak_load":1.25, - # "max_load_kw": 50, - # "max_load_ton":10 - # } - - # # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint - # resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) - # view_response = json.loads(resp.content) - - # self.assertEqual(view_response["existing_chiller_cop"], 4.4) - - # # Test 2: empty dictionary, which should return unknown value - # inputs_dict = {} - - # # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint - # resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) - # view_response = json.loads(resp.content) - - # self.assertEqual(view_response["existing_chiller_cop"], 4.545) - - # # Test 3: Check that "existing_chiller_max_thermal_factor_on_peak_load" can influence the COP; accept max_load_ton empty string - # inputs_dict = { - # "existing_chiller_max_thermal_factor_on_peak_load":1000, - # "max_load_kw": 5, - # "max_load_ton":"" - # } - - # # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint - # resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) - # view_response = json.loads(resp.content) - - # self.assertEqual(view_response["existing_chiller_cop"], 4.69) - - # # Test 4: max_load_ton empty string - # inputs_dict = { - # "max_load_ton":90, - # "max_load_kw":"" - # } - - # # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint - # resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) - # view_response = json.loads(resp.content) - - # self.assertEqual(view_response["existing_chiller_cop"], 4.69) - - # #Test 5: max_load_kw only, small value yields low COP - # inputs_dict = { - # "max_load_kw":1 - # } - - # # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint - # resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) - # view_response = json.loads(resp.content) - - # self.assertEqual(view_response["existing_chiller_cop"], 4.4) + def test_cambium_emissions_profile_endpoint(self): + # Call to the django view endpoint v3/cambium_emissions_profile which calls the http.jl endpoint + #case 1: location in CONUS (Seattle, WA) + inputs = { + "load_year": 2021, + "scenario": "Mid-case", + "location_type": "States", + "latitude": 47.606211, # Seattle + "longitude": -122.336052, # Seattle + "start_year": 2024, + "lifetime": 25, + "metric_col": "lrmer_co2e", + "grid_level": "enduse" + } + resp = self.api_client.get(f'/v3/cambium_emissions_profile', data=inputs) + self.assertHttpOK(resp) + view_response = json.loads(resp.content) + self.assertEquals(view_response["metric_col"], "lrmer_co2e") + self.assertEquals(view_response["location"], "Washington") + self.assertEquals(len(view_response["emissions_factor_series_lb_CO2_per_kwh"]), 8760) + #case 2: location off shore of NJ (works for AVERT, not Cambium) + inputs["latitude"] = 39.034417 + inputs["longitude"] = -74.759292 + resp = self.api_client.get(f'/v3/cambium_emissions_profile', data=inputs) + self.assertHttpBadRequest(resp) + view_response = json.loads(resp.content) + self.assertTrue("error" in view_response) + #case 3: Honolulu, HI (works for AVERT but not Cambium) + inputs["latitude"] = 21.3099 + inputs["longitude"] = -157.8581 + resp = self.api_client.get(f'/v3/cambium_emissions_profile', data=inputs) + self.assertHttpBadRequest(resp) + view_response = json.loads(resp.content) + self.assertTrue("error" in view_response) + #case 4: location well outside of US (does not work) + inputs["latitude"] = 0.0 + inputs["longitude"] = 0.0 + resp = self.api_client.get(f'/v3/cambium_emissions_profile', data=inputs) + self.assertHttpBadRequest(resp) + view_response = json.loads(resp.content) + self.assertTrue("error" in view_response) + + def test_easiur_endpoint(self): + # Call to the django view endpoint dev/easiur_costs which calls the http.jl endpoint + inputs = { + "latitude": 47.606211, + "longitude": -122.336052, + "inflation": 0.025 + } + resp = self.api_client.get(f'/v3/easiur_costs', data=inputs) + self.assertHttpOK(resp) + view_response = json.loads(resp.content) + for ekey in ["NOx", "SO2", "PM25"]: + for key_format in ["{}_grid_cost_per_tonne", "{}_onsite_fuelburn_cost_per_tonne", "{}_cost_escalation_rate_fraction"]: + self.assertTrue(type(view_response[key_format.format(ekey)]) == float) + inputs = { + "latitude": 47.606211, + "longitude": 122.336052, + "inflation": 0.025 + } + resp = self.api_client.get(f'/v3/easiur_costs', data=inputs) + self.assertHttpBadRequest(resp) + view_response = json.loads(resp.content) + self.assertTrue("error" in view_response) + + def test_ghp_endpoints(self): + # Test /ghp_efficiency_thermal_factors + inputs_dict = {"latitude": 37.78, + "longitude": -122.45, + "doe_reference_name": "MediumOffice"} + + # Call to the django view endpoint /ghp_efficiency_thermal_factors which calls the http.jl endpoint + resp = self.api_client.get(f'/v3/ghp_efficiency_thermal_factors', data=inputs_dict) + view_response = json.loads(resp.content) + + self.assertEqual(view_response["cooling_efficiency_thermal_factor"], 0.43) + self.assertEqual(view_response["space_heating_efficiency_thermal_factor"], 0.46) + + # Test /ghpghx/ground_conductivity + inputs_dict = {"latitude": 37.78, + "longitude": -122.45} + + # Call to the django view endpoint /ghpghx/ground_conductivity which calls the http.jl endpoint + resp = self.api_client.get(f'/v3/ghpghx/ground_conductivity', data=inputs_dict) + view_response = json.loads(resp.content) + + self.assertEqual(view_response["thermal_conductivity"], 1.117) + + def test_default_existing_chiller_cop(self): + # Test 1: full dictionary + inputs_dict = { + "existing_chiller_max_thermal_factor_on_peak_load":1.25, + "max_load_kw": 50, + "max_load_ton":10 + } + + # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint + resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) + view_response = json.loads(resp.content) + + self.assertEqual(view_response["existing_chiller_cop"], 4.4) + + # Test 2: empty dictionary, which should return unknown value + inputs_dict = {} + + # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint + resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) + view_response = json.loads(resp.content) + + self.assertEqual(view_response["existing_chiller_cop"], 4.545) + + # Test 3: Check that "existing_chiller_max_thermal_factor_on_peak_load" can influence the COP; accept max_load_ton empty string + inputs_dict = { + "existing_chiller_max_thermal_factor_on_peak_load":1000, + "max_load_kw": 5, + "max_load_ton":"" + } + + # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint + resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) + view_response = json.loads(resp.content) + + self.assertEqual(view_response["existing_chiller_cop"], 4.69) + + # Test 4: max_load_ton empty string + inputs_dict = { + "max_load_ton":90, + "max_load_kw":"" + } + + # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint + resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) + view_response = json.loads(resp.content) + + self.assertEqual(view_response["existing_chiller_cop"], 4.69) + + #Test 5: max_load_kw only, small value yields low COP + inputs_dict = { + "max_load_kw":1 + } + + # Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint + resp = self.api_client.get(f'/v3/get_existing_chiller_default_cop', data=inputs_dict) + view_response = json.loads(resp.content) + + self.assertEqual(view_response["existing_chiller_cop"], 4.4) diff --git a/reoptjl/test/test_job_endpoint.py b/reoptjl/test/test_job_endpoint.py index 9b234508b..407e1333e 100644 --- a/reoptjl/test/test_job_endpoint.py +++ b/reoptjl/test/test_job_endpoint.py @@ -36,275 +36,275 @@ def test_multiple_outages(self): self.assertAlmostEqual(results["Outages"]["microgrid_upgrade_capital_cost"], 1974429.4, delta=5000.0) self.assertAlmostEqual(results["Financial"]["lcc"], 59865240.0, delta=0.01*results["Financial"]["lcc"]) - # def test_pv_battery_and_emissions_defaults_from_julia(self): - # """ - # Same test post as "Solar and ElectricStorage w/BAU" in the Julia package. Used in development of v3. - # Also tests that inputs with defaults determined in the REopt julia package get updated in the database. - # """ - # post_file = os.path.join('reoptjl', 'test', 'posts', 'pv_batt_emissions.json') - # post = json.load(open(post_file, 'r')) - - # resp = self.api_client.post('/v3/job/', format='json', data=post) - # self.assertHttpCreated(resp) - # r = json.loads(resp.content) - # run_uuid = r.get('run_uuid') - - # resp = self.api_client.get(f'/v3/job/{run_uuid}/results') - # r = json.loads(resp.content) - # results = r["outputs"] - - # self.assertAlmostEqual(results["Financial"]["lcc"], 12391786, places=-3) - # self.assertAlmostEqual(results["Financial"]["lcc_bau"], 12766397, places=-3) - # self.assertAlmostEqual(results["PV"]["size_kw"], 216.667, places=1) - # self.assertAlmostEqual(results["ElectricStorage"]["size_kw"], 49.05, places=1) - # self.assertAlmostEqual(results["ElectricStorage"]["size_kwh"], 83.32, places=1) + def test_pv_battery_and_emissions_defaults_from_julia(self): + """ + Same test post as "Solar and ElectricStorage w/BAU" in the Julia package. Used in development of v3. + Also tests that inputs with defaults determined in the REopt julia package get updated in the database. + """ + post_file = os.path.join('reoptjl', 'test', 'posts', 'pv_batt_emissions.json') + post = json.load(open(post_file, 'r')) + + resp = self.api_client.post('/v3/job/', format='json', data=post) + self.assertHttpCreated(resp) + r = json.loads(resp.content) + run_uuid = r.get('run_uuid') + + resp = self.api_client.get(f'/v3/job/{run_uuid}/results') + r = json.loads(resp.content) + results = r["outputs"] + + self.assertAlmostEqual(results["Financial"]["lcc"], 12391786, places=-3) + self.assertAlmostEqual(results["Financial"]["lcc_bau"], 12766397, places=-3) + self.assertAlmostEqual(results["PV"]["size_kw"], 216.667, places=1) + self.assertAlmostEqual(results["ElectricStorage"]["size_kw"], 49.05, places=1) + self.assertAlmostEqual(results["ElectricStorage"]["size_kwh"], 83.32, places=1) - # self.assertIsNotNone(results["Site"]["total_renewable_energy_fraction"]) - # self.assertIsNotNone(results["Site"]["annual_emissions_tonnes_CO2"]) - # self.assertIsNotNone(results["Site"]["lifecycle_emissions_tonnes_NOx"]) - - # #test that emissions inputs got updated in the database with the defaults determined in REopt julia package - # updated_inputs = r["inputs"] - # self.assertIsNotNone(updated_inputs["ElectricUtility"]["emissions_factor_series_lb_CO2_per_kwh"]) - # self.assertIsNotNone(updated_inputs["Financial"]["NOx_grid_cost_per_tonne"]) - # self.assertIsNotNone(updated_inputs["Financial"]["SO2_onsite_fuelburn_cost_per_tonne"]) - # self.assertIsNotNone(updated_inputs["Financial"]["PM25_cost_escalation_rate_fraction"]) - - # def test_off_grid_defaults(self): - # """ - # Purpose of this test is to validate off-grid functionality and defaults in the API. - # """ - # post_file = os.path.join('reoptjl', 'test', 'posts', 'off_grid_defaults.json') - # post = json.load(open(post_file, 'r')) - - # resp = self.api_client.post('/v3/job/', format='json', data=post) - # self.assertHttpCreated(resp) - # r = json.loads(resp.content) - # run_uuid = r.get('run_uuid') - - # resp = self.api_client.get(f'/v3/job/{run_uuid}/results') - # r = json.loads(resp.content) - # results = r["outputs"] + self.assertIsNotNone(results["Site"]["total_renewable_energy_fraction"]) + self.assertIsNotNone(results["Site"]["annual_emissions_tonnes_CO2"]) + self.assertIsNotNone(results["Site"]["lifecycle_emissions_tonnes_NOx"]) + + #test that emissions inputs got updated in the database with the defaults determined in REopt julia package + updated_inputs = r["inputs"] + self.assertIsNotNone(updated_inputs["ElectricUtility"]["emissions_factor_series_lb_CO2_per_kwh"]) + self.assertIsNotNone(updated_inputs["Financial"]["NOx_grid_cost_per_tonne"]) + self.assertIsNotNone(updated_inputs["Financial"]["SO2_onsite_fuelburn_cost_per_tonne"]) + self.assertIsNotNone(updated_inputs["Financial"]["PM25_cost_escalation_rate_fraction"]) + + def test_off_grid_defaults(self): + """ + Purpose of this test is to validate off-grid functionality and defaults in the API. + """ + post_file = os.path.join('reoptjl', 'test', 'posts', 'off_grid_defaults.json') + post = json.load(open(post_file, 'r')) + + resp = self.api_client.post('/v3/job/', format='json', data=post) + self.assertHttpCreated(resp) + r = json.loads(resp.content) + run_uuid = r.get('run_uuid') + + resp = self.api_client.get(f'/v3/job/{run_uuid}/results') + r = json.loads(resp.content) + results = r["outputs"] - # # Validate that we got off-grid response fields - # self.assertAlmostEqual(results["Financial"]["offgrid_microgrid_lcoe_dollars_per_kwh"], 0.337, places=-3) - # self.assertAlmostEqual(results["ElectricTariff"]["year_one_bill_before_tax"], 0.0) - # self.assertAlmostEqual(results["ElectricLoad"]["offgrid_load_met_fraction"], 0.99999, places=-2) - # self.assertAlmostEqual(sum(results["ElectricLoad"]["offgrid_load_met_series_kw"]), 8760.0, places=-1) - # self.assertAlmostEqual(results["Financial"]["lifecycle_offgrid_other_annual_costs_after_tax"], 0.0, places=-2) + # Validate that we got off-grid response fields + self.assertAlmostEqual(results["Financial"]["offgrid_microgrid_lcoe_dollars_per_kwh"], 0.337, places=-3) + self.assertAlmostEqual(results["ElectricTariff"]["year_one_bill_before_tax"], 0.0) + self.assertAlmostEqual(results["ElectricLoad"]["offgrid_load_met_fraction"], 0.99999, places=-2) + self.assertAlmostEqual(sum(results["ElectricLoad"]["offgrid_load_met_series_kw"]), 8760.0, places=-1) + self.assertAlmostEqual(results["Financial"]["lifecycle_offgrid_other_annual_costs_after_tax"], 0.0, places=-2) - # def test_process_reopt_error(self): - # """ - # Purpose of this test is to ensure REopt status 400 is returned using the reoptjl endpoint - # """ - - # post_file = os.path.join('reoptjl', 'test', 'posts', 'handle_reopt_error.json') - # post = json.load(open(post_file, 'r')) - - # resp = self.api_client.post('/v3/job/', format='json', data=post) - # self.assertHttpCreated(resp) - # r = json.loads(resp.content) - # run_uuid = r.get('run_uuid') - - # resp = self.api_client.get(f'/v3/job/{run_uuid}/results') - # r = json.loads(resp.content) - # assert('errors' in r["messages"].keys()) - # assert('warnings' in r["messages"].keys()) - # assert(r['messages']['has_stacktrace']==True) - # assert(resp.status_code==400) - - - # def test_thermal_in_results(self): - # """ - # Purpose of this test is to check that the expected thermal loads, techs, and storage are included in the results - # """ - - # post_file = os.path.join('reoptjl', 'test', 'posts', 'test_thermal_in_results.json') #includes GhpGhx responses - # post = json.load(open(post_file, 'r')) - - # resp = self.api_client.post('/v3/job/', format='json', data=post) - # self.assertHttpCreated(resp) - # r = json.loads(resp.content) - # run_uuid = r.get('run_uuid') + def test_process_reopt_error(self): + """ + Purpose of this test is to ensure REopt status 400 is returned using the reoptjl endpoint + """ + + post_file = os.path.join('reoptjl', 'test', 'posts', 'handle_reopt_error.json') + post = json.load(open(post_file, 'r')) + + resp = self.api_client.post('/v3/job/', format='json', data=post) + self.assertHttpCreated(resp) + r = json.loads(resp.content) + run_uuid = r.get('run_uuid') + + resp = self.api_client.get(f'/v3/job/{run_uuid}/results') + r = json.loads(resp.content) + assert('errors' in r["messages"].keys()) + assert('warnings' in r["messages"].keys()) + assert(r['messages']['has_stacktrace']==True) + assert(resp.status_code==400) + + + def test_thermal_in_results(self): + """ + Purpose of this test is to check that the expected thermal loads, techs, and storage are included in the results + """ + + post_file = os.path.join('reoptjl', 'test', 'posts', 'test_thermal_in_results.json') #includes GhpGhx responses + post = json.load(open(post_file, 'r')) + + resp = self.api_client.post('/v3/job/', format='json', data=post) + self.assertHttpCreated(resp) + r = json.loads(resp.content) + run_uuid = r.get('run_uuid') - # resp = self.api_client.get(f'/v3/job/{run_uuid}/results') - # r = json.loads(resp.content) - # inputs = r["inputs"] - # results = r["outputs"] - # self.assertIn("CoolingLoad", list(inputs.keys())) - # self.assertIn("CoolingLoad", list(results.keys())) - # self.assertIn("CHP", list(results.keys())) - # self.assertIn("thermal_to_dhw_load_series_mmbtu_per_hour", list(results["CHP"].keys())) - # self.assertIn("thermal_to_space_heating_load_series_mmbtu_per_hour", list(results["CHP"].keys())) - # self.assertIn("thermal_to_dhw_load_series_mmbtu_per_hour", list(results["CHP"].keys())) - # self.assertIn("ExistingChiller",list(results.keys())) - # self.assertIn("ExistingBoiler", list(results.keys())) - # self.assertIn("HeatingLoad", list(results.keys())) - # self.assertIn("process_heat_thermal_load_series_mmbtu_per_hour", list(results["HeatingLoad"].keys())) - # self.assertIn("process_heat_boiler_fuel_load_series_mmbtu_per_hour", list(results["HeatingLoad"].keys())) - # self.assertIn("HotThermalStorage", list(results.keys())) - # self.assertIn("storage_to_dhw_load_series_mmbtu_per_hour", list(results["HotThermalStorage"].keys())) - # self.assertIn("storage_to_space_heating_load_series_mmbtu_per_hour", list(results["HotThermalStorage"].keys())) - # self.assertIn("storage_to_dhw_load_series_mmbtu_per_hour", list(results["HotThermalStorage"].keys())) - # self.assertIn("ColdThermalStorage", list(results.keys())) - # self.assertIn("AbsorptionChiller", list(results.keys())) - # self.assertIn("GHP", list(results.keys())) - - - # def test_chp_defaults_from_julia(self): - # # Test that the inputs_with_defaults_set_in_julia feature worked for CHP, consistent with /chp_defaults - # post_file = os.path.join('reoptjl', 'test', 'posts', 'chp_defaults_post.json') - # post = json.load(open(post_file, 'r')) - # # Make average MMBtu/hr thermal steam greater than 7 MMBtu/hr threshold for combustion_turbine to be chosen - # # Default ExistingBoiler efficiency for production_type = steam is 0.75 - # post["SpaceHeatingLoad"]["annual_mmbtu"] = 8760 * 8 / 0.75 - # post["DomesticHotWaterLoad"]["annual_mmbtu"] = 8760 * 8 / 0.75 - # resp = self.api_client.post('/v3/job/', format='json', data=post) - # self.assertHttpCreated(resp) - # r = json.loads(resp.content) - # run_uuid = r.get('run_uuid') - - # resp = self.api_client.get(f'/v3/job/{run_uuid}/results') - # r = json.loads(resp.content) - - # inputs_chp = r["inputs"]["CHP"] - - # avg_fuel_load = (post["SpaceHeatingLoad"]["annual_mmbtu"] + - # post["DomesticHotWaterLoad"]["annual_mmbtu"]) / 8760.0 - # inputs_chp_defaults = {"hot_water_or_steam": post["ExistingBoiler"]["production_type"], - # "avg_boiler_fuel_load_mmbtu_per_hour": avg_fuel_load - # } - - # # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint - # resp = self.api_client.get(f'/v3/chp_defaults', data=inputs_chp_defaults) - # view_response = json.loads(resp.content) - - # for key in view_response["default_inputs"].keys(): - # if post["CHP"].get(key) is None: # Check that default got assigned consistent with /chp_defaults - # if key == "max_kw": - # self.assertEquals(inputs_chp[key], view_response["chp_max_size_kw"]) - # else: - # self.assertEquals(inputs_chp[key], view_response["default_inputs"][key]) - # else: # Make sure we didn't overwrite user-input - # self.assertEquals(inputs_chp[key], post["CHP"][key]) - - # def test_peak_load_outage_times(self): - # """ - # Purpose of this test is to test the endpoint /peak_load_outage_times - # """ - - # load = [100]*8760 - # load[40*24] = 200 - # load[50*24-1] = 300 - # load[70*24+13] = 300 - # load[170*24] = 300 - # load[243*24] = 400 - # outage_inputs = {"seasonal_peaks": True, - # "outage_duration": 95, - # "critical_load": load, - # "start_not_center_on_peaks": False - # } - # expected_time_steps = [50*24-1-47+1, 70*24+13-47+1, 170*24-47+1, 243*24-47+1] - # resp = self.api_client.post(f'/v3/peak_load_outage_times', data=outage_inputs) - # self.assertHttpOK(resp) - # resp = json.loads(resp.content) - # self.assertEquals(resp["outage_start_time_steps"], expected_time_steps) - - # outage_inputs["seasonal_peaks"] = False - # outage_inputs["start_not_center_on_peaks"] = True - # expected_time_steps = [243*24+1] - # resp = self.api_client.post(f'/v3/peak_load_outage_times', data=outage_inputs) - # self.assertHttpOK(resp) - # resp = json.loads(resp.content) - # self.assertEquals(resp["outage_start_time_steps"], expected_time_steps) - - # def test_superset_input_fields(self): - # """ - # Purpose of this test is to test the API's ability to accept all relevant - # input fields and send to REopt, ensuring name input consistency with REopt.jl. - # Note: Does not currently test CHP inputs - # """ - # post_file = os.path.join('reoptjl', 'test', 'posts', 'all_inputs_test.json') - # post = json.load(open(post_file, 'r')) - - # resp = self.api_client.post('/v3/job/', format='json', data=post) - # self.assertHttpCreated(resp) - # r = json.loads(resp.content) - # run_uuid = r.get('run_uuid') - - # resp = self.api_client.get(f'/v3/job/{run_uuid}/results') - # r = json.loads(resp.content) - # results = r["outputs"] - # self.assertAlmostEqual(results["Financial"]["npv"], -258533.19, delta=0.01*results["Financial"]["lcc"]) - # assert(resp.status_code==200) - - # def test_steamturbine_defaults_from_julia(self): - # # Test that the inputs_with_defaults_set_in_julia feature worked for SteamTurbine, consistent with /chp_defaults - # post_file = os.path.join('reoptjl', 'test', 'posts', 'steamturbine_defaults_post.json') - # post = json.load(open(post_file, 'r')) - - # # Call http.jl /reopt to run SteamTurbine scenario and get results for defaults from julia checking - # resp = self.api_client.post('/v3/job/', format='json', data=post) - # self.assertHttpCreated(resp) - # r = json.loads(resp.content) - # run_uuid = r.get('run_uuid') - - # resp = self.api_client.get(f'/v3/job/{run_uuid}/results') - # r = json.loads(resp.content) - - # inputs_steamturbine = r["inputs"]["SteamTurbine"] - - # avg_fuel_load = (post["SpaceHeatingLoad"]["annual_mmbtu"] + - # post["DomesticHotWaterLoad"]["annual_mmbtu"]) / 8760.0 + resp = self.api_client.get(f'/v3/job/{run_uuid}/results') + r = json.loads(resp.content) + inputs = r["inputs"] + results = r["outputs"] + self.assertIn("CoolingLoad", list(inputs.keys())) + self.assertIn("CoolingLoad", list(results.keys())) + self.assertIn("CHP", list(results.keys())) + self.assertIn("thermal_to_dhw_load_series_mmbtu_per_hour", list(results["CHP"].keys())) + self.assertIn("thermal_to_space_heating_load_series_mmbtu_per_hour", list(results["CHP"].keys())) + self.assertIn("thermal_to_dhw_load_series_mmbtu_per_hour", list(results["CHP"].keys())) + self.assertIn("ExistingChiller",list(results.keys())) + self.assertIn("ExistingBoiler", list(results.keys())) + self.assertIn("HeatingLoad", list(results.keys())) + self.assertIn("process_heat_thermal_load_series_mmbtu_per_hour", list(results["HeatingLoad"].keys())) + self.assertIn("process_heat_boiler_fuel_load_series_mmbtu_per_hour", list(results["HeatingLoad"].keys())) + self.assertIn("HotThermalStorage", list(results.keys())) + self.assertIn("storage_to_dhw_load_series_mmbtu_per_hour", list(results["HotThermalStorage"].keys())) + self.assertIn("storage_to_space_heating_load_series_mmbtu_per_hour", list(results["HotThermalStorage"].keys())) + self.assertIn("storage_to_dhw_load_series_mmbtu_per_hour", list(results["HotThermalStorage"].keys())) + self.assertIn("ColdThermalStorage", list(results.keys())) + self.assertIn("AbsorptionChiller", list(results.keys())) + self.assertIn("GHP", list(results.keys())) + + + def test_chp_defaults_from_julia(self): + # Test that the inputs_with_defaults_set_in_julia feature worked for CHP, consistent with /chp_defaults + post_file = os.path.join('reoptjl', 'test', 'posts', 'chp_defaults_post.json') + post = json.load(open(post_file, 'r')) + # Make average MMBtu/hr thermal steam greater than 7 MMBtu/hr threshold for combustion_turbine to be chosen + # Default ExistingBoiler efficiency for production_type = steam is 0.75 + post["SpaceHeatingLoad"]["annual_mmbtu"] = 8760 * 8 / 0.75 + post["DomesticHotWaterLoad"]["annual_mmbtu"] = 8760 * 8 / 0.75 + resp = self.api_client.post('/v3/job/', format='json', data=post) + self.assertHttpCreated(resp) + r = json.loads(resp.content) + run_uuid = r.get('run_uuid') + + resp = self.api_client.get(f'/v3/job/{run_uuid}/results') + r = json.loads(resp.content) + + inputs_chp = r["inputs"]["CHP"] + + avg_fuel_load = (post["SpaceHeatingLoad"]["annual_mmbtu"] + + post["DomesticHotWaterLoad"]["annual_mmbtu"]) / 8760.0 + inputs_chp_defaults = {"hot_water_or_steam": post["ExistingBoiler"]["production_type"], + "avg_boiler_fuel_load_mmbtu_per_hour": avg_fuel_load + } + + # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint + resp = self.api_client.get(f'/v3/chp_defaults', data=inputs_chp_defaults) + view_response = json.loads(resp.content) + + for key in view_response["default_inputs"].keys(): + if post["CHP"].get(key) is None: # Check that default got assigned consistent with /chp_defaults + if key == "max_kw": + self.assertEquals(inputs_chp[key], view_response["chp_max_size_kw"]) + else: + self.assertEquals(inputs_chp[key], view_response["default_inputs"][key]) + else: # Make sure we didn't overwrite user-input + self.assertEquals(inputs_chp[key], post["CHP"][key]) + + def test_peak_load_outage_times(self): + """ + Purpose of this test is to test the endpoint /peak_load_outage_times + """ + + load = [100]*8760 + load[40*24] = 200 + load[50*24-1] = 300 + load[70*24+13] = 300 + load[170*24] = 300 + load[243*24] = 400 + outage_inputs = {"seasonal_peaks": True, + "outage_duration": 95, + "critical_load": load, + "start_not_center_on_peaks": False + } + expected_time_steps = [50*24-1-47+1, 70*24+13-47+1, 170*24-47+1, 243*24-47+1] + resp = self.api_client.post(f'/v3/peak_load_outage_times', data=outage_inputs) + self.assertHttpOK(resp) + resp = json.loads(resp.content) + self.assertEquals(resp["outage_start_time_steps"], expected_time_steps) + + outage_inputs["seasonal_peaks"] = False + outage_inputs["start_not_center_on_peaks"] = True + expected_time_steps = [243*24+1] + resp = self.api_client.post(f'/v3/peak_load_outage_times', data=outage_inputs) + self.assertHttpOK(resp) + resp = json.loads(resp.content) + self.assertEquals(resp["outage_start_time_steps"], expected_time_steps) + + def test_superset_input_fields(self): + """ + Purpose of this test is to test the API's ability to accept all relevant + input fields and send to REopt, ensuring name input consistency with REopt.jl. + Note: Does not currently test CHP inputs + """ + post_file = os.path.join('reoptjl', 'test', 'posts', 'all_inputs_test.json') + post = json.load(open(post_file, 'r')) + + resp = self.api_client.post('/v3/job/', format='json', data=post) + self.assertHttpCreated(resp) + r = json.loads(resp.content) + run_uuid = r.get('run_uuid') + + resp = self.api_client.get(f'/v3/job/{run_uuid}/results') + r = json.loads(resp.content) + results = r["outputs"] + self.assertAlmostEqual(results["Financial"]["npv"], -258533.19, delta=0.01*results["Financial"]["lcc"]) + assert(resp.status_code==200) + + def test_steamturbine_defaults_from_julia(self): + # Test that the inputs_with_defaults_set_in_julia feature worked for SteamTurbine, consistent with /chp_defaults + post_file = os.path.join('reoptjl', 'test', 'posts', 'steamturbine_defaults_post.json') + post = json.load(open(post_file, 'r')) + + # Call http.jl /reopt to run SteamTurbine scenario and get results for defaults from julia checking + resp = self.api_client.post('/v3/job/', format='json', data=post) + self.assertHttpCreated(resp) + r = json.loads(resp.content) + run_uuid = r.get('run_uuid') + + resp = self.api_client.get(f'/v3/job/{run_uuid}/results') + r = json.loads(resp.content) + + inputs_steamturbine = r["inputs"]["SteamTurbine"] + + avg_fuel_load = (post["SpaceHeatingLoad"]["annual_mmbtu"] + + post["DomesticHotWaterLoad"]["annual_mmbtu"]) / 8760.0 - # inputs_steamturbine_defaults = { - # "prime_mover": "steam_turbine", - # "avg_boiler_fuel_load_mmbtu_per_hour": avg_fuel_load - # } - - # # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint - # resp = self.api_client.get(f'/v3/chp_defaults', data=inputs_steamturbine_defaults) - # view_response = json.loads(resp.content) - - # for key in view_response["default_inputs"].keys(): - # # skip this key because its NaN in REoptInputs but is populated in /chp_defaults response. - # if key != "inlet_steam_temperature_degF": - # if post["SteamTurbine"].get(key) is None: # Check that default got assigned consistent with /chp_defaults - # self.assertEquals(inputs_steamturbine[key], view_response["default_inputs"][key]) - # else: # Make sure we didn't overwrite user-input - # self.assertEquals(inputs_steamturbine[key], post["SteamTurbine"][key]) - - # def test_hybridghp(self): - # post_file = os.path.join('reoptjl', 'test', 'posts', 'hybrid_ghp.json') - # post = json.load(open(post_file, 'r')) - - # post['GHP']['ghpghx_inputs'][0]['hybrid_ghx_sizing_method'] = 'Automatic' - # post['GHP']['avoided_capex_by_ghp_present_value'] = 1.0e6 - # post['GHP']['ghx_useful_life_years'] = 35 - - # # Call http.jl /reopt to run SteamTurbine scenario and get results for defaults from julia checking - # resp = self.api_client.post('/v3/job/', format='json', data=post) - # self.assertHttpCreated(resp) - # r = json.loads(resp.content) - # run_uuid = r.get('run_uuid') - - # resp = self.api_client.get(f'/v3/job/{run_uuid}/results') - # r = json.loads(resp.content) - - # # calculated_ghx_residual_value 117065.83 - # self.assertAlmostEqual(r["outputs"]["GHP"]["ghx_residual_value_present_value"], 117065.83, delta=500) - - # def test_centralghp(self): - # post_file = os.path.join('reoptjl', 'test', 'posts', 'central_plant_ghp.json') - # post = json.load(open(post_file, 'r')) - - # # Call http.jl /reopt to run the central plant GHP scenario and get results for defaults from julia checking - # resp = self.api_client.post('/v3/job/', format='json', data=post) - # self.assertHttpCreated(resp) - # r = json.loads(resp.content) - # run_uuid = r.get('run_uuid') - - # resp = self.api_client.get(f'/v3/job/{run_uuid}/results') - # r = json.loads(resp.content) - - # self.assertAlmostEqual(r["outputs"]["Financial"]["lifecycle_capital_costs"], 1046066.8, delta=1000) \ No newline at end of file + inputs_steamturbine_defaults = { + "prime_mover": "steam_turbine", + "avg_boiler_fuel_load_mmbtu_per_hour": avg_fuel_load + } + + # Call to the django view endpoint /chp_defaults which calls the http.jl endpoint + resp = self.api_client.get(f'/v3/chp_defaults', data=inputs_steamturbine_defaults) + view_response = json.loads(resp.content) + + for key in view_response["default_inputs"].keys(): + # skip this key because its NaN in REoptInputs but is populated in /chp_defaults response. + if key != "inlet_steam_temperature_degF": + if post["SteamTurbine"].get(key) is None: # Check that default got assigned consistent with /chp_defaults + self.assertEquals(inputs_steamturbine[key], view_response["default_inputs"][key]) + else: # Make sure we didn't overwrite user-input + self.assertEquals(inputs_steamturbine[key], post["SteamTurbine"][key]) + + def test_hybridghp(self): + post_file = os.path.join('reoptjl', 'test', 'posts', 'hybrid_ghp.json') + post = json.load(open(post_file, 'r')) + + post['GHP']['ghpghx_inputs'][0]['hybrid_ghx_sizing_method'] = 'Automatic' + post['GHP']['avoided_capex_by_ghp_present_value'] = 1.0e6 + post['GHP']['ghx_useful_life_years'] = 35 + + # Call http.jl /reopt to run SteamTurbine scenario and get results for defaults from julia checking + resp = self.api_client.post('/v3/job/', format='json', data=post) + self.assertHttpCreated(resp) + r = json.loads(resp.content) + run_uuid = r.get('run_uuid') + + resp = self.api_client.get(f'/v3/job/{run_uuid}/results') + r = json.loads(resp.content) + + # calculated_ghx_residual_value 117065.83 + self.assertAlmostEqual(r["outputs"]["GHP"]["ghx_residual_value_present_value"], 117065.83, delta=500) + + def test_centralghp(self): + post_file = os.path.join('reoptjl', 'test', 'posts', 'central_plant_ghp.json') + post = json.load(open(post_file, 'r')) + + # Call http.jl /reopt to run the central plant GHP scenario and get results for defaults from julia checking + resp = self.api_client.post('/v3/job/', format='json', data=post) + self.assertHttpCreated(resp) + r = json.loads(resp.content) + run_uuid = r.get('run_uuid') + + resp = self.api_client.get(f'/v3/job/{run_uuid}/results') + r = json.loads(resp.content) + + self.assertAlmostEqual(r["outputs"]["Financial"]["lifecycle_capital_costs"], 1046066.8, delta=1000) \ No newline at end of file diff --git a/reoptjl/test/test_validator.py b/reoptjl/test/test_validator.py index 0554e2005..7f73fdc06 100644 --- a/reoptjl/test/test_validator.py +++ b/reoptjl/test/test_validator.py @@ -13,334 +13,334 @@ def setUp(self): post_file = os.path.join('reoptjl', 'test', 'posts', 'validator_post.json') self.post = json.load(open(post_file, 'r')) - # def test_elec_load_profile_length_validation_and_resampling(self): - # """ - # try different lengths of load profiles, where the following are valid: - # - 8760 (hourly) - # - 17520 (30 min) - # - 35040 (15 min) - # also confirm that up/down-sampling is working. - # :return: None - # """ - # good_lengths = [8760, 17520, 35040] - # bad_lengths = [8759, 17521] - - # for length in bad_lengths + good_lengths: - # post = copy.deepcopy(self.post) - # post["APIMeta"]["run_uuid"] = uuid.uuid4() - # post['ElectricLoad']['loads_kw'] = list(range(length)) - # post['ElectricLoad']['critical_loads_kw'] = list(range(length)) - # validator = InputValidator(post) - # validator.clean() - # validator.clean_fields() - # validator.cross_clean() - - # if length in good_lengths: - # self.assertEquals(validator.is_valid, True) - - # if length > 8760: # check downsampling - # self.assertEquals(len(validator.models["ElectricLoad"].loads_kw), 8760) - # self.assertEquals(len(validator.models["ElectricLoad"].critical_loads_kw), 8760) - # assert("resampled inputs" in validator.messages) - - # elif length in bad_lengths: - # self.assertEquals(validator.is_valid, False) - # assert('Invalid length' in validator.validation_errors['ElectricLoad']['loads_kw']) - # assert('Invalid length' in validator.validation_errors['ElectricLoad']['critical_loads_kw']) - - # # check upsampling - # for time_steps_per_hour in [2, 4]: - # post = copy.deepcopy(self.post) - # post["APIMeta"]["run_uuid"] = uuid.uuid4() - # post['ElectricLoad']['loads_kw'] = list(range(8760)) - # post['ElectricLoad']['critical_loads_kw'] = list(range(8760)) - # post['Settings']['time_steps_per_hour'] = time_steps_per_hour - # validator = InputValidator(post) - # validator.clean() - # validator.clean_fields() - # validator.cross_clean() - # self.assertEquals(validator.is_valid, True) - # self.assertEquals(len(validator.models["ElectricLoad"].loads_kw), time_steps_per_hour*8760) - # self.assertEquals(len(validator.models["ElectricLoad"].critical_loads_kw), time_steps_per_hour*8760) - - # def test_bad_blended_profile_inputs(self): - # post = copy.deepcopy(self.post) - # del(post["ElectricLoad"]["doe_reference_name"]) - # post["ElectricLoad"]["blended_doe_reference_names"] = ["badname", "LargeOffice"] - # post["ElectricLoad"]["blended_doe_reference_percents"] = [1.5] - # validator = InputValidator(post) - # validator.clean_fields() - - # assert("'badname' is not a valid choice" - # in validator.validation_errors['ElectricLoad']['blended_doe_reference_names'][0]) - # assert("Ensure this value is less than or equal to 1.0" in - # validator.validation_errors['ElectricLoad']['blended_doe_reference_percents'][0]) - - # post["ElectricLoad"]["blended_doe_reference_names"] = ["MediumOffice", "LargeOffice"] - # post["ElectricLoad"]["blended_doe_reference_percents"] = [0.5] - # post["APIMeta"]["run_uuid"] = uuid.uuid4() - # validator = InputValidator(post) - # validator.clean_fields() - # validator.clean() - - # assert("The number of blended_doe_reference_names must equal the number of blended_doe_reference_percents" in - # validator.validation_errors['ElectricLoad']['blended_doe_reference_names'][0]) - # assert("Sum must = 1.0." in - # validator.validation_errors['ElectricLoad']['blended_doe_reference_percents'][0]) - - # def test_off_grid_defaults_overrides(self): - # post_file = os.path.join('reoptjl', 'test', 'posts', 'off_grid_validations.json') - # post = json.load(open(post_file, 'r')) + def test_elec_load_profile_length_validation_and_resampling(self): + """ + try different lengths of load profiles, where the following are valid: + - 8760 (hourly) + - 17520 (30 min) + - 35040 (15 min) + also confirm that up/down-sampling is working. + :return: None + """ + good_lengths = [8760, 17520, 35040] + bad_lengths = [8759, 17521] + + for length in bad_lengths + good_lengths: + post = copy.deepcopy(self.post) + post["APIMeta"]["run_uuid"] = uuid.uuid4() + post['ElectricLoad']['loads_kw'] = list(range(length)) + post['ElectricLoad']['critical_loads_kw'] = list(range(length)) + validator = InputValidator(post) + validator.clean() + validator.clean_fields() + validator.cross_clean() + + if length in good_lengths: + self.assertEquals(validator.is_valid, True) + + if length > 8760: # check downsampling + self.assertEquals(len(validator.models["ElectricLoad"].loads_kw), 8760) + self.assertEquals(len(validator.models["ElectricLoad"].critical_loads_kw), 8760) + assert("resampled inputs" in validator.messages) + + elif length in bad_lengths: + self.assertEquals(validator.is_valid, False) + assert('Invalid length' in validator.validation_errors['ElectricLoad']['loads_kw']) + assert('Invalid length' in validator.validation_errors['ElectricLoad']['critical_loads_kw']) + + # check upsampling + for time_steps_per_hour in [2, 4]: + post = copy.deepcopy(self.post) + post["APIMeta"]["run_uuid"] = uuid.uuid4() + post['ElectricLoad']['loads_kw'] = list(range(8760)) + post['ElectricLoad']['critical_loads_kw'] = list(range(8760)) + post['Settings']['time_steps_per_hour'] = time_steps_per_hour + validator = InputValidator(post) + validator.clean() + validator.clean_fields() + validator.cross_clean() + self.assertEquals(validator.is_valid, True) + self.assertEquals(len(validator.models["ElectricLoad"].loads_kw), time_steps_per_hour*8760) + self.assertEquals(len(validator.models["ElectricLoad"].critical_loads_kw), time_steps_per_hour*8760) + + def test_bad_blended_profile_inputs(self): + post = copy.deepcopy(self.post) + del(post["ElectricLoad"]["doe_reference_name"]) + post["ElectricLoad"]["blended_doe_reference_names"] = ["badname", "LargeOffice"] + post["ElectricLoad"]["blended_doe_reference_percents"] = [1.5] + validator = InputValidator(post) + validator.clean_fields() + + assert("'badname' is not a valid choice" + in validator.validation_errors['ElectricLoad']['blended_doe_reference_names'][0]) + assert("Ensure this value is less than or equal to 1.0" in + validator.validation_errors['ElectricLoad']['blended_doe_reference_percents'][0]) + + post["ElectricLoad"]["blended_doe_reference_names"] = ["MediumOffice", "LargeOffice"] + post["ElectricLoad"]["blended_doe_reference_percents"] = [0.5] + post["APIMeta"]["run_uuid"] = uuid.uuid4() + validator = InputValidator(post) + validator.clean_fields() + validator.clean() + + assert("The number of blended_doe_reference_names must equal the number of blended_doe_reference_percents" in + validator.validation_errors['ElectricLoad']['blended_doe_reference_names'][0]) + assert("Sum must = 1.0." in + validator.validation_errors['ElectricLoad']['blended_doe_reference_percents'][0]) + + def test_off_grid_defaults_overrides(self): + post_file = os.path.join('reoptjl', 'test', 'posts', 'off_grid_validations.json') + post = json.load(open(post_file, 'r')) - # post["APIMeta"]["run_uuid"] = uuid.uuid4() - - # validator = InputValidator(post) - # validator.clean_fields() - # validator.clean() - # validator.cross_clean() - # self.assertEquals(validator.is_valid, True) - - # self.assertAlmostEqual(validator.models["Wind"].operating_reserve_required_fraction, 0.5) - # self.assertAlmostEqual(validator.models["PV"].operating_reserve_required_fraction, 0.25) - # self.assertEqual(validator.models["Wind"].installed_cost_per_kw, 4760.0) # set based on size_class - - # self.assertAlmostEqual(validator.models["ElectricLoad"].operating_reserve_required_fraction, 0.1) - # self.assertAlmostEqual(validator.models["ElectricLoad"].critical_load_fraction, 1.0) - # self.assertAlmostEqual(validator.models["ElectricLoad"].min_load_met_annual_fraction, 0.99999) - - # self.assertAlmostEqual(validator.models["Generator"].installed_cost_per_kw, 880) - # self.assertAlmostEqual(validator.models["Generator"].om_cost_per_kw, 10) - # self.assertAlmostEqual(validator.models["Generator"].fuel_avail_gal, 1.0e9) - # self.assertAlmostEqual(validator.models["Generator"].min_turn_down_fraction, 0.15) - # self.assertAlmostEqual(validator.models["Generator"].replacement_year, 10) - # self.assertAlmostEqual(validator.models["Generator"].replace_cost_per_kw, validator.models["Generator"].installed_cost_per_kw) - - # ## Test that some defaults can be overriden below - - # post["ElectricLoad"]["operating_reserve_required_fraction"] = 0.2 - # post["ElectricLoad"]["critical_load_fraction"] = 0.95 # cant override - # post["ElectricLoad"]["min_load_met_annual_fraction"] = 0.95 + post["APIMeta"]["run_uuid"] = uuid.uuid4() + + validator = InputValidator(post) + validator.clean_fields() + validator.clean() + validator.cross_clean() + self.assertEquals(validator.is_valid, True) + + self.assertAlmostEqual(validator.models["Wind"].operating_reserve_required_fraction, 0.5) + self.assertAlmostEqual(validator.models["PV"].operating_reserve_required_fraction, 0.25) + self.assertEqual(validator.models["Wind"].installed_cost_per_kw, 4760.0) # set based on size_class + + self.assertAlmostEqual(validator.models["ElectricLoad"].operating_reserve_required_fraction, 0.1) + self.assertAlmostEqual(validator.models["ElectricLoad"].critical_load_fraction, 1.0) + self.assertAlmostEqual(validator.models["ElectricLoad"].min_load_met_annual_fraction, 0.99999) + + self.assertAlmostEqual(validator.models["Generator"].installed_cost_per_kw, 880) + self.assertAlmostEqual(validator.models["Generator"].om_cost_per_kw, 10) + self.assertAlmostEqual(validator.models["Generator"].fuel_avail_gal, 1.0e9) + self.assertAlmostEqual(validator.models["Generator"].min_turn_down_fraction, 0.15) + self.assertAlmostEqual(validator.models["Generator"].replacement_year, 10) + self.assertAlmostEqual(validator.models["Generator"].replace_cost_per_kw, validator.models["Generator"].installed_cost_per_kw) + + ## Test that some defaults can be overriden below + + post["ElectricLoad"]["operating_reserve_required_fraction"] = 0.2 + post["ElectricLoad"]["critical_load_fraction"] = 0.95 # cant override + post["ElectricLoad"]["min_load_met_annual_fraction"] = 0.95 - # post["Generator"]["om_cost_per_kw"] = 21 - # post["Generator"]["fuel_avail_gal"] = 10000 - # post["Generator"]["min_turn_down_fraction"] = 0.14 - # post["Generator"]["replacement_year"] = 7 - # post["Generator"]["replace_cost_per_kw"] = 200 - - # post["Wind"]["operating_reserve_required_fraction"] = 0.35 - # post["PV"]["operating_reserve_required_fraction"] = 0.35 + post["Generator"]["om_cost_per_kw"] = 21 + post["Generator"]["fuel_avail_gal"] = 10000 + post["Generator"]["min_turn_down_fraction"] = 0.14 + post["Generator"]["replacement_year"] = 7 + post["Generator"]["replace_cost_per_kw"] = 200 + + post["Wind"]["operating_reserve_required_fraction"] = 0.35 + post["PV"]["operating_reserve_required_fraction"] = 0.35 - # post["APIMeta"]["run_uuid"] = uuid.uuid4() + post["APIMeta"]["run_uuid"] = uuid.uuid4() - # validator = InputValidator(post) - # validator.clean_fields() - # validator.clean() - # validator.cross_clean() - # self.assertEquals(validator.is_valid, True) + validator = InputValidator(post) + validator.clean_fields() + validator.clean() + validator.cross_clean() + self.assertEquals(validator.is_valid, True) - # self.assertAlmostEqual(validator.models["PV"].operating_reserve_required_fraction, 0.35) - # self.assertAlmostEqual(validator.models["Wind"].operating_reserve_required_fraction, 0.35) + self.assertAlmostEqual(validator.models["PV"].operating_reserve_required_fraction, 0.35) + self.assertAlmostEqual(validator.models["Wind"].operating_reserve_required_fraction, 0.35) - # self.assertAlmostEqual(validator.models["ElectricLoad"].operating_reserve_required_fraction, 0.2) - # self.assertAlmostEqual(validator.models["ElectricLoad"].critical_load_fraction, 1.0) # cant override - # self.assertAlmostEqual(validator.models["ElectricLoad"].min_load_met_annual_fraction, 0.95) + self.assertAlmostEqual(validator.models["ElectricLoad"].operating_reserve_required_fraction, 0.2) + self.assertAlmostEqual(validator.models["ElectricLoad"].critical_load_fraction, 1.0) # cant override + self.assertAlmostEqual(validator.models["ElectricLoad"].min_load_met_annual_fraction, 0.95) - # self.assertAlmostEqual(validator.models["Generator"].om_cost_per_kw, 21) - # self.assertAlmostEqual(validator.models["Generator"].fuel_avail_gal, 10000) - # self.assertAlmostEqual(validator.models["Generator"].min_turn_down_fraction, 0.14) - # self.assertAlmostEqual(validator.models["Generator"].replacement_year, 7) - # self.assertAlmostEqual(validator.models["Generator"].replace_cost_per_kw, 200.0) + self.assertAlmostEqual(validator.models["Generator"].om_cost_per_kw, 21) + self.assertAlmostEqual(validator.models["Generator"].fuel_avail_gal, 10000) + self.assertAlmostEqual(validator.models["Generator"].min_turn_down_fraction, 0.14) + self.assertAlmostEqual(validator.models["Generator"].replacement_year, 7) + self.assertAlmostEqual(validator.models["Generator"].replace_cost_per_kw, 200.0) - # def existingboiler_boiler_validation(self): + def existingboiler_boiler_validation(self): - # """ - # Validate clean, cross-clean methods are working as expected - # """ - # post_file = os.path.join('reoptjl', 'test', 'posts', 'existing_boiler.json') - # post = json.load(open(post_file, 'r')) + """ + Validate clean, cross-clean methods are working as expected + """ + post_file = os.path.join('reoptjl', 'test', 'posts', 'existing_boiler.json') + post = json.load(open(post_file, 'r')) - # post["APIMeta"]["run_uuid"] = uuid.uuid4() + post["APIMeta"]["run_uuid"] = uuid.uuid4() - # validator = InputValidator(post) - # validator.clean_fields() - # validator.clean() - # validator.cross_clean() - # self.assertEquals(validator.is_valid, True) + validator = InputValidator(post) + validator.clean_fields() + validator.clean() + validator.cross_clean() + self.assertEquals(validator.is_valid, True) - # self.assertAlmostEqual(validator.models["ExistingBoiler"].emissions_factor_lb_CO2_per_mmbtu, 117, places=-1) - # self.assertAlmostEqual(len(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760) - # self.assertAlmostEqual(sum(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760*0.5) + self.assertAlmostEqual(validator.models["ExistingBoiler"].emissions_factor_lb_CO2_per_mmbtu, 117, places=-1) + self.assertAlmostEqual(len(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760) + self.assertAlmostEqual(sum(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760*0.5) - # self.assertAlmostEqual(len(validator.models["Boiler"].fuel_cost_per_mmbtu), 8760) - # self.assertAlmostEqual(sum(validator.models["Boiler"].fuel_cost_per_mmbtu), 8760*0.25) + self.assertAlmostEqual(len(validator.models["Boiler"].fuel_cost_per_mmbtu), 8760) + self.assertAlmostEqual(sum(validator.models["Boiler"].fuel_cost_per_mmbtu), 8760*0.25) - # # Ensure Hot Thermal Storage System parameter is loaded from json - # self.assertAlmostEqual(validator.models["HotThermalStorage"].max_gal, 2500.0) - - # # Validate 12 month fuel cost vector gets scaled correctly - - # post["ExistingBoiler"]["fuel_cost_per_mmbtu"] = [1,2,1,1,1,1,1,1,1,1,1,1] - # post["Boiler"]["fuel_cost_per_mmbtu"] = [0.5,1,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5] - - # post["APIMeta"]["run_uuid"] = uuid.uuid4() - - # validator = InputValidator(post) - # validator.clean_fields() - # validator.clean() - # validator.cross_clean() - # self.assertEquals(validator.is_valid, True) - - # self.assertAlmostEqual(len(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760) - # self.assertEqual(sum(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 9432.0) - # self.assertAlmostEqual(len(validator.models["Boiler"].fuel_cost_per_mmbtu), 8760) - # self.assertEqual(sum(validator.models["Boiler"].fuel_cost_per_mmbtu), 9432.0*0.5) - - # def test_missing_required_keys(self): - # #start with on_grid, and keep all keys - # required_ongrid_object_names = [ - # "Site", "ElectricLoad", "ElectricTariff" - # ] - # required_offgrid_object_names = [ - # "Site", "ElectricLoad" - # ] - # #prior to removal of keys, test lack or errors of validator with full inputs - # post = copy.deepcopy(self.post) - # post["APIMeta"]["run_uuid"] = uuid.uuid4() - # post["Settings"]["off_grid_flag"] = False - # validator = InputValidator(post) - # for key in required_ongrid_object_names: - # assert (key not in validator.validation_errors.keys()) - # post = copy.deepcopy(self.post) - # post["APIMeta"]["run_uuid"] = uuid.uuid4() - # post["Settings"]["off_grid_flag"] = True - # validator = InputValidator(post) - # for key in required_ongrid_object_names: - # assert (key not in validator.validation_errors.keys()) - # #test ongrid removal of all ongrid keys, trigger an error for all required ongrid inputs - # post = copy.deepcopy(self.post) - # post["APIMeta"]["run_uuid"] = uuid.uuid4() - # post["Settings"]["off_grid_flag"] = False - # for key in required_ongrid_object_names: - # del post[key] - # validator = InputValidator(post) - # for key in required_ongrid_object_names: - # assert("Missing required inputs." in validator.validation_errors[key]) - # #test offgrid removal of all offgrid keys, should trigger an error for required offgrid but not ongrid requirements - # post = copy.deepcopy(self.post) - # post["APIMeta"]["run_uuid"] = uuid.uuid4() - # post["Settings"]["off_grid_flag"] = True - # for key in required_ongrid_object_names: - # del post[key] - # validator = InputValidator(post) - # for key in required_ongrid_object_names: - # if key in required_offgrid_object_names: - # assert("Missing required inputs." in validator.validation_errors[key]) - # else: - # assert(key not in validator.validation_errors.keys()) - - # # check for missing CHP inputs - # post = copy.deepcopy(self.post) - # post["APIMeta"]["run_uuid"] = uuid.uuid4() - # post["CHP"].pop("fuel_cost_per_mmbtu") - # validator = InputValidator(post) - # validator.clean_fields() - # validator.clean() - # validator.cross_clean() - # assert("required inputs" in validator.validation_errors["CHP"].keys()) - - # def test_multiple_outages_validation(self): - # """ - # ensure that validation of multiple outages post works as expected and catches errors - # """ - # post_file = os.path.join('reoptjl', 'test', 'posts', 'outage.json') - # outage_post = json.load(open(post_file, 'r')) - # outage_post["APIMeta"] = {"run_uuid": uuid.uuid4()} - # outage_post["Meta"] = { - # "description": "test description", - # "address": "test address" - # } - # validator = InputValidator(outage_post) - # validator.clean_fields() - # validator.clean() - # validator.cross_clean() - # self.assertEquals(validator.is_valid, True) - - # # test mismatched length - # post = copy.deepcopy(outage_post) - # post["ElectricUtility"]["outage_durations"] = [10,20,30,40] - # post["ElectricUtility"]["outage_probabilities"] = [0.8,0.2] - # post["APIMeta"]["run_uuid"] = uuid.uuid4() - # validator = InputValidator(post) - # validator.clean() - # assert("mismatched length" in validator.validation_errors["ElectricUtility"].keys()) - - # # test missing outage_durations - # post = copy.deepcopy(outage_post) - # post["ElectricUtility"].pop("outage_durations") - # post["APIMeta"]["run_uuid"] = uuid.uuid4() - # validator = InputValidator(post) - # validator.clean() - # assert("missing required inputs" in validator.validation_errors["ElectricUtility"].keys()) - - # # test sum of outage_probabilities != 1 - # post = copy.deepcopy(outage_post) - # post["ElectricUtility"]["outage_durations"] = [10,20] - # post["ElectricUtility"]["outage_probabilities"] = [0.5,0.6] - # post["APIMeta"]["run_uuid"] = uuid.uuid4() - # validator = InputValidator(post) - # validator.clean() - # assert("outage_probabilities" in validator.validation_errors["ElectricUtility"].keys()) - - # # test missing outage_probabilities - # post = copy.deepcopy(outage_post) - # post["ElectricUtility"]["outage_durations"] = [10,20] - # post["ElectricUtility"].pop("outage_probabilities") - # post["APIMeta"]["run_uuid"] = uuid.uuid4() - # validator = InputValidator(post) - # validator.clean_fields() - # validator.clean() - # validator.cross_clean() - # self.assertEquals(validator.models["ElectricUtility"].outage_probabilities, [0.5, 0.5]) - # self.assertEquals(validator.is_valid, True) - - # def test_pv_tilt_defaults(self): - # post = copy.deepcopy(self.post) - # post["APIMeta"]["run_uuid"] = uuid.uuid4() - # del(post["ElectricStorage"]) - # del(post["CHP"]) - # del(post["PV"]["tilt"]) - # validator = InputValidator(post) - # validator.clean_fields() - # validator.clean() - # validator.cross_clean() - # self.assertEquals(validator.models["PV"].tilt, 20) - - # post["APIMeta"]["run_uuid"] = uuid.uuid4() - # post["PV"]["array_type"] = 2 - # validator = InputValidator(post) - # validator.clean_fields() - # validator.clean() - # validator.cross_clean() - # self.assertAlmostEquals(validator.models["PV"].tilt, 0) - - # def boiler_validation(self): - # """ - # Validate clean, cross-clean methods are working as expected - # """ - # post_file = os.path.join('job', 'test', 'posts', 'boiler_test.json') - # post = json.load(open(post_file, 'r')) - - # post["APIMeta"]["run_uuid"] = uuid.uuid4() - - # validator = InputValidator(post) - # validator.clean_fields() - # validator.clean() - # validator.cross_clean() - # self.assertEquals(validator.is_valid, True) - - # # Update with Boiler test fields - # # self.assertAlmostEqual(validator.models["ExistingBoiler"].emissions_factor_lb_CO2_per_mmbtu, 117, places=-1) - # # self.assertAlmostEqual(len(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760) - # # self.assertAlmostEqual(sum(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760*0.5) + # Ensure Hot Thermal Storage System parameter is loaded from json + self.assertAlmostEqual(validator.models["HotThermalStorage"].max_gal, 2500.0) + + # Validate 12 month fuel cost vector gets scaled correctly + + post["ExistingBoiler"]["fuel_cost_per_mmbtu"] = [1,2,1,1,1,1,1,1,1,1,1,1] + post["Boiler"]["fuel_cost_per_mmbtu"] = [0.5,1,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5] + + post["APIMeta"]["run_uuid"] = uuid.uuid4() + + validator = InputValidator(post) + validator.clean_fields() + validator.clean() + validator.cross_clean() + self.assertEquals(validator.is_valid, True) + + self.assertAlmostEqual(len(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760) + self.assertEqual(sum(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 9432.0) + self.assertAlmostEqual(len(validator.models["Boiler"].fuel_cost_per_mmbtu), 8760) + self.assertEqual(sum(validator.models["Boiler"].fuel_cost_per_mmbtu), 9432.0*0.5) + + def test_missing_required_keys(self): + #start with on_grid, and keep all keys + required_ongrid_object_names = [ + "Site", "ElectricLoad", "ElectricTariff" + ] + required_offgrid_object_names = [ + "Site", "ElectricLoad" + ] + #prior to removal of keys, test lack or errors of validator with full inputs + post = copy.deepcopy(self.post) + post["APIMeta"]["run_uuid"] = uuid.uuid4() + post["Settings"]["off_grid_flag"] = False + validator = InputValidator(post) + for key in required_ongrid_object_names: + assert (key not in validator.validation_errors.keys()) + post = copy.deepcopy(self.post) + post["APIMeta"]["run_uuid"] = uuid.uuid4() + post["Settings"]["off_grid_flag"] = True + validator = InputValidator(post) + for key in required_ongrid_object_names: + assert (key not in validator.validation_errors.keys()) + #test ongrid removal of all ongrid keys, trigger an error for all required ongrid inputs + post = copy.deepcopy(self.post) + post["APIMeta"]["run_uuid"] = uuid.uuid4() + post["Settings"]["off_grid_flag"] = False + for key in required_ongrid_object_names: + del post[key] + validator = InputValidator(post) + for key in required_ongrid_object_names: + assert("Missing required inputs." in validator.validation_errors[key]) + #test offgrid removal of all offgrid keys, should trigger an error for required offgrid but not ongrid requirements + post = copy.deepcopy(self.post) + post["APIMeta"]["run_uuid"] = uuid.uuid4() + post["Settings"]["off_grid_flag"] = True + for key in required_ongrid_object_names: + del post[key] + validator = InputValidator(post) + for key in required_ongrid_object_names: + if key in required_offgrid_object_names: + assert("Missing required inputs." in validator.validation_errors[key]) + else: + assert(key not in validator.validation_errors.keys()) + + # check for missing CHP inputs + post = copy.deepcopy(self.post) + post["APIMeta"]["run_uuid"] = uuid.uuid4() + post["CHP"].pop("fuel_cost_per_mmbtu") + validator = InputValidator(post) + validator.clean_fields() + validator.clean() + validator.cross_clean() + assert("required inputs" in validator.validation_errors["CHP"].keys()) + + def test_multiple_outages_validation(self): + """ + ensure that validation of multiple outages post works as expected and catches errors + """ + post_file = os.path.join('reoptjl', 'test', 'posts', 'outage.json') + outage_post = json.load(open(post_file, 'r')) + outage_post["APIMeta"] = {"run_uuid": uuid.uuid4()} + outage_post["Meta"] = { + "description": "test description", + "address": "test address" + } + validator = InputValidator(outage_post) + validator.clean_fields() + validator.clean() + validator.cross_clean() + self.assertEquals(validator.is_valid, True) + + # test mismatched length + post = copy.deepcopy(outage_post) + post["ElectricUtility"]["outage_durations"] = [10,20,30,40] + post["ElectricUtility"]["outage_probabilities"] = [0.8,0.2] + post["APIMeta"]["run_uuid"] = uuid.uuid4() + validator = InputValidator(post) + validator.clean() + assert("mismatched length" in validator.validation_errors["ElectricUtility"].keys()) + + # test missing outage_durations + post = copy.deepcopy(outage_post) + post["ElectricUtility"].pop("outage_durations") + post["APIMeta"]["run_uuid"] = uuid.uuid4() + validator = InputValidator(post) + validator.clean() + assert("missing required inputs" in validator.validation_errors["ElectricUtility"].keys()) + + # test sum of outage_probabilities != 1 + post = copy.deepcopy(outage_post) + post["ElectricUtility"]["outage_durations"] = [10,20] + post["ElectricUtility"]["outage_probabilities"] = [0.5,0.6] + post["APIMeta"]["run_uuid"] = uuid.uuid4() + validator = InputValidator(post) + validator.clean() + assert("outage_probabilities" in validator.validation_errors["ElectricUtility"].keys()) + + # test missing outage_probabilities + post = copy.deepcopy(outage_post) + post["ElectricUtility"]["outage_durations"] = [10,20] + post["ElectricUtility"].pop("outage_probabilities") + post["APIMeta"]["run_uuid"] = uuid.uuid4() + validator = InputValidator(post) + validator.clean_fields() + validator.clean() + validator.cross_clean() + self.assertEquals(validator.models["ElectricUtility"].outage_probabilities, [0.5, 0.5]) + self.assertEquals(validator.is_valid, True) + + def test_pv_tilt_defaults(self): + post = copy.deepcopy(self.post) + post["APIMeta"]["run_uuid"] = uuid.uuid4() + del(post["ElectricStorage"]) + del(post["CHP"]) + del(post["PV"]["tilt"]) + validator = InputValidator(post) + validator.clean_fields() + validator.clean() + validator.cross_clean() + self.assertEquals(validator.models["PV"].tilt, 20) + + post["APIMeta"]["run_uuid"] = uuid.uuid4() + post["PV"]["array_type"] = 2 + validator = InputValidator(post) + validator.clean_fields() + validator.clean() + validator.cross_clean() + self.assertAlmostEquals(validator.models["PV"].tilt, 0) + + def boiler_validation(self): + """ + Validate clean, cross-clean methods are working as expected + """ + post_file = os.path.join('job', 'test', 'posts', 'boiler_test.json') + post = json.load(open(post_file, 'r')) + + post["APIMeta"]["run_uuid"] = uuid.uuid4() + + validator = InputValidator(post) + validator.clean_fields() + validator.clean() + validator.cross_clean() + self.assertEquals(validator.is_valid, True) + + # Update with Boiler test fields + # self.assertAlmostEqual(validator.models["ExistingBoiler"].emissions_factor_lb_CO2_per_mmbtu, 117, places=-1) + # self.assertAlmostEqual(len(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760) + # self.assertAlmostEqual(sum(validator.models["ExistingBoiler"].fuel_cost_per_mmbtu), 8760*0.5) diff --git a/resilience_stats/tests/test_erp.py b/resilience_stats/tests/test_erp.py index b25871776..8181f4290 100644 --- a/resilience_stats/tests/test_erp.py +++ b/resilience_stats/tests/test_erp.py @@ -74,125 +74,125 @@ def test_erp_long_duration_battery(self): for i in range(99):#min(length(simresults["probs_of_surviving"]), reliability_inputs["max_outage_duration"]) self.assertAlmostEqual(results_sim["mean_cumulative_survival_by_duration"][i], expected_result[i], places=4) - # def test_erp_large_battery(self): - # """ - # Tests calling ERP with PV, a small generator, and very large battery such that final survivial should be 1. - # This is the same as the first test in the "Backup Generator Reliability" testset in the REopt Julia package. - # """ - # post_sim_large_stor = json.load(open(self.post_sim_large_stor, 'rb')) - - # resp = self.get_response_sim(post_sim_large_stor) - # self.assertHttpCreated(resp) - # r_sim = json.loads(resp.content) - # erp_run_uuid = r_sim.get('run_uuid') - - # resp = self.get_results_sim(erp_run_uuid) - # results = json.loads(resp.content) - - # self.assertAlmostEqual(results["outputs"]["mean_cumulative_survival_final_time_step"], 1.0, places=4) - - # def test_erp_with_reopt_run_uuid(self): - # """ - # Tests calling ERP with a REopt run_uuid provided, but all inputs from REopt results overrided. - # This ends up being the same as the second to last test in the "Backup Generator Reliability" testset in the REopt Julia package. - # Then tests calling ERP with the same REopt run_uuid provided, but only the necessary additional ERP inputs provided. - # This used to be the same as the last test in the "Backup Generator Reliability" testset in the REopt Julia package, but need to make consistent again. - # """ - - # data = json.load(open(self.post_opt_gens_batt_pv_wind, 'rb')) - # data["Settings"]["optimality_tolerance"] = 1.0e-2 # REopt_tol per line 38. - # resp = self.get_response_opt(data) - # self.assertHttpCreated(resp) - # r_opt = json.loads(resp.content) - # reopt_run_uuid = r_opt.get('run_uuid') - - # assert(reopt_run_uuid is not None) - # post_sim = json.load(open(self.post_sim_gens_batt_pv_wind, 'rb')) - # post_sim["reopt_run_uuid"] = reopt_run_uuid - # post_sim["ElectricStorage"]["starting_soc_series_fraction"] = 8760 * [1] - - # resp = self.get_response_sim(post_sim) - # self.assertHttpCreated(resp) - # r_sim = json.loads(resp.content) - # erp_run_uuid = r_sim.get('run_uuid') - - # resp = self.get_results_sim(erp_run_uuid) - # results = json.loads(resp.content) - # self.assertAlmostEqual(results["outputs"]["unlimited_fuel_cumulative_survival_final_time_step"][0], 0.858756, places=4) - # self.assertAlmostEqual(results["outputs"]["cumulative_survival_final_time_step"][0], 0.858756, places=4) - # self.assertAlmostEqual(results["outputs"]["mean_cumulative_survival_final_time_step"], 0.904242, places=4) - - # #remove inputs that override REopt results and run again - # for model, field in [ - # ("Generator","size_kw"), - # ("PrimeGenerator","size_kw"), - # ("ElectricStorage","size_kw"), - # ("ElectricStorage","size_kwh"), - # ("ElectricStorage","charge_efficiency"), - # ("ElectricStorage","discharge_efficiency"), - # ("ElectricStorage","starting_soc_series_fraction"), - # ("PV","size_kw"), - # ("PV","production_factor_series"), - # ("Wind","size_kw"), - # ("Wind","production_factor_series"), - # ("Outage","critical_loads_kw"), - # ("Outage","max_outage_duration") - # ]: - # post_sim.get(model,{}).pop(field, None) - - # # add minimum_soc_fraction input to be consistent with test in REopt.jl - # post_sim["ElectricStorage"]["minimum_soc_fraction"] = 0.2 + def test_erp_large_battery(self): + """ + Tests calling ERP with PV, a small generator, and very large battery such that final survivial should be 1. + This is the same as the first test in the "Backup Generator Reliability" testset in the REopt Julia package. + """ + post_sim_large_stor = json.load(open(self.post_sim_large_stor, 'rb')) + + resp = self.get_response_sim(post_sim_large_stor) + self.assertHttpCreated(resp) + r_sim = json.loads(resp.content) + erp_run_uuid = r_sim.get('run_uuid') + + resp = self.get_results_sim(erp_run_uuid) + results = json.loads(resp.content) + + self.assertAlmostEqual(results["outputs"]["mean_cumulative_survival_final_time_step"], 1.0, places=4) + + def test_erp_with_reopt_run_uuid(self): + """ + Tests calling ERP with a REopt run_uuid provided, but all inputs from REopt results overrided. + This ends up being the same as the second to last test in the "Backup Generator Reliability" testset in the REopt Julia package. + Then tests calling ERP with the same REopt run_uuid provided, but only the necessary additional ERP inputs provided. + This used to be the same as the last test in the "Backup Generator Reliability" testset in the REopt Julia package, but need to make consistent again. + """ + + data = json.load(open(self.post_opt_gens_batt_pv_wind, 'rb')) + data["Settings"]["optimality_tolerance"] = 1.0e-2 # REopt_tol per line 38. + resp = self.get_response_opt(data) + self.assertHttpCreated(resp) + r_opt = json.loads(resp.content) + reopt_run_uuid = r_opt.get('run_uuid') + + assert(reopt_run_uuid is not None) + post_sim = json.load(open(self.post_sim_gens_batt_pv_wind, 'rb')) + post_sim["reopt_run_uuid"] = reopt_run_uuid + post_sim["ElectricStorage"]["starting_soc_series_fraction"] = 8760 * [1] + + resp = self.get_response_sim(post_sim) + self.assertHttpCreated(resp) + r_sim = json.loads(resp.content) + erp_run_uuid = r_sim.get('run_uuid') + + resp = self.get_results_sim(erp_run_uuid) + results = json.loads(resp.content) + self.assertAlmostEqual(results["outputs"]["unlimited_fuel_cumulative_survival_final_time_step"][0], 0.858756, places=4) + self.assertAlmostEqual(results["outputs"]["cumulative_survival_final_time_step"][0], 0.858756, places=4) + self.assertAlmostEqual(results["outputs"]["mean_cumulative_survival_final_time_step"], 0.904242, places=4) + + #remove inputs that override REopt results and run again + for model, field in [ + ("Generator","size_kw"), + ("PrimeGenerator","size_kw"), + ("ElectricStorage","size_kw"), + ("ElectricStorage","size_kwh"), + ("ElectricStorage","charge_efficiency"), + ("ElectricStorage","discharge_efficiency"), + ("ElectricStorage","starting_soc_series_fraction"), + ("PV","size_kw"), + ("PV","production_factor_series"), + ("Wind","size_kw"), + ("Wind","production_factor_series"), + ("Outage","critical_loads_kw"), + ("Outage","max_outage_duration") + ]: + post_sim.get(model,{}).pop(field, None) + + # add minimum_soc_fraction input to be consistent with test in REopt.jl + post_sim["ElectricStorage"]["minimum_soc_fraction"] = 0.2 - # resp = self.get_response_sim(post_sim) - # self.assertHttpCreated(resp) - # r_sim = json.loads(resp.content) - # erp_run_uuid = r_sim.get('run_uuid') - - # resp = self.get_results_sim(erp_run_uuid) - # results = json.loads(resp.content) - # self.assertAlmostEqual(results["outputs"]["mean_cumulative_survival_by_duration"][23], 0.9661, delta=0.0015) - # self.assertAlmostEqual(results["outputs"]["cumulative_survival_final_time_step"][0], 0.962327, places=3) - # self.assertAlmostEqual(results["outputs"]["mean_cumulative_survival_final_time_step"], 0.9661, places=2) - - # def test_erp_with_no_opt(self): - # """ - # Tests calling ERP on it's own without providing a REopt run_uuid. - # Same as the second to last test in the "Backup Generator Reliability" testset in the REopt Julia package. - # """ + resp = self.get_response_sim(post_sim) + self.assertHttpCreated(resp) + r_sim = json.loads(resp.content) + erp_run_uuid = r_sim.get('run_uuid') + + resp = self.get_results_sim(erp_run_uuid) + results = json.loads(resp.content) + self.assertAlmostEqual(results["outputs"]["mean_cumulative_survival_by_duration"][23], 0.9661, delta=0.0015) + self.assertAlmostEqual(results["outputs"]["cumulative_survival_final_time_step"][0], 0.962327, places=3) + self.assertAlmostEqual(results["outputs"]["mean_cumulative_survival_final_time_step"], 0.9661, places=2) + + def test_erp_with_no_opt(self): + """ + Tests calling ERP on it's own without providing a REopt run_uuid. + Same as the second to last test in the "Backup Generator Reliability" testset in the REopt Julia package. + """ - # post_sim = json.load(open(self.post_sim_only, 'rb')) - - # resp = self.get_response_sim(post_sim) - # self.assertHttpCreated(resp) - # r_sim = json.loads(resp.content) - # #TODO: don't return run_uuid when there's a REoptFailedToStartError - # erp_run_uuid = r_sim.get('run_uuid') - - # resp = self.get_results_sim(erp_run_uuid) - # results = json.loads(resp.content) - - # self.assertAlmostEqual(results["outputs"]["mean_cumulative_survival_final_time_step"], 0.904242, places=4) #0.990784, places=4) - - # # Test that zero battery doesn't cause error - # post_sim["ElectricStorage"]["size_kwh"] = 0 - # post_sim["ElectricStorage"]["size_kwh"] = 0 - # resp = self.get_response_sim(post_sim) - # self.assertHttpCreated(resp) - # r_sim = json.loads(resp.content) - # erp_run_uuid = r_sim.get('run_uuid') - # resp = self.get_results_sim(erp_run_uuid) - # self.assertHttpOK(resp) - - # def test_erp_help_view(self): - # """ - # Tests hiting the erp/help url to get defaults and other info about inputs - # """ + post_sim = json.load(open(self.post_sim_only, 'rb')) + + resp = self.get_response_sim(post_sim) + self.assertHttpCreated(resp) + r_sim = json.loads(resp.content) + #TODO: don't return run_uuid when there's a REoptFailedToStartError + erp_run_uuid = r_sim.get('run_uuid') + + resp = self.get_results_sim(erp_run_uuid) + results = json.loads(resp.content) + + self.assertAlmostEqual(results["outputs"]["mean_cumulative_survival_final_time_step"], 0.904242, places=4) #0.990784, places=4) + + # Test that zero battery doesn't cause error + post_sim["ElectricStorage"]["size_kwh"] = 0 + post_sim["ElectricStorage"]["size_kwh"] = 0 + resp = self.get_response_sim(post_sim) + self.assertHttpCreated(resp) + r_sim = json.loads(resp.content) + erp_run_uuid = r_sim.get('run_uuid') + resp = self.get_results_sim(erp_run_uuid) + self.assertHttpOK(resp) + + def test_erp_help_view(self): + """ + Tests hiting the erp/help url to get defaults and other info about inputs + """ - # resp = self.get_help() - # self.assertHttpOK(resp) - # resp = json.loads(resp.content) + resp = self.get_help() + self.assertHttpOK(resp) + resp = json.loads(resp.content) - # resp = self.get_chp_defaults("recip_engine", True, 10000) - # self.assertHttpOK(resp) - # resp = json.loads(resp.content) + resp = self.get_chp_defaults("recip_engine", True, 10000) + self.assertHttpOK(resp) + resp = json.loads(resp.content) \ No newline at end of file diff --git a/resilience_stats/tests/test_new_post_endpoint.py b/resilience_stats/tests/test_new_post_endpoint.py index 291e6b05c..69262b687 100644 --- a/resilience_stats/tests/test_new_post_endpoint.py +++ b/resilience_stats/tests/test_new_post_endpoint.py @@ -27,20 +27,20 @@ def get_response_sim(self, data_sim): return self.api_client.post(self.reopt_base_sim, format='json', data=data_sim) - # def test_both_modules(self): - # """ - # temporary test setup for running an optimizatin problem that precedes the following test for new endpoint for outage simulation module. - # :return: - # """ - # data = json.load(open(self.post_opt, 'rb')) - # resp = self.get_response_opt(data) - # self.assertHttpCreated(resp) - # r_opt = json.loads(resp.content) - # run_uuid = r_opt.get('run_uuid') - - # assert(run_uuid is not None) - # post_sim = {"run_uuid": run_uuid, "bau": True} - # resp = self.get_response_sim(data_sim=post_sim) - # self.assertHttpCreated(resp) - # r_sim = json.loads(resp.content) - # # print("Response from outagesimjob:", r_sim) + def test_both_modules(self): + """ + temporary test setup for running an optimizatin problem that precedes the following test for new endpoint for outage simulation module. + :return: + """ + data = json.load(open(self.post_opt, 'rb')) + resp = self.get_response_opt(data) + self.assertHttpCreated(resp) + r_opt = json.loads(resp.content) + run_uuid = r_opt.get('run_uuid') + + assert(run_uuid is not None) + post_sim = {"run_uuid": run_uuid, "bau": True} + resp = self.get_response_sim(data_sim=post_sim) + self.assertHttpCreated(resp) + r_sim = json.loads(resp.content) + # print("Response from outagesimjob:", r_sim) diff --git a/resilience_stats/tests/test_resilience_stats.py b/resilience_stats/tests/test_resilience_stats.py index a0d495ff0..0023ff6f0 100644 --- a/resilience_stats/tests/test_resilience_stats.py +++ b/resilience_stats/tests/test_resilience_stats.py @@ -55,362 +55,362 @@ def readFiles(path): self.inputs1 = readFiles('timestep_1') self.inputs2 = readFiles('timestep_2') - # def test_outage_sim_no_diesel(self): - # """ - # For the case that no diesel generator is on site, outage simulation with load following strategy should have the - # same results as existing simulation's results. - # """ - # inputs = self.inputs - # inputs.update(diesel_kw=0, fuel_available=0, m=0, b=0) + def test_outage_sim_no_diesel(self): + """ + For the case that no diesel generator is on site, outage simulation with load following strategy should have the + same results as existing simulation's results. + """ + inputs = self.inputs + inputs.update(diesel_kw=0, fuel_available=0, m=0, b=0) - # # Output parse from existing simulation - # expected = { - # 'resilience_hours_min': 0, - # 'resilience_hours_max': 78, - # 'resilience_hours_avg': 10.23, - # "outage_durations": list(range(1, 79)), - # "probs_of_surviving": [0.8486, 0.7963, 0.7373, 0.6624, 0.59, 0.5194, 0.4533, 0.4007, 0.3583, 0.3231, 0.2933, - # 0.2691, 0.2471, 0.2297, 0.215, 0.2015, 0.1897, 0.1788, 0.1694, 0.1608, 0.153, 0.1454, - # 0.1381, 0.1308, 0.1247, 0.1184, 0.1122, 0.1065, 0.1013, 0.0968, 0.0927, 0.0887, 0.0847, - # 0.0807, 0.0767, 0.0727, 0.0687, 0.0648, 0.0607, 0.0562, 0.0516, 0.047, 0.0425, 0.0376, - # 0.0326, 0.0277, 0.0228, 0.0179, 0.0146, 0.0116, 0.0097, 0.0081, 0.0071, 0.0066, 0.0062, - # 0.0059, 0.0057, 0.0055, 0.0053, 0.005, 0.0048, 0.0046, 0.0043, 0.0041, 0.0039, 0.0037, - # 0.0032, 0.0027, 0.0023, 0.0018, 0.0014, 0.0009, 0.0007, 0.0006, 0.0005, 0.0003, 0.0002, - # 0.0001], - # "probs_of_surviving_by_month": [ - # [1.0, 0.7688, 0.7003, 0.6277, 0.5511, 0.4785, 0.4005, 0.3266, 0.2769, 0.2312, 0.1989, 0.1774, 0.168, - # 0.1586, 0.1519, 0.1452, 0.1358, 0.1263, 0.1169, 0.1075, 0.0981, 0.0887, 0.078, 0.0672, 0.0591, 0.0538, - # 0.0484, 0.043, 0.0376, 0.0323, 0.0309, 0.0296, 0.0282, 0.0269, 0.0255, 0.0242, 0.0228, 0.0215, 0.0202, - # 0.0188, 0.0175, 0.0161, 0.0148, 0.0134, 0.0121, 0.0108, 0.0094, 0.0081, 0.0067, 0.0054, 0.004, 0.0027, - # 0.0013, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - # [1.0, 0.8036, 0.7381, 0.6756, 0.6131, 0.5208, 0.4315, 0.3571, 0.3021, 0.2589, 0.2262, 0.2024, 0.1935, - # 0.183, 0.1756, 0.1696, 0.1607, 0.1548, 0.1473, 0.1384, 0.1324, 0.1265, 0.1205, 0.1146, 0.1086, 0.1027, - # 0.0967, 0.0908, 0.0848, 0.0804, 0.0774, 0.0744, 0.0729, 0.0714, 0.0699, 0.0685, 0.067, 0.0655, 0.064, - # 0.061, 0.0565, 0.0521, 0.0476, 0.0446, 0.0387, 0.0327, 0.0268, 0.0208, 0.0149, 0.0134, 0.0119, 0.0104, - # 0.0089, 0.0089, 0.0089, 0.0089, 0.0089, 0.0089, 0.0089, 0.0089, 0.0089, 0.0089, 0.0089, 0.0089, 0.0089, - # 0.0089, 0.0089, 0.0074, 0.006, 0.0045, 0.003, 0.0015, 0, 0, 0, 0, 0, 0, 0], - # [1.0, 0.8212, 0.7527, 0.6935, 0.6035, 0.5376, 0.461, 0.3898, 0.328, 0.2782, 0.2419, 0.2124, 0.1922, - # 0.1761, 0.1667, 0.1559, 0.1452, 0.1358, 0.129, 0.1223, 0.1169, 0.1116, 0.1062, 0.1008, 0.0954, 0.0901, - # 0.0847, 0.0793, 0.0766, 0.0753, 0.0739, 0.0726, 0.0712, 0.0699, 0.0685, 0.0672, 0.0659, 0.0645, 0.0632, - # 0.0618, 0.0578, 0.0538, 0.0484, 0.043, 0.0376, 0.0323, 0.0269, 0.0215, 0.0161, 0.0134, 0.0108, 0.0081, - # 0.0054, 0.0027, 0.0013, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - # [1.0, 0.8889, 0.8292, 0.7694, 0.6917, 0.6194, 0.5542, 0.4903, 0.4431, 0.4069, 0.3708, 0.3375, 0.3069, - # 0.2792, 0.2639, 0.25, 0.2389, 0.2278, 0.2181, 0.2083, 0.1986, 0.1903, 0.1833, 0.1764, 0.1694, 0.1625, - # 0.1556, 0.1486, 0.1417, 0.1347, 0.1278, 0.1208, 0.1139, 0.1069, 0.1, 0.0931, 0.0861, 0.0792, 0.0722, - # 0.0653, 0.0583, 0.0514, 0.0444, 0.0375, 0.0306, 0.0236, 0.0167, 0.0097, 0.0028, 0.0014, 0, 0, 0, 0, 0, - # 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - # [1.0, 0.9059, 0.8723, 0.8293, 0.7796, 0.6962, 0.6358, 0.578, 0.5215, 0.4785, 0.4409, 0.4005, 0.3656, - # 0.3333, 0.3051, 0.2809, 0.2608, 0.2419, 0.2285, 0.2177, 0.207, 0.1989, 0.1935, 0.1882, 0.1828, 0.1774, - # 0.172, 0.1667, 0.1613, 0.1559, 0.1505, 0.1452, 0.1398, 0.1344, 0.129, 0.1237, 0.1183, 0.1129, 0.1075, - # 0.1022, 0.0968, 0.0914, 0.086, 0.0806, 0.0753, 0.0699, 0.0645, 0.0591, 0.0538, 0.0484, 0.043, 0.039, - # 0.0363, 0.0349, 0.0336, 0.0323, 0.0309, 0.0296, 0.0282, 0.0269, 0.0255, 0.0242, 0.0228, 0.0215, 0.0202, - # 0.0188, 0.0175, 0.0161, 0.0148, 0.0134, 0.0121, 0.0108, 0.0094, 0.0081, 0.0067, 0.0054, 0.004, 0.0027, - # 0.0013], - # [1.0, 0.9111, 0.8792, 0.8292, 0.7597, 0.6708, 0.5944, 0.5403, 0.4875, 0.4444, 0.4028, 0.3667, 0.3306, - # 0.2972, 0.2667, 0.2431, 0.225, 0.2083, 0.1944, 0.1861, 0.1792, 0.1736, 0.1681, 0.1625, 0.1569, 0.1514, - # 0.1458, 0.1403, 0.1347, 0.1292, 0.1236, 0.1181, 0.1125, 0.1069, 0.1014, 0.0958, 0.0903, 0.0847, 0.0792, - # 0.0736, 0.0681, 0.0625, 0.0569, 0.0514, 0.0458, 0.0403, 0.0347, 0.0292, 0.0236, 0.0181, 0.0125, 0.0083, - # 0.0042, 0.0028, 0.0014, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - # [1.0, 0.9194, 0.8831, 0.8293, 0.7433, 0.6815, 0.6022, 0.5497, 0.5067, 0.4718, 0.4368, 0.4046, 0.3696, - # 0.3414, 0.3172, 0.2997, 0.2823, 0.2661, 0.2513, 0.2392, 0.2285, 0.2177, 0.207, 0.1976, 0.1895, 0.1815, - # 0.1734, 0.1653, 0.1573, 0.1492, 0.1425, 0.1358, 0.129, 0.1223, 0.1156, 0.1089, 0.1022, 0.0954, 0.0887, - # 0.082, 0.0753, 0.0685, 0.0618, 0.0551, 0.0484, 0.0417, 0.0349, 0.0282, 0.0215, 0.0148, 0.0081, 0.0054, - # 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - # [1.0, 0.8992, 0.8589, 0.8065, 0.7285, 0.664, 0.5968, 0.5228, 0.4583, 0.4086, 0.3723, 0.336, 0.3024, - # 0.2702, 0.2433, 0.2177, 0.2016, 0.1909, 0.1815, 0.1734, 0.1653, 0.1586, 0.1519, 0.1465, 0.1411, 0.1358, - # 0.129, 0.1237, 0.1183, 0.1129, 0.1075, 0.1022, 0.0968, 0.0914, 0.086, 0.0806, 0.0753, 0.0699, 0.0645, - # 0.0591, 0.0538, 0.0484, 0.043, 0.0376, 0.0323, 0.0269, 0.0215, 0.0161, 0.0108, 0.0054, 0.0027, 0.0013, - # 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - # [1.0, 0.8708, 0.8347, 0.7819, 0.7042, 0.6181, 0.5486, 0.475, 0.4333, 0.4028, 0.3708, 0.3375, 0.3083, - # 0.2819, 0.2611, 0.2472, 0.2361, 0.2278, 0.2194, 0.2139, 0.2083, 0.2028, 0.1972, 0.1917, 0.1861, 0.1806, - # 0.175, 0.1694, 0.1639, 0.1583, 0.1528, 0.1472, 0.1417, 0.1361, 0.1306, 0.125, 0.1194, 0.1139, 0.1083, - # 0.1028, 0.0972, 0.0917, 0.0861, 0.0792, 0.0722, 0.0653, 0.0583, 0.0514, 0.0444, 0.0389, 0.0333, 0.0306, - # 0.0292, 0.0278, 0.0264, 0.025, 0.0236, 0.0222, 0.0208, 0.0194, 0.0181, 0.0167, 0.0153, 0.0139, 0.0125, - # 0.0111, 0.0097, 0.0083, 0.0069, 0.0056, 0.0042, 0.0028, 0.0014, 0, 0, 0, 0, 0, 0], - # [1.0, 0.8199, 0.7608, 0.7016, 0.6223, 0.5685, 0.5161, 0.4543, 0.3952, 0.3495, 0.3172, 0.2863, 0.2648, - # 0.246, 0.2272, 0.211, 0.1976, 0.1868, 0.1747, 0.1653, 0.1559, 0.1478, 0.1411, 0.1344, 0.1277, 0.121, - # 0.1142, 0.1075, 0.1035, 0.0995, 0.0954, 0.0914, 0.0874, 0.0833, 0.0793, 0.0753, 0.0712, 0.0672, 0.0645, - # 0.0605, 0.0551, 0.0497, 0.0444, 0.039, 0.0336, 0.0282, 0.0228, 0.0175, 0.0121, 0.0108, 0.0094, 0.0081, - # 0.0081, 0.0081, 0.0081, 0.0081, 0.0081, 0.0081, 0.0081, 0.0081, 0.0081, 0.0081, 0.0081, 0.0081, 0.0081, - # 0.0081, 0.0081, 0.0067, 0.0054, 0.004, 0.0027, 0.0013, 0, 0, 0, 0, 0, 0, 0], - # [1.0, 0.7931, 0.7319, 0.6542, 0.5819, 0.525, 0.4653, 0.4056, 0.3542, 0.3153, 0.2792, 0.2542, 0.2375, - # 0.2208, 0.2069, 0.1958, 0.1819, 0.1694, 0.1542, 0.1417, 0.1319, 0.1222, 0.1125, 0.1028, 0.0875, 0.0806, - # 0.0736, 0.0667, 0.0597, 0.0542, 0.0486, 0.0458, 0.0431, 0.0403, 0.0375, 0.0347, 0.0319, 0.0292, 0.0264, - # 0.0236, 0.0208, 0.0181, 0.0167, 0.0153, 0.0125, 0.0097, 0.0069, 0.0042, 0.0014, 0, 0, 0, 0, 0, 0, 0, 0, - # 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - # [1.0, 0.7796, 0.7124, 0.6465, 0.5685, 0.4946, 0.4207, 0.3441, 0.2957, 0.2487, 0.2137, 0.1989, 0.1855, - # 0.1747, 0.168, 0.1613, 0.1505, 0.1398, 0.129, 0.1183, 0.1075, 0.0968, 0.086, 0.0753, 0.0659, 0.0591, - # 0.0524, 0.0457, 0.039, 0.0336, 0.0309, 0.0296, 0.0282, 0.0269, 0.0255, 0.0242, 0.0228, 0.0215, 0.0202, - # 0.0188, 0.0175, 0.0161, 0.0148, 0.0134, 0.0121, 0.0108, 0.0094, 0.0081, 0.0067, 0.0054, 0.004, 0.0027, - # 0.0013, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], - # "probs_of_surviving_by_hour_of_the_day": [ - # [1.0, 1.0, 1.0, 0.9863, 0.8986, 0.8, 0.5233, 0.2247, 0.1671, 0.1644, 0.1644, 0.1644, 0.1644, 0.1644, - # 0.1616, 0.1616, 0.1616, 0.1534, 0.1425, 0.1068, 0.1068, 0.1068, 0.1068, 0.1068, 0.1068, 0.1068, 0.1068, - # 0.1068, 0.1068, 0.1068, 0.0795, 0.0438, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, - # 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, - # 0.0082, 0.0082, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - # [1.0, 1.0, 1.0, 0.9863, 0.8959, 0.6301, 0.3014, 0.2164, 0.2137, 0.2137, 0.2137, 0.211, 0.211, 0.2082, - # 0.2082, 0.2082, 0.1973, 0.1863, 0.126, 0.126, 0.126, 0.126, 0.126, 0.126, 0.126, 0.126, 0.126, 0.126, - # 0.126, 0.0959, 0.0521, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, - # 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0137, - # 0.0082, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, - # 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027], - # [1.0, 1.0, 1.0, 0.9863, 0.7123, 0.3644, 0.2904, 0.2822, 0.2822, 0.2822, 0.2822, 0.2795, 0.274, 0.274, - # 0.274, 0.2603, 0.2356, 0.1452, 0.1452, 0.1452, 0.1452, 0.1452, 0.1452, 0.1452, 0.1452, 0.1452, 0.1452, - # 0.1452, 0.1151, 0.0575, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, - # 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0192, - # 0.0082, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, - # 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0], - # [1.0, 1.0, 1.0, 0.8055, 0.474, 0.3616, 0.3562, 0.3562, 0.3562, 0.3562, 0.3534, 0.3479, 0.3479, 0.3479, - # 0.3233, 0.2904, 0.1836, 0.1836, 0.1836, 0.1836, 0.1836, 0.1836, 0.1836, 0.1836, 0.1808, 0.1808, 0.1808, - # 0.1397, 0.0712, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, - # 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0274, 0.0137, - # 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, - # 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0, 0], - # [1.0, 1.0, 0.863, 0.5315, 0.4521, 0.4493, 0.4466, 0.4466, 0.4466, 0.4438, 0.4384, 0.4384, 0.4356, 0.411, - # 0.3616, 0.2055, 0.2055, 0.2055, 0.2055, 0.2055, 0.2055, 0.2055, 0.2055, 0.2055, 0.2027, 0.2027, 0.1589, - # 0.0904, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, - # 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0411, 0.0247, 0.0027, - # 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, - # 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0, 0, 0], - # [1.0, 0.8712, 0.5808, 0.5014, 0.4959, 0.4959, 0.4959, 0.4959, 0.4932, 0.4877, 0.4877, 0.4849, 0.4575, - # 0.4027, 0.2137, 0.2137, 0.2137, 0.2137, 0.2137, 0.2137, 0.2137, 0.2137, 0.2137, 0.2137, 0.211, 0.1699, - # 0.1014, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, - # 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.0521, 0.0274, 0.0027, 0.0027, 0.0027, - # 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, - # 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0, 0, 0, 0], - # [1.0, 0.7041, 0.6685, 0.6685, 0.6658, 0.6658, 0.6658, 0.663, 0.6575, 0.6575, 0.6548, 0.6055, 0.526, - # 0.2712, 0.2712, 0.2685, 0.2685, 0.2685, 0.2685, 0.2685, 0.2685, 0.2685, 0.2685, 0.2658, 0.2219, 0.1534, - # 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, - # 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.0767, 0.0438, 0.0082, 0.0082, - # 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, - # 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0055, 0.0027, 0, 0, 0, 0, 0], - # [1.0, 0.937, 0.9233, 0.9178, 0.9068, 0.9068, 0.9014, 0.8904, 0.8904, 0.8767, 0.7205, 0.5836, 0.3014, - # 0.3014, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2521, 0.1671, 0.1288, - # 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, - # 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.0904, 0.0466, 0.011, 0.011, 0.011, - # 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, - # 0.011, 0.011, 0.011, 0.011, 0.011, 0.0082, 0.0027, 0, 0, 0, 0, 0, 0], - # [1.0, 0.9671, 0.9562, 0.9479, 0.9479, 0.9425, 0.9288, 0.926, 0.9096, 0.7397, 0.5918, 0.3014, 0.3014, - # 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2521, 0.1671, 0.1288, 0.1288, - # 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, - # 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.0904, 0.0466, 0.011, 0.011, 0.011, 0.011, - # 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, - # 0.011, 0.011, 0.011, 0.011, 0.0082, 0.0027, 0, 0, 0, 0, 0, 0, 0], - # [1.0, 0.9699, 0.9589, 0.9589, 0.9534, 0.937, 0.937, 0.9178, 0.7397, 0.5973, 0.3014, 0.3014, 0.2986, - # 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2548, 0.1671, 0.1288, 0.1288, 0.1288, - # 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, - # 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.0904, 0.0466, 0.011, 0.011, 0.011, 0.011, 0.011, - # 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, - # 0.011, 0.011, 0.011, 0.0082, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0], - # [1.0, 0.9781, 0.9699, 0.9644, 0.9479, 0.9452, 0.9288, 0.7397, 0.5973, 0.3014, 0.3014, 0.2986, 0.2986, - # 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2548, 0.1671, 0.1288, 0.1288, 0.1288, 0.1288, - # 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, - # 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.0904, 0.0466, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, - # 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, - # 0.011, 0.011, 0.0082, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0], - # [1.0, 0.9863, 0.9726, 0.9534, 0.9507, 0.9315, 0.7397, 0.5973, 0.3014, 0.3014, 0.2986, 0.2986, 0.2986, - # 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2548, 0.1671, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, - # 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, - # 0.1288, 0.1288, 0.1288, 0.1288, 0.0904, 0.0466, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, - # 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, - # 0.0082, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - # [1.0, 0.9836, 0.9616, 0.9589, 0.937, 0.7397, 0.5973, 0.3014, 0.3014, 0.2986, 0.2986, 0.2986, 0.2986, - # 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2466, 0.1534, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, - # 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, - # 0.1151, 0.1151, 0.1151, 0.0795, 0.0438, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, - # 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, - # 0.0082, 0.0082, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - # [1.0, 0.9644, 0.9616, 0.9397, 0.7397, 0.5973, 0.3014, 0.3014, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, - # 0.2986, 0.2986, 0.2959, 0.2932, 0.2438, 0.1507, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, - # 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, - # 0.1123, 0.1123, 0.0795, 0.0411, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, - # 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, - # 0.0055, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - # [1.0, 0.9726, 0.9479, 0.7397, 0.5973, 0.3014, 0.3014, 0.2986, 0.2986, 0.2986, 0.2986, 0.2959, 0.2932, - # 0.2932, 0.2904, 0.2904, 0.2384, 0.1534, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, - # 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, - # 0.1151, 0.0822, 0.0411, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, - # 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, - # 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - # [1.0, 0.9562, 0.7452, 0.6027, 0.3014, 0.3014, 0.2986, 0.2986, 0.2932, 0.2932, 0.2932, 0.2904, 0.2904, - # 0.2822, 0.2822, 0.2356, 0.1479, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, - # 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, - # 0.0822, 0.0411, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, - # 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0027, - # 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - # [1.0, 0.7479, 0.6, 0.3014, 0.3014, 0.2959, 0.2932, 0.2932, 0.2877, 0.2877, 0.2822, 0.2822, 0.2795, - # 0.2575, 0.2082, 0.1397, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, - # 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.0767, - # 0.0411, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, - # 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0027, 0, 0, - # 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - # [1.0, 0.6137, 0.3014, 0.3014, 0.2959, 0.2932, 0.2877, 0.2877, 0.2849, 0.2822, 0.2767, 0.2575, 0.2521, - # 0.2055, 0.1315, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, - # 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.074, 0.0411, - # 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, - # 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0027, 0, 0, 0, 0, 0, - # 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - # [1.0, 0.3123, 0.3123, 0.3096, 0.3068, 0.3068, 0.2986, 0.2986, 0.2932, 0.2877, 0.2795, 0.2685, 0.2164, - # 0.126, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, - # 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.074, 0.0411, 0.0055, - # 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, - # 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, - # 0, 0, 0, 0, 0, 0, 0, 0, 0], - # [1.0, 0.326, 0.3123, 0.3123, 0.3096, 0.3068, 0.3014, 0.2986, 0.2904, 0.2795, 0.2685, 0.2164, 0.1205, - # 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, - # 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.074, 0.0411, 0.0055, 0.0055, - # 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, - # 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - # 0, 0, 0, 0, 0, 0, 0, 0], - # [1.0, 0.3123, 0.3123, 0.3123, 0.3096, 0.3068, 0.2986, 0.2877, 0.2822, 0.2712, 0.2164, 0.126, 0.1041, - # 0.1041, 0.1041, 0.1041, 0.1041, 0.1041, 0.1041, 0.1041, 0.1041, 0.1041, 0.1041, 0.1014, 0.1014, 0.1014, - # 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.074, 0.0411, 0.0055, 0.0055, 0.0055, - # 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, - # 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - # 0, 0, 0, 0, 0, 0], - # [1.0, 0.7644, 0.7644, 0.7479, 0.6986, 0.6493, 0.5863, 0.4849, 0.4027, 0.2548, 0.1534, 0.1123, 0.1123, - # 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1096, 0.1014, 0.1014, 0.1014, 0.1014, - # 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.074, 0.0411, 0.0055, 0.0055, 0.0055, 0.0055, - # 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, - # 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - # 0, 0, 0, 0], - # [1.0, 1.0, 1.0, 0.9753, 0.9068, 0.8301, 0.7178, 0.5616, 0.3452, 0.1753, 0.1315, 0.1288, 0.1288, 0.1288, - # 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1233, 0.1178, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, - # 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.074, 0.0411, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, - # 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, - # 0.0055, 0.0055, 0.0055, 0.0055, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - # [1.0, 1.0, 1.0, 0.9863, 0.8932, 0.8, 0.6685, 0.411, 0.1836, 0.1507, 0.1479, 0.1479, 0.1479, 0.1479, - # 0.1479, 0.1479, 0.1479, 0.1479, 0.1397, 0.1315, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, - # 0.1014, 0.1014, 0.1014, 0.1014, 0.074, 0.0411, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, - # 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, - # 0.0055, 0.0055, 0.0055, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]] - # } - # resp = simulate_outages(**inputs) + # Output parse from existing simulation + expected = { + 'resilience_hours_min': 0, + 'resilience_hours_max': 78, + 'resilience_hours_avg': 10.23, + "outage_durations": list(range(1, 79)), + "probs_of_surviving": [0.8486, 0.7963, 0.7373, 0.6624, 0.59, 0.5194, 0.4533, 0.4007, 0.3583, 0.3231, 0.2933, + 0.2691, 0.2471, 0.2297, 0.215, 0.2015, 0.1897, 0.1788, 0.1694, 0.1608, 0.153, 0.1454, + 0.1381, 0.1308, 0.1247, 0.1184, 0.1122, 0.1065, 0.1013, 0.0968, 0.0927, 0.0887, 0.0847, + 0.0807, 0.0767, 0.0727, 0.0687, 0.0648, 0.0607, 0.0562, 0.0516, 0.047, 0.0425, 0.0376, + 0.0326, 0.0277, 0.0228, 0.0179, 0.0146, 0.0116, 0.0097, 0.0081, 0.0071, 0.0066, 0.0062, + 0.0059, 0.0057, 0.0055, 0.0053, 0.005, 0.0048, 0.0046, 0.0043, 0.0041, 0.0039, 0.0037, + 0.0032, 0.0027, 0.0023, 0.0018, 0.0014, 0.0009, 0.0007, 0.0006, 0.0005, 0.0003, 0.0002, + 0.0001], + "probs_of_surviving_by_month": [ + [1.0, 0.7688, 0.7003, 0.6277, 0.5511, 0.4785, 0.4005, 0.3266, 0.2769, 0.2312, 0.1989, 0.1774, 0.168, + 0.1586, 0.1519, 0.1452, 0.1358, 0.1263, 0.1169, 0.1075, 0.0981, 0.0887, 0.078, 0.0672, 0.0591, 0.0538, + 0.0484, 0.043, 0.0376, 0.0323, 0.0309, 0.0296, 0.0282, 0.0269, 0.0255, 0.0242, 0.0228, 0.0215, 0.0202, + 0.0188, 0.0175, 0.0161, 0.0148, 0.0134, 0.0121, 0.0108, 0.0094, 0.0081, 0.0067, 0.0054, 0.004, 0.0027, + 0.0013, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [1.0, 0.8036, 0.7381, 0.6756, 0.6131, 0.5208, 0.4315, 0.3571, 0.3021, 0.2589, 0.2262, 0.2024, 0.1935, + 0.183, 0.1756, 0.1696, 0.1607, 0.1548, 0.1473, 0.1384, 0.1324, 0.1265, 0.1205, 0.1146, 0.1086, 0.1027, + 0.0967, 0.0908, 0.0848, 0.0804, 0.0774, 0.0744, 0.0729, 0.0714, 0.0699, 0.0685, 0.067, 0.0655, 0.064, + 0.061, 0.0565, 0.0521, 0.0476, 0.0446, 0.0387, 0.0327, 0.0268, 0.0208, 0.0149, 0.0134, 0.0119, 0.0104, + 0.0089, 0.0089, 0.0089, 0.0089, 0.0089, 0.0089, 0.0089, 0.0089, 0.0089, 0.0089, 0.0089, 0.0089, 0.0089, + 0.0089, 0.0089, 0.0074, 0.006, 0.0045, 0.003, 0.0015, 0, 0, 0, 0, 0, 0, 0], + [1.0, 0.8212, 0.7527, 0.6935, 0.6035, 0.5376, 0.461, 0.3898, 0.328, 0.2782, 0.2419, 0.2124, 0.1922, + 0.1761, 0.1667, 0.1559, 0.1452, 0.1358, 0.129, 0.1223, 0.1169, 0.1116, 0.1062, 0.1008, 0.0954, 0.0901, + 0.0847, 0.0793, 0.0766, 0.0753, 0.0739, 0.0726, 0.0712, 0.0699, 0.0685, 0.0672, 0.0659, 0.0645, 0.0632, + 0.0618, 0.0578, 0.0538, 0.0484, 0.043, 0.0376, 0.0323, 0.0269, 0.0215, 0.0161, 0.0134, 0.0108, 0.0081, + 0.0054, 0.0027, 0.0013, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [1.0, 0.8889, 0.8292, 0.7694, 0.6917, 0.6194, 0.5542, 0.4903, 0.4431, 0.4069, 0.3708, 0.3375, 0.3069, + 0.2792, 0.2639, 0.25, 0.2389, 0.2278, 0.2181, 0.2083, 0.1986, 0.1903, 0.1833, 0.1764, 0.1694, 0.1625, + 0.1556, 0.1486, 0.1417, 0.1347, 0.1278, 0.1208, 0.1139, 0.1069, 0.1, 0.0931, 0.0861, 0.0792, 0.0722, + 0.0653, 0.0583, 0.0514, 0.0444, 0.0375, 0.0306, 0.0236, 0.0167, 0.0097, 0.0028, 0.0014, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [1.0, 0.9059, 0.8723, 0.8293, 0.7796, 0.6962, 0.6358, 0.578, 0.5215, 0.4785, 0.4409, 0.4005, 0.3656, + 0.3333, 0.3051, 0.2809, 0.2608, 0.2419, 0.2285, 0.2177, 0.207, 0.1989, 0.1935, 0.1882, 0.1828, 0.1774, + 0.172, 0.1667, 0.1613, 0.1559, 0.1505, 0.1452, 0.1398, 0.1344, 0.129, 0.1237, 0.1183, 0.1129, 0.1075, + 0.1022, 0.0968, 0.0914, 0.086, 0.0806, 0.0753, 0.0699, 0.0645, 0.0591, 0.0538, 0.0484, 0.043, 0.039, + 0.0363, 0.0349, 0.0336, 0.0323, 0.0309, 0.0296, 0.0282, 0.0269, 0.0255, 0.0242, 0.0228, 0.0215, 0.0202, + 0.0188, 0.0175, 0.0161, 0.0148, 0.0134, 0.0121, 0.0108, 0.0094, 0.0081, 0.0067, 0.0054, 0.004, 0.0027, + 0.0013], + [1.0, 0.9111, 0.8792, 0.8292, 0.7597, 0.6708, 0.5944, 0.5403, 0.4875, 0.4444, 0.4028, 0.3667, 0.3306, + 0.2972, 0.2667, 0.2431, 0.225, 0.2083, 0.1944, 0.1861, 0.1792, 0.1736, 0.1681, 0.1625, 0.1569, 0.1514, + 0.1458, 0.1403, 0.1347, 0.1292, 0.1236, 0.1181, 0.1125, 0.1069, 0.1014, 0.0958, 0.0903, 0.0847, 0.0792, + 0.0736, 0.0681, 0.0625, 0.0569, 0.0514, 0.0458, 0.0403, 0.0347, 0.0292, 0.0236, 0.0181, 0.0125, 0.0083, + 0.0042, 0.0028, 0.0014, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [1.0, 0.9194, 0.8831, 0.8293, 0.7433, 0.6815, 0.6022, 0.5497, 0.5067, 0.4718, 0.4368, 0.4046, 0.3696, + 0.3414, 0.3172, 0.2997, 0.2823, 0.2661, 0.2513, 0.2392, 0.2285, 0.2177, 0.207, 0.1976, 0.1895, 0.1815, + 0.1734, 0.1653, 0.1573, 0.1492, 0.1425, 0.1358, 0.129, 0.1223, 0.1156, 0.1089, 0.1022, 0.0954, 0.0887, + 0.082, 0.0753, 0.0685, 0.0618, 0.0551, 0.0484, 0.0417, 0.0349, 0.0282, 0.0215, 0.0148, 0.0081, 0.0054, + 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [1.0, 0.8992, 0.8589, 0.8065, 0.7285, 0.664, 0.5968, 0.5228, 0.4583, 0.4086, 0.3723, 0.336, 0.3024, + 0.2702, 0.2433, 0.2177, 0.2016, 0.1909, 0.1815, 0.1734, 0.1653, 0.1586, 0.1519, 0.1465, 0.1411, 0.1358, + 0.129, 0.1237, 0.1183, 0.1129, 0.1075, 0.1022, 0.0968, 0.0914, 0.086, 0.0806, 0.0753, 0.0699, 0.0645, + 0.0591, 0.0538, 0.0484, 0.043, 0.0376, 0.0323, 0.0269, 0.0215, 0.0161, 0.0108, 0.0054, 0.0027, 0.0013, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [1.0, 0.8708, 0.8347, 0.7819, 0.7042, 0.6181, 0.5486, 0.475, 0.4333, 0.4028, 0.3708, 0.3375, 0.3083, + 0.2819, 0.2611, 0.2472, 0.2361, 0.2278, 0.2194, 0.2139, 0.2083, 0.2028, 0.1972, 0.1917, 0.1861, 0.1806, + 0.175, 0.1694, 0.1639, 0.1583, 0.1528, 0.1472, 0.1417, 0.1361, 0.1306, 0.125, 0.1194, 0.1139, 0.1083, + 0.1028, 0.0972, 0.0917, 0.0861, 0.0792, 0.0722, 0.0653, 0.0583, 0.0514, 0.0444, 0.0389, 0.0333, 0.0306, + 0.0292, 0.0278, 0.0264, 0.025, 0.0236, 0.0222, 0.0208, 0.0194, 0.0181, 0.0167, 0.0153, 0.0139, 0.0125, + 0.0111, 0.0097, 0.0083, 0.0069, 0.0056, 0.0042, 0.0028, 0.0014, 0, 0, 0, 0, 0, 0], + [1.0, 0.8199, 0.7608, 0.7016, 0.6223, 0.5685, 0.5161, 0.4543, 0.3952, 0.3495, 0.3172, 0.2863, 0.2648, + 0.246, 0.2272, 0.211, 0.1976, 0.1868, 0.1747, 0.1653, 0.1559, 0.1478, 0.1411, 0.1344, 0.1277, 0.121, + 0.1142, 0.1075, 0.1035, 0.0995, 0.0954, 0.0914, 0.0874, 0.0833, 0.0793, 0.0753, 0.0712, 0.0672, 0.0645, + 0.0605, 0.0551, 0.0497, 0.0444, 0.039, 0.0336, 0.0282, 0.0228, 0.0175, 0.0121, 0.0108, 0.0094, 0.0081, + 0.0081, 0.0081, 0.0081, 0.0081, 0.0081, 0.0081, 0.0081, 0.0081, 0.0081, 0.0081, 0.0081, 0.0081, 0.0081, + 0.0081, 0.0081, 0.0067, 0.0054, 0.004, 0.0027, 0.0013, 0, 0, 0, 0, 0, 0, 0], + [1.0, 0.7931, 0.7319, 0.6542, 0.5819, 0.525, 0.4653, 0.4056, 0.3542, 0.3153, 0.2792, 0.2542, 0.2375, + 0.2208, 0.2069, 0.1958, 0.1819, 0.1694, 0.1542, 0.1417, 0.1319, 0.1222, 0.1125, 0.1028, 0.0875, 0.0806, + 0.0736, 0.0667, 0.0597, 0.0542, 0.0486, 0.0458, 0.0431, 0.0403, 0.0375, 0.0347, 0.0319, 0.0292, 0.0264, + 0.0236, 0.0208, 0.0181, 0.0167, 0.0153, 0.0125, 0.0097, 0.0069, 0.0042, 0.0014, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [1.0, 0.7796, 0.7124, 0.6465, 0.5685, 0.4946, 0.4207, 0.3441, 0.2957, 0.2487, 0.2137, 0.1989, 0.1855, + 0.1747, 0.168, 0.1613, 0.1505, 0.1398, 0.129, 0.1183, 0.1075, 0.0968, 0.086, 0.0753, 0.0659, 0.0591, + 0.0524, 0.0457, 0.039, 0.0336, 0.0309, 0.0296, 0.0282, 0.0269, 0.0255, 0.0242, 0.0228, 0.0215, 0.0202, + 0.0188, 0.0175, 0.0161, 0.0148, 0.0134, 0.0121, 0.0108, 0.0094, 0.0081, 0.0067, 0.0054, 0.004, 0.0027, + 0.0013, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], + "probs_of_surviving_by_hour_of_the_day": [ + [1.0, 1.0, 1.0, 0.9863, 0.8986, 0.8, 0.5233, 0.2247, 0.1671, 0.1644, 0.1644, 0.1644, 0.1644, 0.1644, + 0.1616, 0.1616, 0.1616, 0.1534, 0.1425, 0.1068, 0.1068, 0.1068, 0.1068, 0.1068, 0.1068, 0.1068, 0.1068, + 0.1068, 0.1068, 0.1068, 0.0795, 0.0438, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, + 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, + 0.0082, 0.0082, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [1.0, 1.0, 1.0, 0.9863, 0.8959, 0.6301, 0.3014, 0.2164, 0.2137, 0.2137, 0.2137, 0.211, 0.211, 0.2082, + 0.2082, 0.2082, 0.1973, 0.1863, 0.126, 0.126, 0.126, 0.126, 0.126, 0.126, 0.126, 0.126, 0.126, 0.126, + 0.126, 0.0959, 0.0521, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, + 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0164, 0.0137, + 0.0082, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, + 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027], + [1.0, 1.0, 1.0, 0.9863, 0.7123, 0.3644, 0.2904, 0.2822, 0.2822, 0.2822, 0.2822, 0.2795, 0.274, 0.274, + 0.274, 0.2603, 0.2356, 0.1452, 0.1452, 0.1452, 0.1452, 0.1452, 0.1452, 0.1452, 0.1452, 0.1452, 0.1452, + 0.1452, 0.1151, 0.0575, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, + 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0219, 0.0192, + 0.0082, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, + 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0], + [1.0, 1.0, 1.0, 0.8055, 0.474, 0.3616, 0.3562, 0.3562, 0.3562, 0.3562, 0.3534, 0.3479, 0.3479, 0.3479, + 0.3233, 0.2904, 0.1836, 0.1836, 0.1836, 0.1836, 0.1836, 0.1836, 0.1836, 0.1836, 0.1808, 0.1808, 0.1808, + 0.1397, 0.0712, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, + 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0329, 0.0274, 0.0137, + 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, + 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0, 0], + [1.0, 1.0, 0.863, 0.5315, 0.4521, 0.4493, 0.4466, 0.4466, 0.4466, 0.4438, 0.4384, 0.4384, 0.4356, 0.411, + 0.3616, 0.2055, 0.2055, 0.2055, 0.2055, 0.2055, 0.2055, 0.2055, 0.2055, 0.2055, 0.2027, 0.2027, 0.1589, + 0.0904, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, + 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0521, 0.0411, 0.0247, 0.0027, + 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, + 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0, 0, 0], + [1.0, 0.8712, 0.5808, 0.5014, 0.4959, 0.4959, 0.4959, 0.4959, 0.4932, 0.4877, 0.4877, 0.4849, 0.4575, + 0.4027, 0.2137, 0.2137, 0.2137, 0.2137, 0.2137, 0.2137, 0.2137, 0.2137, 0.2137, 0.2137, 0.211, 0.1699, + 0.1014, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, + 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.063, 0.0521, 0.0274, 0.0027, 0.0027, 0.0027, + 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, + 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0.0027, 0, 0, 0, 0], + [1.0, 0.7041, 0.6685, 0.6685, 0.6658, 0.6658, 0.6658, 0.663, 0.6575, 0.6575, 0.6548, 0.6055, 0.526, + 0.2712, 0.2712, 0.2685, 0.2685, 0.2685, 0.2685, 0.2685, 0.2685, 0.2685, 0.2685, 0.2658, 0.2219, 0.1534, + 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, + 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.0767, 0.0438, 0.0082, 0.0082, + 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, + 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0055, 0.0027, 0, 0, 0, 0, 0], + [1.0, 0.937, 0.9233, 0.9178, 0.9068, 0.9068, 0.9014, 0.8904, 0.8904, 0.8767, 0.7205, 0.5836, 0.3014, + 0.3014, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2521, 0.1671, 0.1288, + 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, + 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.0904, 0.0466, 0.011, 0.011, 0.011, + 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, + 0.011, 0.011, 0.011, 0.011, 0.011, 0.0082, 0.0027, 0, 0, 0, 0, 0, 0], + [1.0, 0.9671, 0.9562, 0.9479, 0.9479, 0.9425, 0.9288, 0.926, 0.9096, 0.7397, 0.5918, 0.3014, 0.3014, + 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2521, 0.1671, 0.1288, 0.1288, + 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, + 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.0904, 0.0466, 0.011, 0.011, 0.011, 0.011, + 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, + 0.011, 0.011, 0.011, 0.011, 0.0082, 0.0027, 0, 0, 0, 0, 0, 0, 0], + [1.0, 0.9699, 0.9589, 0.9589, 0.9534, 0.937, 0.937, 0.9178, 0.7397, 0.5973, 0.3014, 0.3014, 0.2986, + 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2548, 0.1671, 0.1288, 0.1288, 0.1288, + 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, + 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.0904, 0.0466, 0.011, 0.011, 0.011, 0.011, 0.011, + 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, + 0.011, 0.011, 0.011, 0.0082, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0], + [1.0, 0.9781, 0.9699, 0.9644, 0.9479, 0.9452, 0.9288, 0.7397, 0.5973, 0.3014, 0.3014, 0.2986, 0.2986, + 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2548, 0.1671, 0.1288, 0.1288, 0.1288, 0.1288, + 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, + 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.0904, 0.0466, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, + 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, + 0.011, 0.011, 0.0082, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [1.0, 0.9863, 0.9726, 0.9534, 0.9507, 0.9315, 0.7397, 0.5973, 0.3014, 0.3014, 0.2986, 0.2986, 0.2986, + 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2548, 0.1671, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, + 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, + 0.1288, 0.1288, 0.1288, 0.1288, 0.0904, 0.0466, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, + 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, + 0.0082, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [1.0, 0.9836, 0.9616, 0.9589, 0.937, 0.7397, 0.5973, 0.3014, 0.3014, 0.2986, 0.2986, 0.2986, 0.2986, + 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, 0.2466, 0.1534, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, + 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, + 0.1151, 0.1151, 0.1151, 0.0795, 0.0438, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, + 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, 0.0082, + 0.0082, 0.0082, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [1.0, 0.9644, 0.9616, 0.9397, 0.7397, 0.5973, 0.3014, 0.3014, 0.2986, 0.2986, 0.2986, 0.2986, 0.2986, + 0.2986, 0.2986, 0.2959, 0.2932, 0.2438, 0.1507, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, + 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, + 0.1123, 0.1123, 0.0795, 0.0411, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, + 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, + 0.0055, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [1.0, 0.9726, 0.9479, 0.7397, 0.5973, 0.3014, 0.3014, 0.2986, 0.2986, 0.2986, 0.2986, 0.2959, 0.2932, + 0.2932, 0.2904, 0.2904, 0.2384, 0.1534, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, + 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, 0.1151, + 0.1151, 0.0822, 0.0411, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, + 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, + 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [1.0, 0.9562, 0.7452, 0.6027, 0.3014, 0.3014, 0.2986, 0.2986, 0.2932, 0.2932, 0.2932, 0.2904, 0.2904, + 0.2822, 0.2822, 0.2356, 0.1479, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, + 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, 0.1096, + 0.0822, 0.0411, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, + 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0027, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [1.0, 0.7479, 0.6, 0.3014, 0.3014, 0.2959, 0.2932, 0.2932, 0.2877, 0.2877, 0.2822, 0.2822, 0.2795, + 0.2575, 0.2082, 0.1397, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, + 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.0767, + 0.0411, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, + 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0027, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [1.0, 0.6137, 0.3014, 0.3014, 0.2959, 0.2932, 0.2877, 0.2877, 0.2849, 0.2822, 0.2767, 0.2575, 0.2521, + 0.2055, 0.1315, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, + 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.074, 0.0411, + 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, + 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0027, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [1.0, 0.3123, 0.3123, 0.3096, 0.3068, 0.3068, 0.2986, 0.2986, 0.2932, 0.2877, 0.2795, 0.2685, 0.2164, + 0.126, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, + 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.074, 0.0411, 0.0055, + 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, + 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0], + [1.0, 0.326, 0.3123, 0.3123, 0.3096, 0.3068, 0.3014, 0.2986, 0.2904, 0.2795, 0.2685, 0.2164, 0.1205, + 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, + 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.074, 0.0411, 0.0055, 0.0055, + 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, + 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0], + [1.0, 0.3123, 0.3123, 0.3123, 0.3096, 0.3068, 0.2986, 0.2877, 0.2822, 0.2712, 0.2164, 0.126, 0.1041, + 0.1041, 0.1041, 0.1041, 0.1041, 0.1041, 0.1041, 0.1041, 0.1041, 0.1041, 0.1041, 0.1014, 0.1014, 0.1014, + 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.074, 0.0411, 0.0055, 0.0055, 0.0055, + 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, + 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0], + [1.0, 0.7644, 0.7644, 0.7479, 0.6986, 0.6493, 0.5863, 0.4849, 0.4027, 0.2548, 0.1534, 0.1123, 0.1123, + 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1123, 0.1096, 0.1014, 0.1014, 0.1014, 0.1014, + 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.074, 0.0411, 0.0055, 0.0055, 0.0055, 0.0055, + 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, + 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0], + [1.0, 1.0, 1.0, 0.9753, 0.9068, 0.8301, 0.7178, 0.5616, 0.3452, 0.1753, 0.1315, 0.1288, 0.1288, 0.1288, + 0.1288, 0.1288, 0.1288, 0.1288, 0.1288, 0.1233, 0.1178, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, + 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.074, 0.0411, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, + 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, + 0.0055, 0.0055, 0.0055, 0.0055, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [1.0, 1.0, 1.0, 0.9863, 0.8932, 0.8, 0.6685, 0.411, 0.1836, 0.1507, 0.1479, 0.1479, 0.1479, 0.1479, + 0.1479, 0.1479, 0.1479, 0.1479, 0.1397, 0.1315, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, 0.1014, + 0.1014, 0.1014, 0.1014, 0.1014, 0.074, 0.0411, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, + 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, 0.0055, + 0.0055, 0.0055, 0.0055, 0.0027, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]] + } + resp = simulate_outages(**inputs) - # self.assertAlmostEqual(expected['resilience_hours_min'], resp['resilience_hours_min'], places=3) - # self.assertAlmostEqual(expected['resilience_hours_max'], resp['resilience_hours_max'], places=3) - # self.assertAlmostEqual(expected['resilience_hours_avg'], resp['resilience_hours_avg'], places=3) - # self.assertAlmostEqual(expected['outage_durations'], resp['outage_durations'], places=3) - # for x, y in zip(expected['probs_of_surviving'], resp['probs_of_surviving']): - # self.assertAlmostEquals(x, y, places=3) - # for e, r in zip([0, 11], [0, 11]): - # for x, y in zip(expected['probs_of_surviving_by_month'][e], resp['probs_of_surviving_by_month'][r]): - # self.assertAlmostEquals(x, y, places=3) - # for e, r in zip([0, 23], [0, 23]): - # for x, y in zip(expected['probs_of_surviving_by_hour_of_the_day'][e], - # resp['probs_of_surviving_by_hour_of_the_day'][r]): - # self.assertAlmostEquals(x, y, places=3) + self.assertAlmostEqual(expected['resilience_hours_min'], resp['resilience_hours_min'], places=3) + self.assertAlmostEqual(expected['resilience_hours_max'], resp['resilience_hours_max'], places=3) + self.assertAlmostEqual(expected['resilience_hours_avg'], resp['resilience_hours_avg'], places=3) + self.assertAlmostEqual(expected['outage_durations'], resp['outage_durations'], places=3) + for x, y in zip(expected['probs_of_surviving'], resp['probs_of_surviving']): + self.assertAlmostEquals(x, y, places=3) + for e, r in zip([0, 11], [0, 11]): + for x, y in zip(expected['probs_of_surviving_by_month'][e], resp['probs_of_surviving_by_month'][r]): + self.assertAlmostEquals(x, y, places=3) + for e, r in zip([0, 23], [0, 23]): + for x, y in zip(expected['probs_of_surviving_by_hour_of_the_day'][e], + resp['probs_of_surviving_by_hour_of_the_day'][r]): + self.assertAlmostEquals(x, y, places=3) - # def test_outage_sim(self): - # """ - # With diesel + PV + storage - # """ - # expected = { - # 'resilience_hours_min': 30, - # 'resilience_hours_max': 154, - # 'resilience_hours_avg': 82.1, - # "outage_durations": list(range(1, 155)), - # "probs_of_surviving": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, - # 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.9999, 0.9998, - # 0.9997, 0.9985, 0.9973, 0.9965, 0.9951, 0.9937, 0.9921, 0.989, 0.9861, 0.983, - # 0.9797, 0.976, 0.972, 0.9666, 0.9608, 0.9547, 0.9471, 0.9373, 0.9275, 0.9178, - # 0.9066, 0.897, 0.8868, 0.8761, 0.8647, 0.8521, 0.8398, 0.8285, 0.816, 0.8035, - # 0.7928, 0.7809, 0.7693, 0.7561, 0.7436, 0.7301, 0.7159, 0.701, 0.685, 0.6707, - # 0.6535, 0.6347, 0.6189, 0.6026, 0.5864, 0.5696, 0.5534, 0.5376, 0.5213, 0.5053, - # 0.4892, 0.4719, 0.4542, 0.4378, 0.4217, 0.4058, 0.3901, 0.3736, 0.3584, 0.3434, - # 0.3287, 0.3152, 0.3006, 0.2854, 0.2728, 0.2579, 0.2449, 0.2321, 0.2196, 0.2068, - # 0.1941, 0.1812, 0.1685, 0.1562, 0.1446, 0.1324, 0.1216, 0.1114, 0.1021, 0.0928, - # 0.084, 0.0752, 0.0675, 0.0603, 0.0533, 0.0466, 0.0411, 0.0371, 0.0333, 0.0296, - # 0.026, 0.0231, 0.0203, 0.0178, 0.0153, 0.0129, 0.0105, 0.0086, 0.0067, 0.0053, - # 0.0042, 0.0035, 0.0033, 0.0031, 0.0029, 0.0026, 0.0024, 0.0022, 0.0019, 0.0017, - # 0.0015, 0.0013, 0.0011, 0.001, 0.0009, 0.0008, 0.0007, 0.0006, 0.0005, 0.0003, - # 0.0002, 0.0001] - # } - # resp = simulate_outages(**self.inputs) + def test_outage_sim(self): + """ + With diesel + PV + storage + """ + expected = { + 'resilience_hours_min': 30, + 'resilience_hours_max': 154, + 'resilience_hours_avg': 82.1, + "outage_durations": list(range(1, 155)), + "probs_of_surviving": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.9999, 0.9998, + 0.9997, 0.9985, 0.9973, 0.9965, 0.9951, 0.9937, 0.9921, 0.989, 0.9861, 0.983, + 0.9797, 0.976, 0.972, 0.9666, 0.9608, 0.9547, 0.9471, 0.9373, 0.9275, 0.9178, + 0.9066, 0.897, 0.8868, 0.8761, 0.8647, 0.8521, 0.8398, 0.8285, 0.816, 0.8035, + 0.7928, 0.7809, 0.7693, 0.7561, 0.7436, 0.7301, 0.7159, 0.701, 0.685, 0.6707, + 0.6535, 0.6347, 0.6189, 0.6026, 0.5864, 0.5696, 0.5534, 0.5376, 0.5213, 0.5053, + 0.4892, 0.4719, 0.4542, 0.4378, 0.4217, 0.4058, 0.3901, 0.3736, 0.3584, 0.3434, + 0.3287, 0.3152, 0.3006, 0.2854, 0.2728, 0.2579, 0.2449, 0.2321, 0.2196, 0.2068, + 0.1941, 0.1812, 0.1685, 0.1562, 0.1446, 0.1324, 0.1216, 0.1114, 0.1021, 0.0928, + 0.084, 0.0752, 0.0675, 0.0603, 0.0533, 0.0466, 0.0411, 0.0371, 0.0333, 0.0296, + 0.026, 0.0231, 0.0203, 0.0178, 0.0153, 0.0129, 0.0105, 0.0086, 0.0067, 0.0053, + 0.0042, 0.0035, 0.0033, 0.0031, 0.0029, 0.0026, 0.0024, 0.0022, 0.0019, 0.0017, + 0.0015, 0.0013, 0.0011, 0.001, 0.0009, 0.0008, 0.0007, 0.0006, 0.0005, 0.0003, + 0.0002, 0.0001] + } + resp = simulate_outages(**self.inputs) - # self.assertAlmostEqual(expected['resilience_hours_min'], resp['resilience_hours_min'], places=4) - # self.assertAlmostEqual(expected['resilience_hours_max'], resp['resilience_hours_max'], places=4) - # self.assertAlmostEqual(expected['resilience_hours_avg'], resp['resilience_hours_avg'], places=4) - # self.assertListEqual(expected['outage_durations'], resp['outage_durations']) - # for x, y in zip(expected['probs_of_surviving'], resp['probs_of_surviving']): - # self.assertAlmostEquals(x, y, places=4) + self.assertAlmostEqual(expected['resilience_hours_min'], resp['resilience_hours_min'], places=4) + self.assertAlmostEqual(expected['resilience_hours_max'], resp['resilience_hours_max'], places=4) + self.assertAlmostEqual(expected['resilience_hours_avg'], resp['resilience_hours_avg'], places=4) + self.assertListEqual(expected['outage_durations'], resp['outage_durations']) + for x, y in zip(expected['probs_of_surviving'], resp['probs_of_surviving']): + self.assertAlmostEquals(x, y, places=4) - # def test_no_resilience(self): - # inputs = self.inputs - # inputs.update(pv_kw_ac_hourly=[], batt_kw=0, diesel_kw=0) - # resp = simulate_outages(**inputs) + def test_no_resilience(self): + inputs = self.inputs + inputs.update(pv_kw_ac_hourly=[], batt_kw=0, diesel_kw=0) + resp = simulate_outages(**inputs) - # self.assertEqual(0, resp['resilience_hours_min']) - # self.assertEqual(0, resp['resilience_hours_max']) - # self.assertEqual(0, resp['resilience_hours_avg']) - # self.assertEqual([], resp['outage_durations']) - # self.assertEqual([], resp['probs_of_surviving']) - # self.assertEqual([[0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0]], resp['probs_of_surviving_by_month']) - # self.assertEqual([[0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0]], resp['probs_of_surviving_by_hour_of_the_day']) + self.assertEqual(0, resp['resilience_hours_min']) + self.assertEqual(0, resp['resilience_hours_max']) + self.assertEqual(0, resp['resilience_hours_avg']) + self.assertEqual([], resp['outage_durations']) + self.assertEqual([], resp['probs_of_surviving']) + self.assertEqual([[0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0]], resp['probs_of_surviving_by_month']) + self.assertEqual([[0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0]], resp['probs_of_surviving_by_hour_of_the_day']) - # def test_flexible_timesteps(self): - # """ - # Same input with different timesteps-per-hour should have almost equal results. - # """ - # resp1 = simulate_outages(**self.inputs1) - # resp2 = simulate_outages(**self.inputs2) + def test_flexible_timesteps(self): + """ + Same input with different timesteps-per-hour should have almost equal results. + """ + resp1 = simulate_outages(**self.inputs1) + resp2 = simulate_outages(**self.inputs2) - # self.assertAlmostEqual(1, resp2['resilience_hours_max'] / resp1['resilience_hours_max'], places=1) - # self.assertAlmostEqual(resp2['resilience_hours_min'], resp1['resilience_hours_min'], places=0) - # self.assertAlmostEqual(1, resp2['resilience_hours_avg'] / resp1['resilience_hours_avg'], places=1) + self.assertAlmostEqual(1, resp2['resilience_hours_max'] / resp1['resilience_hours_max'], places=1) + self.assertAlmostEqual(resp2['resilience_hours_min'], resp1['resilience_hours_min'], places=0) + self.assertAlmostEqual(1, resp2['resilience_hours_avg'] / resp1['resilience_hours_avg'], places=1) - # for x, y in zip(resp1['probs_of_surviving'], resp2['probs_of_surviving']): - # self.assertAlmostEquals(x, y, places=1) + for x, y in zip(resp1['probs_of_surviving'], resp2['probs_of_surviving']): + self.assertAlmostEquals(x, y, places=1) - # def test_resil_endpoint(self): - # post = json.load(open(os.path.join('resilience_stats', 'tests', 'POST_nested.json'), 'r')) - # r = self.api_client.post('/v2/job/', format='json', data=post) - # reopt_resp = json.loads(r.content) - # run_uuid = reopt_resp['run_uuid'] + def test_resil_endpoint(self): + post = json.load(open(os.path.join('resilience_stats', 'tests', 'POST_nested.json'), 'r')) + r = self.api_client.post('/v2/job/', format='json', data=post) + reopt_resp = json.loads(r.content) + run_uuid = reopt_resp['run_uuid'] - # resp = self.api_client.post('/v2/outagesimjob/', format='json', data={"run_uuid": run_uuid, "bau": True}) - # self.assertEqual(resp.status_code, 201) - # resp = self.api_client.get('/v2/job//resilience_stats/'.replace("", run_uuid)) - # resp_dict = json.loads(resp.content)['outage_sim_results'] + resp = self.api_client.post('/v2/outagesimjob/', format='json', data={"run_uuid": run_uuid, "bau": True}) + self.assertEqual(resp.status_code, 201) + resp = self.api_client.get('/v2/job//resilience_stats/'.replace("", run_uuid)) + resp_dict = json.loads(resp.content)['outage_sim_results'] - # # NOTE: probabilities are sensitive to the SOC series, - # # which can change while keeping the same optimal LCC - # expected_probs = [0.3902, 0.2338, 0.1919, 0.1532, 0.1178, 0.0844, 0.0538, 0.0305, 0.0131, 0.0066, 0.0033, 0.001] - # for idx, p in enumerate(resp_dict["probs_of_surviving"]): - # self.assertAlmostEqual(p, expected_probs[idx], places=2) - # self.assertEqual(resp_dict["resilience_hours_avg"], 1.28) - # self.assertEqual(resp_dict["outage_durations"], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]) - # self.assertEqual(resp_dict["resilience_hours_min"], 0) - # self.assertEqual(resp_dict["resilience_hours_max"], 12) - # self.assertFalse("resilience_hours_max_bau" in resp_dict) + # NOTE: probabilities are sensitive to the SOC series, + # which can change while keeping the same optimal LCC + expected_probs = [0.3902, 0.2338, 0.1919, 0.1532, 0.1178, 0.0844, 0.0538, 0.0305, 0.0131, 0.0066, 0.0033, 0.001] + for idx, p in enumerate(resp_dict["probs_of_surviving"]): + self.assertAlmostEqual(p, expected_probs[idx], places=2) + self.assertEqual(resp_dict["resilience_hours_avg"], 1.28) + self.assertEqual(resp_dict["outage_durations"], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]) + self.assertEqual(resp_dict["resilience_hours_min"], 0) + self.assertEqual(resp_dict["resilience_hours_max"], 12) + self.assertFalse("resilience_hours_max_bau" in resp_dict) - # """ - # financial_check returns true if the financial scenario system capacities are greater than or equal to the - # resilience scenario system capacities - # """ - # resp = self.api_client.get( - # '/v2/financial_check/?financial_uuid={0}&resilience_uuid={0}'.format(run_uuid), - # format='json') - # self.assertEqual(resp.status_code, 200) - # results = json.loads(resp.content) - # self.assertTrue(results["survives_specified_outage"]) + """ + financial_check returns true if the financial scenario system capacities are greater than or equal to the + resilience scenario system capacities + """ + resp = self.api_client.get( + '/v2/financial_check/?financial_uuid={0}&resilience_uuid={0}'.format(run_uuid), + format='json') + self.assertEqual(resp.status_code, 200) + results = json.loads(resp.content) + self.assertTrue(results["survives_specified_outage"]) - # def test_outage_sim_chp(self): - # expected = { - # 'resilience_hours_min': 0, - # 'resilience_hours_max': 10, - # 'resilience_hours_avg': 0.01, - # "outage_durations": list(range(1, 11)), - # "probs_of_surviving": [0.0011, 0.001, 0.0009, 0.0008, 0.0007, 0.0006, 0.0005, 0.0003, 0.0002, 0.0001] - # } - # inputs = self.inputs - # inputs.update(pv_kw_ac_hourly=[], batt_kw=0, diesel_kw=0, chp_kw=10, critical_loads_kw=[10]*10 + [11]*8750) - # resp = simulate_outages(**inputs) + def test_outage_sim_chp(self): + expected = { + 'resilience_hours_min': 0, + 'resilience_hours_max': 10, + 'resilience_hours_avg': 0.01, + "outage_durations": list(range(1, 11)), + "probs_of_surviving": [0.0011, 0.001, 0.0009, 0.0008, 0.0007, 0.0006, 0.0005, 0.0003, 0.0002, 0.0001] + } + inputs = self.inputs + inputs.update(pv_kw_ac_hourly=[], batt_kw=0, diesel_kw=0, chp_kw=10, critical_loads_kw=[10]*10 + [11]*8750) + resp = simulate_outages(**inputs) - # self.assertAlmostEqual(expected['resilience_hours_min'], resp['resilience_hours_min'], places=4) - # self.assertAlmostEqual(expected['resilience_hours_max'], resp['resilience_hours_max'], places=4) - # self.assertAlmostEqual(expected['resilience_hours_avg'], resp['resilience_hours_avg'], places=4) - # self.assertListEqual(expected['outage_durations'], resp['outage_durations']) - # for x, y in zip(expected['probs_of_surviving'], resp['probs_of_surviving']): - # self.assertAlmostEquals(x, y, places=4) + self.assertAlmostEqual(expected['resilience_hours_min'], resp['resilience_hours_min'], places=4) + self.assertAlmostEqual(expected['resilience_hours_max'], resp['resilience_hours_max'], places=4) + self.assertAlmostEqual(expected['resilience_hours_avg'], resp['resilience_hours_avg'], places=4) + self.assertListEqual(expected['outage_durations'], resp['outage_durations']) + for x, y in zip(expected['probs_of_surviving'], resp['probs_of_surviving']): + self.assertAlmostEquals(x, y, places=4) From ddba2bcfb03f91f677d6a69466c276e2a81e9d0b Mon Sep 17 00:00:00 2001 From: bill-becker Date: Wed, 26 Jun 2024 13:25:12 -0600 Subject: [PATCH 122/142] Temp Update REopt.jl to mt-therm-effic branch --- julia_src/Manifest.toml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index d60586baa..5fb33a190 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -917,9 +917,11 @@ uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.REopt]] deps = ["ArchGDAL", "CSV", "CoolProp", "DataFrames", "Dates", "DelimitedFiles", "HTTP", "JLD", "JSON", "JuMP", "LinDistFlow", "LinearAlgebra", "Logging", "MathOptInterface", "Requires", "Roots", "Statistics", "TestEnv"] -git-tree-sha1 = "b51d56a6398f302100004184b64bbe3d1e137277" +git-tree-sha1 = "f4a44705bd9038f920be6998ec553897c09eb5d5" +repo-rev = "mt-therm-effic" +repo-url = "https://github.com/NREL/REopt.jl.git" uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6" -version = "0.47.1" +version = "0.47.0" [[deps.Random]] deps = ["SHA"] From 54bb8386a50a56e5574528788e635e5f307fdf03 Mon Sep 17 00:00:00 2001 From: bill-becker Date: Thu, 27 Jun 2024 11:35:20 -0600 Subject: [PATCH 123/142] Add thermal_efficiency input to chp_defaults endpoint --- julia_src/http.jl | 3 ++- reoptjl/views.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/julia_src/http.jl b/julia_src/http.jl index 8d3a38eaa..1addd45b2 100644 --- a/julia_src/http.jl +++ b/julia_src/http.jl @@ -199,7 +199,8 @@ function chp_defaults(req::HTTP.Request) float_vals = ["avg_boiler_fuel_load_mmbtu_per_hour", "boiler_efficiency", "avg_electric_load_kw", - "max_electric_load_kw"] + "max_electric_load_kw", + "thermal_efficiency"] int_vals = ["size_class"] bool_vals = ["is_electric_only"] all_vals = vcat(string_vals, float_vals, int_vals, bool_vals) diff --git a/reoptjl/views.py b/reoptjl/views.py index 3e41f7f62..269400733 100644 --- a/reoptjl/views.py +++ b/reoptjl/views.py @@ -381,7 +381,8 @@ def chp_defaults(request): "boiler_efficiency": request.GET.get("boiler_efficiency"), "avg_electric_load_kw": request.GET.get("avg_electric_load_kw"), "max_electric_load_kw": request.GET.get("max_electric_load_kw"), - "is_electric_only": request.GET.get("is_electric_only") + "is_electric_only": request.GET.get("is_electric_only"), + "thermal_efficiency": request.GET.get("thermal_efficiency") } if (request.GET.get("size_class")): inputs["size_class"] = int(request.GET.get("size_class")) From 198eb0ae2330d1255b6168e566b05ba7c10f7a60 Mon Sep 17 00:00:00 2001 From: bill-becker Date: Thu, 27 Jun 2024 14:09:36 -0600 Subject: [PATCH 124/142] Only add thermal_efficiency to inputs if exists --- reoptjl/views.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/reoptjl/views.py b/reoptjl/views.py index 269400733..d513e7642 100644 --- a/reoptjl/views.py +++ b/reoptjl/views.py @@ -381,11 +381,15 @@ def chp_defaults(request): "boiler_efficiency": request.GET.get("boiler_efficiency"), "avg_electric_load_kw": request.GET.get("avg_electric_load_kw"), "max_electric_load_kw": request.GET.get("max_electric_load_kw"), - "is_electric_only": request.GET.get("is_electric_only"), - "thermal_efficiency": request.GET.get("thermal_efficiency") + "is_electric_only": request.GET.get("is_electric_only") } - if (request.GET.get("size_class")): - inputs["size_class"] = int(request.GET.get("size_class")) + + if request.GET.get("size_class"): + inputs["size_class"] = int(request.GET.get("size_class")) # Not sure if this is necessary because we convert to int in http.jl + + if request.GET.get("thermal_efficiency"): + inputs["thermal_efficiency"] = request.GET.get("thermal_efficiency") # Conversion to correct type happens in http.jl + try: julia_host = os.environ.get('JULIA_HOST', "julia") http_jl_response = requests.get("http://" + julia_host + ":8081/chp_defaults/", json=inputs) From 991204811dfc44722d85f9739047ecd48e1b2de3 Mon Sep 17 00:00:00 2001 From: bill-becker Date: Thu, 27 Jun 2024 14:10:01 -0600 Subject: [PATCH 125/142] Avoid assigning Nothing type bc expects Float --- julia_src/http.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/julia_src/http.jl b/julia_src/http.jl index 1addd45b2..631da7486 100644 --- a/julia_src/http.jl +++ b/julia_src/http.jl @@ -207,7 +207,9 @@ function chp_defaults(req::HTTP.Request) # Process .json inputs and convert to correct type if needed for k in all_vals if !haskey(d, k) - d[k] = nothing + if !(k == "thermal_efficiency") # thermal_efficiency is of type Float64 (incl NaN), so it can't be "nothing" + d[k] = nothing + end elseif !isnothing(d[k]) if k in float_vals && typeof(d[k]) == String d[k] = parse(Float64, d[k]) From a5ceff1cd3ba9c1a8bb9efe016b17e62896ec3ba Mon Sep 17 00:00:00 2001 From: Hallie Dunham <70401017+hdunham@users.noreply.github.com> Date: Mon, 1 Jul 2024 17:21:34 -0600 Subject: [PATCH 126/142] add erp_outputs view --- resilience_stats/views.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/resilience_stats/views.py b/resilience_stats/views.py index 468a68453..75ae42814 100644 --- a/resilience_stats/views.py +++ b/resilience_stats/views.py @@ -105,6 +105,11 @@ def erp_results(request, run_uuid): return JsonResponse(resp, status=500) def erp_help(request): + """ + Served at host/erp/help + :param request: + :return: JSON response with all erp inputs + """ try: d = dict() d["reopt_run_uuid"] = ERPMeta.info_dict(ERPMeta)["reopt_run_uuid"] @@ -121,6 +126,19 @@ def erp_help(request): except Exception as e: return JsonResponse({"Error": "Unexpected error in ERP help endpoint: {}".format(e.args[0])}, status=500) +def erp_outputs(request): + """ + Served at host/erp/outputs + :return: JSON response with all erp outputs + """ + + try: + d = ERPOutputs.info_dict(ERPOutputs) + return JsonResponse(d) + + except Exception as e: + return JsonResponse({"Error": "Unexpected error in ERP help endpoint: {}".format(e.args[0])}, status=500) + def erp_chp_prime_gen_defaults(request): prime_mover = str(request.GET.get('prime_mover')) is_chp = bool(request.GET.get('is_chp')) From 9e1dc879eff4b0b1c7f6d053413ba6d7861297d7 Mon Sep 17 00:00:00 2001 From: Hallie Dunham <70401017+hdunham@users.noreply.github.com> Date: Mon, 1 Jul 2024 17:22:14 -0600 Subject: [PATCH 127/142] add erp/inputs and erp/outputs urls --- resilience_stats/urls_v3plus.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resilience_stats/urls_v3plus.py b/resilience_stats/urls_v3plus.py index 023b43161..977b28031 100644 --- a/resilience_stats/urls_v3plus.py +++ b/resilience_stats/urls_v3plus.py @@ -6,5 +6,7 @@ urlpatterns = [ re_path(r'^erp/(?P[0-9a-f-]+)/results/?$', views.erp_results), re_path(r'^erp/help/?$', views.erp_help), + re_path(r'^erp/inputs/?$', views.erp_help), + re_path(r'^erp/outputs/?$', views.erp_outputs), re_path(r'^erp/chp_defaults/?$', views.erp_chp_prime_gen_defaults), ] From d09ee96f16bda6be89c708c99b8ed64ebd947e92 Mon Sep 17 00:00:00 2001 From: Hallie Dunham <70401017+hdunham@users.noreply.github.com> Date: Mon, 1 Jul 2024 18:11:37 -0600 Subject: [PATCH 128/142] Update CHANGELOG.md --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36949fa54..344dc2341 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,12 @@ Classify the change according to the following categories: ##### Removed ### Patches +## Develop +### Minor Updates +#### Added +- `/erp/inputs` endpoint (calls `erp_help()`, same as `/erp/help`) +- `/erp/outputs` endpoint that GETs the ERP output field info (calls `erp_outputs()`) + ## v3.9.1 ### Minor Updates #### Added From bd14a0a4b654d2d0edfe70aade9bdea2bf31c306 Mon Sep 17 00:00:00 2001 From: bill-becker Date: Mon, 8 Jul 2024 15:20:38 -0600 Subject: [PATCH 129/142] Update REopt.jl to v0.47.2 --- julia_src/Manifest.toml | 6 ++---- reoptjl/api.py | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index 5fb33a190..ea4f14952 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -917,11 +917,9 @@ uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.REopt]] deps = ["ArchGDAL", "CSV", "CoolProp", "DataFrames", "Dates", "DelimitedFiles", "HTTP", "JLD", "JSON", "JuMP", "LinDistFlow", "LinearAlgebra", "Logging", "MathOptInterface", "Requires", "Roots", "Statistics", "TestEnv"] -git-tree-sha1 = "f4a44705bd9038f920be6998ec553897c09eb5d5" -repo-rev = "mt-therm-effic" -repo-url = "https://github.com/NREL/REopt.jl.git" +git-tree-sha1 = "c02ff7c0b60352164b89f39789424422083ae4eb" uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6" -version = "0.47.0" +version = "0.47.2" [[deps.Random]] deps = ["SHA"] diff --git a/reoptjl/api.py b/reoptjl/api.py index bd90ef685..4753f096e 100644 --- a/reoptjl/api.py +++ b/reoptjl/api.py @@ -98,7 +98,7 @@ def obj_create(self, bundle, **kwargs): meta = { "run_uuid": run_uuid, "api_version": 3, - "reopt_version": "0.47.1", + "reopt_version": "0.47.2", "status": "Validating..." } bundle.data.update({"APIMeta": meta}) From d00e455c6cada89cfb6a2864d98fc1ad50ecff33 Mon Sep 17 00:00:00 2001 From: Alex Zolan Date: Mon, 8 Jul 2024 19:15:25 -0600 Subject: [PATCH 130/142] Update CHANGELOG.md --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36949fa54..15dd0fee5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,12 @@ Classify the change according to the following categories: ##### Removed ### Patches +## Develop 2024-07-08 +#### Added +- Added attribute `thermal_efficiency` to the arguments of http endpoint `chp_defaults` +#### Fixed +- See fixes and changes here: https://github.com/NREL/REopt.jl/releases/tag/v0.47.2 + ## v3.9.1 ### Minor Updates #### Added From 0d43a4f3a45122abd8d4c6aea445d831a9819cdb Mon Sep 17 00:00:00 2001 From: Bill Becker <42586683+Bill-Becker@users.noreply.github.com> Date: Tue, 9 Jul 2024 11:15:14 -0600 Subject: [PATCH 131/142] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 15dd0fee5..5e7df597c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,7 +26,7 @@ Classify the change according to the following categories: ##### Removed ### Patches -## Develop 2024-07-08 +## v3.9.2 #### Added - Added attribute `thermal_efficiency` to the arguments of http endpoint `chp_defaults` #### Fixed From 7c3a4ab1e2b77381ddae78d38f4bc79e652a6690 Mon Sep 17 00:00:00 2001 From: Hallie Dunham <70401017+hdunham@users.noreply.github.com> Date: Tue, 9 Jul 2024 19:53:21 -0700 Subject: [PATCH 132/142] delete commented out reopt_version --- reoptjl/api.py | 1 - resilience_stats/api.py | 1 - 2 files changed, 2 deletions(-) diff --git a/reoptjl/api.py b/reoptjl/api.py index 480460721..e2a6264b7 100644 --- a/reoptjl/api.py +++ b/reoptjl/api.py @@ -98,7 +98,6 @@ def obj_create(self, bundle, **kwargs): meta = { "run_uuid": run_uuid, "api_version": 3, - # "reopt_version": "0.47.1", "status": "Validating..." } bundle.data.update({"APIMeta": meta}) diff --git a/resilience_stats/api.py b/resilience_stats/api.py index c92a9f9d2..754247fe4 100644 --- a/resilience_stats/api.py +++ b/resilience_stats/api.py @@ -62,7 +62,6 @@ def obj_create(self, bundle, **kwargs): meta_dict = { "run_uuid": erp_run_uuid, - # "reopt_version": "0.45.0", "status": "Validating..." } From c8338485b3ac8b2b50e4ca1cd25c9be785bf2ab5 Mon Sep 17 00:00:00 2001 From: Hallie Dunham <70401017+hdunham@users.noreply.github.com> Date: Tue, 9 Jul 2024 20:00:40 -0700 Subject: [PATCH 133/142] Update CHANGELOG.md --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e7df597c..4b96257ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,11 @@ Classify the change according to the following categories: ##### Removed ### Patches +## v3.9.3 +### Minor Updates +#### Changed +- Set **reopt_version** in **APIMeta** and **ERPMeta** programatically based on actual REopt.jl package version in Julia environment instead of hardcoded so doesn't need to be updated by hand + ## v3.9.2 #### Added - Added attribute `thermal_efficiency` to the arguments of http endpoint `chp_defaults` From 6e36f1609704156660bbf0d6aa34f896b4d416b8 Mon Sep 17 00:00:00 2001 From: Hallie Dunham <70401017+hdunham@users.noreply.github.com> Date: Wed, 10 Jul 2024 08:50:16 -0700 Subject: [PATCH 134/142] update reopt_version check in tests to not be specific number --- reoptjl/test/test_job_endpoint.py | 2 +- resilience_stats/tests/test_erp.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/reoptjl/test/test_job_endpoint.py b/reoptjl/test/test_job_endpoint.py index 407e1333e..0ecb02a09 100644 --- a/reoptjl/test/test_job_endpoint.py +++ b/reoptjl/test/test_job_endpoint.py @@ -25,7 +25,7 @@ def test_multiple_outages(self): run_uuid = r.get('run_uuid') resp = self.api_client.get(f'/v3/job/{run_uuid}/results') r = json.loads(resp.content) - self.assertEqual(r["reopt_version"], "0.47.1") + self.assertIn("reopt_version", resp.keys()) results = r["outputs"] self.assertEqual(np.array(results["Outages"]["unserved_load_series_kw"]).shape, (1,2,5)) self.assertEqual(np.array(results["Outages"]["generator_fuel_used_per_outage_gal"]).shape, (1,2)) diff --git a/resilience_stats/tests/test_erp.py b/resilience_stats/tests/test_erp.py index 8181f4290..d6dce6d8e 100644 --- a/resilience_stats/tests/test_erp.py +++ b/resilience_stats/tests/test_erp.py @@ -66,7 +66,7 @@ def test_erp_long_duration_battery(self): r_sim = json.loads(resp.content) erp_run_uuid = r_sim.get('run_uuid') resp = self.get_results_sim(erp_run_uuid) - self.assertEqual(resp["reopt_version"], "0.47.1") + self.assertIn("reopt_version", resp.keys()) results_sim = json.loads(resp.content)["outputs"] expected_result = ([1]*79)+[0.999543,0.994178,0.9871,0.97774,0.965753,0.949429,0.926712,0.899543,0.863584,0.826712,0.785616,0.736416,0.683105,0.626256,0.571005,0.519064,0.47226,0.429909,0.391553,0.357306,0] From 4535484cf27ff313be92582e0332533e7a072dd2 Mon Sep 17 00:00:00 2001 From: Hallie Dunham <70401017+hdunham@users.noreply.github.com> Date: Wed, 10 Jul 2024 09:10:23 -0700 Subject: [PATCH 135/142] convert JsonResponse to Dict before keys --- reoptjl/test/test_job_endpoint.py | 2 +- resilience_stats/tests/test_erp.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/reoptjl/test/test_job_endpoint.py b/reoptjl/test/test_job_endpoint.py index 0ecb02a09..8a41b24ce 100644 --- a/reoptjl/test/test_job_endpoint.py +++ b/reoptjl/test/test_job_endpoint.py @@ -25,7 +25,7 @@ def test_multiple_outages(self): run_uuid = r.get('run_uuid') resp = self.api_client.get(f'/v3/job/{run_uuid}/results') r = json.loads(resp.content) - self.assertIn("reopt_version", resp.keys()) + self.assertIn("reopt_version", r.keys()) results = r["outputs"] self.assertEqual(np.array(results["Outages"]["unserved_load_series_kw"]).shape, (1,2,5)) self.assertEqual(np.array(results["Outages"]["generator_fuel_used_per_outage_gal"]).shape, (1,2)) diff --git a/resilience_stats/tests/test_erp.py b/resilience_stats/tests/test_erp.py index d6dce6d8e..c9730e5a4 100644 --- a/resilience_stats/tests/test_erp.py +++ b/resilience_stats/tests/test_erp.py @@ -66,8 +66,9 @@ def test_erp_long_duration_battery(self): r_sim = json.loads(resp.content) erp_run_uuid = r_sim.get('run_uuid') resp = self.get_results_sim(erp_run_uuid) - self.assertIn("reopt_version", resp.keys()) - results_sim = json.loads(resp.content)["outputs"] + r = json.loads(resp.content) + self.assertIn("reopt_version", r.keys()) + results_sim = r["outputs"] expected_result = ([1]*79)+[0.999543,0.994178,0.9871,0.97774,0.965753,0.949429,0.926712,0.899543,0.863584,0.826712,0.785616,0.736416,0.683105,0.626256,0.571005,0.519064,0.47226,0.429909,0.391553,0.357306,0] #TODO: resolve bug where unlimted fuel markov portion of results goes to zero 1 timestep early From e618edcf9bb3cd90dad4862d189890ad72a50088 Mon Sep 17 00:00:00 2001 From: Hallie Dunham <70401017+hdunham@users.noreply.github.com> Date: Wed, 10 Jul 2024 09:19:13 -0700 Subject: [PATCH 136/142] test erp/inputs and erp/outputs endpoints --- resilience_stats/tests/test_erp.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/resilience_stats/tests/test_erp.py b/resilience_stats/tests/test_erp.py index fcd284360..3da388dce 100644 --- a/resilience_stats/tests/test_erp.py +++ b/resilience_stats/tests/test_erp.py @@ -16,6 +16,8 @@ def setUp(self): self.reopt_base_erp = '/v3/erp/' self.reopt_base_erp_results = '/v3/erp/{}/results/' self.reopt_base_erp_help = '/v3/erp/help/' + self.reopt_base_erp_inputs = '/v3/erp/inputs/' + self.reopt_base_erp_outputs = '/v3/erp/outputs/' self.reopt_base_erp_chp_defaults = '/v3/erp/chp_defaults/?prime_mover={0}&is_chp={1}&size_kw={2}' self.post_sim_gens_batt_pv_wind = os.path.join('resilience_stats', 'tests', 'ERP_sim_gens_batt_pv_wind_post.json') self.post_sim_large_stor = os.path.join('resilience_stats', 'tests', 'ERP_sim_large_stor_post.json') @@ -42,6 +44,12 @@ def get_results_sim(self, run_uuid): def get_help(self): return self.api_client.get(self.reopt_base_erp_help) + def get_inputs(self): + return self.api_client.get(self.reopt_base_erp_inputs) + + def get_outputs(self): + return self.api_client.get(self.reopt_base_erp_outputs) + def get_chp_defaults(self, prime_mover, is_chp, size_kw): return self.api_client.get( self.reopt_base_erp_chp_defaults.format(prime_mover, is_chp, size_kw), @@ -182,7 +190,7 @@ def test_erp_with_no_opt(self): resp = self.get_results_sim(erp_run_uuid) self.assertHttpOK(resp) - def test_erp_help_view(self): + def test_erp_help_views(self): """ Tests hiting the erp/help url to get defaults and other info about inputs """ @@ -190,6 +198,14 @@ def test_erp_help_view(self): resp = self.get_help() self.assertHttpOK(resp) resp = json.loads(resp.content) + + resp = self.get_inputs() + self.assertHttpOK(resp) + resp = json.loads(resp.content) + + resp = self.get_outputs() + self.assertHttpOK(resp) + resp = json.loads(resp.content) resp = self.get_chp_defaults("recip_engine", True, 10000) self.assertHttpOK(resp) From 1efd3fbe826aee162a7f3f0772650e10bec75a2a Mon Sep 17 00:00:00 2001 From: Hallie Dunham <70401017+hdunham@users.noreply.github.com> Date: Thu, 18 Jul 2024 15:14:26 -0600 Subject: [PATCH 137/142] Update views.py --- resilience_stats/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resilience_stats/views.py b/resilience_stats/views.py index 75ae42814..5719567d5 100644 --- a/resilience_stats/views.py +++ b/resilience_stats/views.py @@ -106,7 +106,7 @@ def erp_results(request, run_uuid): def erp_help(request): """ - Served at host/erp/help + Served at host/erp/help and host/erp/inputs :param request: :return: JSON response with all erp inputs """ From 9a5ec88c52dba3cbf6b63c772930de9b22dd65aa Mon Sep 17 00:00:00 2001 From: Hallie Dunham <70401017+hdunham@users.noreply.github.com> Date: Mon, 22 Jul 2024 11:35:44 -0600 Subject: [PATCH 138/142] make error messages from erp help, inputs, and outputs endpoints align with url name --- resilience_stats/urls_v3plus.py | 2 +- resilience_stats/views.py | 43 +++++++++++++++++++++++---------- 2 files changed, 31 insertions(+), 14 deletions(-) diff --git a/resilience_stats/urls_v3plus.py b/resilience_stats/urls_v3plus.py index 977b28031..9438b8960 100644 --- a/resilience_stats/urls_v3plus.py +++ b/resilience_stats/urls_v3plus.py @@ -6,7 +6,7 @@ urlpatterns = [ re_path(r'^erp/(?P[0-9a-f-]+)/results/?$', views.erp_results), re_path(r'^erp/help/?$', views.erp_help), - re_path(r'^erp/inputs/?$', views.erp_help), + re_path(r'^erp/inputs/?$', views.erp_inputs), re_path(r'^erp/outputs/?$', views.erp_outputs), re_path(r'^erp/chp_defaults/?$', views.erp_chp_prime_gen_defaults), ] diff --git a/resilience_stats/views.py b/resilience_stats/views.py index 5719567d5..d5d3b7add 100644 --- a/resilience_stats/views.py +++ b/resilience_stats/views.py @@ -104,28 +104,45 @@ def erp_results(request, run_uuid): resp['status'] = 'Error' return JsonResponse(resp, status=500) +def get_erp_inputs_info(): + d = dict() + d["reopt_run_uuid"] = ERPMeta.info_dict(ERPMeta)["reopt_run_uuid"] + # do models need to be passed in as arg? + d[ERPOutageInputs.key] = ERPOutageInputs.info_dict(ERPOutageInputs) + d[ERPPVInputs.key] = ERPPVInputs.info_dict(ERPPVInputs) + d[ERPWindInputs.key] = ERPWindInputs.info_dict(ERPWindInputs) + d[ERPElectricStorageInputs.key] = ERPElectricStorageInputs.info_dict(ERPElectricStorageInputs) + d[ERPGeneratorInputs.key] = ERPGeneratorInputs.info_dict(ERPGeneratorInputs) + d[ERPPrimeGeneratorInputs.key] = ERPPrimeGeneratorInputs.info_dict(ERPPrimeGeneratorInputs) + #TODO: add wind once implemented + return JsonResponse(d) + def erp_help(request): """ - Served at host/erp/help and host/erp/inputs + Served at host/erp/help :param request: :return: JSON response with all erp inputs """ try: - d = dict() - d["reopt_run_uuid"] = ERPMeta.info_dict(ERPMeta)["reopt_run_uuid"] - # do models need to be passed in as arg? - d[ERPOutageInputs.key] = ERPOutageInputs.info_dict(ERPOutageInputs) - d[ERPPVInputs.key] = ERPPVInputs.info_dict(ERPPVInputs) - d[ERPWindInputs.key] = ERPWindInputs.info_dict(ERPWindInputs) - d[ERPElectricStorageInputs.key] = ERPElectricStorageInputs.info_dict(ERPElectricStorageInputs) - d[ERPGeneratorInputs.key] = ERPGeneratorInputs.info_dict(ERPGeneratorInputs) - d[ERPPrimeGeneratorInputs.key] = ERPPrimeGeneratorInputs.info_dict(ERPPrimeGeneratorInputs) - #TODO: add wind once implemented - return JsonResponse(d) + resp = get_erp_inputs_info() + return resp except Exception as e: return JsonResponse({"Error": "Unexpected error in ERP help endpoint: {}".format(e.args[0])}, status=500) +def erp_inputs(request): + """ + Served at host/erp/inputs + :param request: + :return: JSON response with all erp inputs + """ + try: + resp = get_erp_inputs_info() + return resp + + except Exception as e: + return JsonResponse({"Error": "Unexpected error in ERP inputs endpoint: {}".format(e.args[0])}, status=500) + def erp_outputs(request): """ Served at host/erp/outputs @@ -137,7 +154,7 @@ def erp_outputs(request): return JsonResponse(d) except Exception as e: - return JsonResponse({"Error": "Unexpected error in ERP help endpoint: {}".format(e.args[0])}, status=500) + return JsonResponse({"Error": "Unexpected error in ERP outputs endpoint: {}".format(e.args[0])}, status=500) def erp_chp_prime_gen_defaults(request): prime_mover = str(request.GET.get('prime_mover')) From 4ac54c46740c65027685a69642d7cf4f30d0e80d Mon Sep 17 00:00:00 2001 From: Hallie Dunham <70401017+hdunham@users.noreply.github.com> Date: Mon, 22 Jul 2024 11:39:30 -0600 Subject: [PATCH 139/142] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b96257ff..e48cbdd7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,7 +26,7 @@ Classify the change according to the following categories: ##### Removed ### Patches -## v3.9.3 +## Develop ### Minor Updates #### Changed - Set **reopt_version** in **APIMeta** and **ERPMeta** programatically based on actual REopt.jl package version in Julia environment instead of hardcoded so doesn't need to be updated by hand From 1abc1d7c1fd4a038adc000613a32f646fbbd0135 Mon Sep 17 00:00:00 2001 From: Hallie Dunham <70401017+hdunham@users.noreply.github.com> Date: Mon, 22 Jul 2024 14:15:34 -0600 Subject: [PATCH 140/142] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aca87568b..6fa40b7fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,7 +26,7 @@ Classify the change according to the following categories: ##### Removed ### Patches -## Develop +## v3.9.3 ### Minor Updates #### Added - `/erp/inputs` endpoint (calls `erp_help()`, same as `/erp/help`) From 3710afff685149f5340508033d537bb64b0544e2 Mon Sep 17 00:00:00 2001 From: Hallie Dunham <70401017+hdunham@users.noreply.github.com> Date: Mon, 29 Jul 2024 14:03:36 -0700 Subject: [PATCH 141/142] Revert "Update CHANGELOG.md" This reverts commit 1abc1d7c1fd4a038adc000613a32f646fbbd0135. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fa40b7fa..aca87568b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,7 +26,7 @@ Classify the change according to the following categories: ##### Removed ### Patches -## v3.9.3 +## Develop ### Minor Updates #### Added - `/erp/inputs` endpoint (calls `erp_help()`, same as `/erp/help`) From 4ec5df99b8fd68bf462d9809b1e088c860c9ba8b Mon Sep 17 00:00:00 2001 From: Hallie Dunham <70401017+hdunham@users.noreply.github.com> Date: Mon, 29 Jul 2024 16:56:33 -0700 Subject: [PATCH 142/142] Reapply "Update CHANGELOG.md" This reverts commit 3710afff685149f5340508033d537bb64b0544e2. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aca87568b..6fa40b7fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,7 +26,7 @@ Classify the change according to the following categories: ##### Removed ### Patches -## Develop +## v3.9.3 ### Minor Updates #### Added - `/erp/inputs` endpoint (calls `erp_help()`, same as `/erp/help`)