NREL / OCHRE

A Python-based building energy modeling (BEM) tool designed to model flexible loads in residential buildings
https://www.nrel.gov/grid/ochre.html
BSD 3-Clause "New" or "Revised" License
44 stars 7 forks source link

Battery Module does not work #121

Open phaniarvind opened 6 months ago

phaniarvind commented 6 months ago

The battery does not seem to work properly in the developer version of the package. With default inputs or manual input or with either control type the battery does not charge or discharge. The state of the battery does not change throughout the whole simulation and remains at the initial state. The battery mode is also always "Off" seemingly.

Attached is screenshot of my code. Here I am running the battery only. image

Here are the equipment arguments for the dwelling. image

The battery module does work in the stable release version of the package but as noted in a prior issue the PV doesn't. In the stable version the battery charges & discharges as per the schedule with the given parameters.

Any help is appreciated.

mnblonsky commented 6 months ago

I confirmed that the battery model works, it's just our documentation isn't up to date. control_type is no longer an input. You'll need to add:

'Battery': {
    'self_consumption_mode': True,
}

That is equivalent to setting control_type to 'Self-consumption' in the past. If you want to implement the 'Schedule' control, you need to either add a time series schedule with a column of Battery Electric Power (kW), or set the Battery power at each time step using P Setpoint. See the tutorial notebook for some examples.

We'll keep this issue open until we fix the documentation, but that may take some time. A couple of tasks for that: