OCHRE icon indicating copy to clipboard operation
OCHRE copied to clipboard

Fixing EV random event generator

Open mnblonsky opened this issue 1 year ago • 5 comments

This addresses 2 bugs related to assigning EV charging events:

  • The random seed wasn't working, because events were generated before the seed was set. This is fixed.
  • There was no way to specify the event data, for example using the same events for Level 1/Level 2 chargers. The event data file is now an input.

No assigned issue. @JingWang-CUB raised this privately (see panel-tea branch).

  • [x] Reference the issue your PR is fixing
  • [x] Assign at least 1 reviewer for your PR
  • [x] Test with run_dwelling.py or other script
  • [x] Update documentation as appropriate
  • [x] Update changelog as appropriate

mnblonsky avatar May 16 '24 15:05 mnblonsky

@JingWang-CUB, feel free to cherry pick https://github.com/NREL/OCHRE/pull/122/commits/2a29228b7eafe8fd6ba3c92ae58a6fbb6ffdc874 in your branch. You'll need that update, plus updated inputs, to fix your issue.

One note about using the same event data - the data is generated based on assumed home charging level. I think people with Level 1 chargers tend to charge more often, and maybe arrive with lower SOC. Up to you if you want to use the Level 1 or Level 2 event data, but it's good to understand this limitation with the analysis.

mnblonsky avatar May 16 '24 15:05 mnblonsky

@mnblonsky: When you get a chance to update the documentation let me know and I'll approve. Change itself looks fine

jmaguire1 avatar May 16 '24 21:05 jmaguire1

Hi @mnblonsky , here are my testing results:

  1. With the same seed value, OCHRE now generates the same EV events for the same charging level, but varying the charging level still generates different events.
  2. When using the equipment_event_file input with an output file from a level 2 charger (e.g., EV_events.csv), I got the following error: image This is caused by the start_time in the result file written as a string instead of a float. Is there a quick way to fix this? Thanks!

JingWang-CUB avatar May 16 '24 21:05 JingWang-CUB

Oh sorry, the equipment_event_file should be one of the default files from OCHRE. See https://github.com/NREL/OCHRE/tree/main/defaults/EV

mnblonsky avatar May 16 '24 22:05 mnblonsky

This is now working. I misunderstood how the equipment_event_file was used. Now everything looks good.

JingWang-CUB avatar May 16 '24 22:05 JingWang-CUB