NREL / REopt_API

The model for the REopt API, which is used as the back-end for the REopt Webtool (reopt.nrel.gov/tool), and can be accessed directly via the NREL Developer Network (https://developer.nrel.gov/docs/energy-optimization/reopt)
https://developer.nrel.gov/docs/energy-optimization/reopt
Other
91 stars 47 forks source link

Return cooling_defaults for all API calls to simulated_load endpoint that include cooling #491

Closed zolanaj closed 1 year ago

zolanaj commented 1 year ago

Note: for support questions and enhancement suggestions please use the REopt Forum (under development). This repository's issues are reserved for feature requests and bug reports.

Bill-Becker commented 1 year ago

@zolanaj In the current API, if I call /simulated_load with doe_reference_name=[chosen electric CRB], load_type=electric, and cooling_doe_ref_name=[any CRB], I get the cooling_defaults which should update the UI with default annual_tonhour when the user switches building type. I assume the UI is currently setup so that when the user selects "enter a custom annual cooling energy", then the UI is sending load_type=cooling instead of load_type=electric and that's the issue. Relatedly, when I actually send annual_tonhour with load_type=cooling, that's when I don't get the cooling_defaults. Is that latter part what we're missing?

Either way, it would be good to setup a branch of the API calling the REopt.jl branch in https://github.com/NREL/REopt.jl/pull/252 so we can test that it does what we want in the API before merging in the REopt.jl PR.

zolanaj commented 1 year ago

@Bill-Becker your view of the situation matches mine. The use case for refreshing the defaults with load_type=cooling is in the UI; when changing the building type in the drop-down menu for the cooling load profile (after absorption chiller or cold TES is checked), the default annual ton-hours are not updated (these aren't displayed in the current version of the Web Tool but are intended to be added in v3).

I agree with the plan - I'll set up a branch of the API to test this and follow up!

zolanaj commented 1 year ago

After further discussion, we won't add cooling_defaults to the simulated_load call when load_type == 'cooling'; rather, we will update the UI calls so that the default is linked to the electric load and cooling building type, using the existing version of simulated_load.