NREL / alfalfa

Alfalfa is a web service that enables runtime interaction with building energy models (OpenStudio/EnergyPlus and FMUs compiled from Modelica or Spawn) over REST APIs.
Other
43 stars 13 forks source link

Move metadata generation (Alfalfa Ruby gem) into core OS #506

Closed anyaelena closed 3 weeks ago

anyaelena commented 5 months ago

For discussion: target 9/24 release of OS. Staffing on OS side?

anyaelena commented 5 months ago

@TShapinsky @kbenne please document approach and pros/cons here.

TShapinsky commented 5 months ago

Moving Alfalfa metadata generation library into OS SDK

Pros:

Cons:

Keeping Alfalfa ruby gem as separate code

Pros:

Cons:

Other thoughts

Right now models processed by alfalfa are not portable because the external interface of E+ requires a socket connection to tell it when to advance. Additionally the functions that the alfalfa gem accomplishes are not trivial because of how we've had to work around the limitations of the external interface.

Transitioning to pyenergyplus from external interface makes the job of adding points to alfalfa much simpler. This is because creating inputs and outputs will no longer require modifications to the underlying model. This means that the only thing that model needs for alfalfa is metadata telling alfalfa which points to expose.

I don't think it makes sense to move to alfalfa metadata in the OS SDK until we are in the process of migrating to pyenergyplus. This is because the functions needed to implement metadata generation will become much simpler and are less likely to require changes in the future. Additionally, before we transition to pyenergyplus the models post alfalfa aren't portable anyways due to the inclusion of external interface.

anyaelena commented 5 months ago

This is added to our roadmap with the following timing:

  1. Updates to OpenStudio - can start immediately. Must be complete prior to October OS release which will include E+ 24.2 that includes required updates to Python bindings. Specifically, includes a way to access EMS global variables from Python. Confirm E+ roadmap with @Myoldmopar
  2. Release of Alfalfa using this functionality targeting FY25Q2 to allow time for OS release and any bug fixes.
TShapinsky commented 4 months ago

After talking with @kbenne the alflalfa point list will be stored in the OSRunner and expose an API similar to what currently exists in the migrate_pyenergyplus branch.

anyaelena commented 2 months ago

update from standup - @TShapinsky's current OS code reviewed by @kbenne. next steps to get this merged into OS:

  1. small adjustments requested by kbenne
  2. review of sample code/naming by @tanushree04 and @bonnema to ensure naming is intuitive for modelers
  3. assign someone on OS to review initiate merge of PR
anyaelena commented 3 weeks ago

Nice work @TShapinsky ! https://github.com/NREL/OpenStudio/pull/5236