NREL / lore

Other
1 stars 0 forks source link

Add initial draft of the learning algorithm #62

Open odow opened 3 years ago

odow commented 3 years ago

@guyichen09 I have the learning stuff working with LORE. We can discuss tomorrow.

For now I've just done the outer-BO inner-PYBOBYQA algorithm.

I don't know how we should set all of the parameters of BO etc. There seems to be lots of magic values and settings?

cc @mortondp

odow commented 3 years ago

hl_stow_wind or hel_stow_limit or something similar is the wind-related cutoff v_wind_max

odow commented 3 years ago

I'm currently running a case study. For now it's just a single day on a 3x3 grid enumeration of input and output noise (0, 0.02, 0.04). Because the "ground truth" is synthetic, we're repeating each experiment 5 times. So that's 45 runs of the learning algorithm. I'll post an update of the results once they finish on Nova.

odow commented 3 years ago

The previous run only managed 1 replication due to #64, so I've fixed that and restarted things (along with some other changes; I don't think the avg_price_disp_storage_incentive was being set correctly because there's no difference in the plots).

I've kicked things off again, so once that finishes we should have plots like the following. Each is a 3x3 subplot for the different levels of input and output noise.

2-d scatter of the parameters colored by the loss function. Interestingly, although we've talked about non-convexity, it actually seems plausible that the loss function is convex. Or at least, convex-is from a high-level view. There might be some step changes in the loss if the plant is on the edge of turning off or on.

image

Training loss trajectories (Rather than one trajectory, this will have 10, assuming the trainings all finish.) The 10 trajectories should show a distribution of loss trajectories, probably showing that the bottom-left plot is an outlier that just sampled a "bad" ground-truth. image

odow commented 3 years ago

@zolanaj I tracked down why the storage incentive wasn't doing anything. It was embarrassingly obvious in retrospect: I had the value too small. I mean, I picked $0-100/MWh for the range because $100/MWh is a pretty high price right! Right? However if it's less than the PPA you're best to just burn it all now. So it ends up being a little bimodal: small and you run full tilt. High and you conserve as much as possible. There isn't much on the margin.

I'll go through the pretty pictures in tomorrow's call, but here are the new loss trajectories

image

And the new scatter plots

image
zolanaj commented 3 years ago

@zolanaj I tracked down why the storage incentive wasn't doing anything. It was embarrassingly obvious in retrospect: I had the value too small. I mean, I picked $0-100/MWh for the range because $100/MWh is a pretty high price right! Right? However if it's less than the PPA you're best to just burn it all now. So it ends up being a little bimodal: small and you run full tilt. High and you conserve as much as possible. There isn't much on the margin.

@odow Thanks for looking into this. Since we have a flat (PPA) price those results make sense. My guess is that with some multi-tiered pricing (e.g., a peak rate for 6 hours, and an off-peak rate for the other 18) we'd see some more flexibility, but the solution's storage level will likely look like a step function of the incentive in that setting. We'd just have multiple steps instead of one as in your current case.