IBM / rl-testbed-for-energyplus

Reinforcement Learning Testbed for Power Consumption Optimization using EnergyPlus
MIT License
186 stars 77 forks source link

V22.1.0 + Complete refactor #92

Closed jmarrec closed 2 years ago

jmarrec commented 2 years ago

Complete refactor of the C++ code to eliminate global state, use constexpr, avoid gotos

This builds upon #91, but I didn't want to put it there because this is untested yet.

antoine-galataud commented 2 years ago

@jmarrec thanks for the refactoring, I have to test that.

jmarrec commented 2 years ago

https://github.com/jmarrec/EnergyPlus/releases/tag/v22.1.0-rl-testbed-refactor

Diff: https://github.com/jmarrec/EnergyPlus/compare/v22.1.0-rl-testbed...jmarrec:v22.1.0-rl-testbed-refactor?expand=1

jmarrec commented 2 years ago

FYI in 536db89 I made some extra refactoring, which will correspond to this new release: https://github.com/jmarrec/EnergyPlus/releases/tag/v22.1.0-rl-testbed-refactor-extra

diff : https://github.com/jmarrec/EnergyPlus/compare/v22.1.0-rl-testbed-refactor...jmarrec:v22.1.0-rl-testbed-refactor-extra?expand=1

In that one:

This is again untested, so perhaps you'll want to revert 536db89.

antoine-galataud commented 2 years ago

tested the main loop and it works fine. I didn't test new error codes handling and integration in C/Python API, but shouldn't be a problem to merge as is and see if it's functional and useful later.