GMLC-1-4-2 / battery_interface

Implemenation of Device Models and their Battery Equivalent Interface
MIT License
5 stars 0 forks source link

Updates to include energy impact metrics for HVAC and refrigeration #131

Closed emayhorn closed 5 years ago

jmaguire1 commented 5 years ago

@emayhorn thanks for committing this, I've added it to the WH model

jmaguire1 commented 5 years ago

@emayhorn (cc @ORNLJD)

What value should be used if P_base is 0? Right now you'd get a divide by 0 error, I'd like to handle that case in case it ever happens. For water heaters it could happen if you didn't have that many WHs in your fleet, but I could see it happen for HVAC if you ran it during a cold period as well

emayhorn commented 5 years ago

@jmaguire1 i would not change P_base. You could change the output for the p_togrid/p_base ratio metric for different cases where P_base is zero (e.g p_togrid/p_base ratio = 1 if P_base = p_togrid = 0, p_togrid/p_base ratio = NA if p_togrid != p_base and p_base =0. However, it's not necessary to include the p_togrid/p_base ratio metric. The energy impact metric along with any other metrics you've selected for WHs would suffice.

jmaguire1 commented 5 years ago

@emayhorn

Right, I was really asking about what the ratio should be when P_base = 0, I wasn't planning on changing P_base itself. I think the values you suggested are reasonable (and a very low lift) so I'll go ahead and make that change once I'm done with the other issues for WHs.

jmaguire1 commented 5 years ago

@ORNLJD you probably want to handle this special case as well, you're probably not hitting this right now but you'll get a divide by 0 error in this metric that will crash the simulation if you don't

ORNLJD commented 5 years ago

@jmaguire1 Thank you! I have modified the code following Ebony's suggestion: P_base is zero (e.g p_togrid/p_base ratio = 1 if P_base = p_togrid = 0, p_togrid/p_base ratio = NA if p_togrid != p_base and p_base =0.

Hayden-Reeve commented 5 years ago

@hlngo please merge this PR