add static grid limit as load management restriction#31
Conversation
Imho that's infeasible?
Shouldn't we return grid feed-in series then? Or generally (as we already do) just return the grid series? Imho this should not be infeasible but rather best effort. |
I agree in principle but from the user perspective, wouldn't it be good to get a feedback like "power demand 2.5kW above grid power limit at 12:15" rather than "infeasible"? If yes, we could return a specific status code for this kind of violation and additional data on time step and magnitude.
Agree, it should be best effort, not infeasible. We can return whatever you prefer. I was thinking it may be valuable information for the user to see the lost solar potential from such power limits (solar forecast vs. usable solar power). But of course you can still compute that on the evcc end as well, as long as you have the computed grid power time series. You decide. |
|
Good point. Add something like "grid limit violated"? We'd still need to make sure that the openapi spec supports that and it's treated as success. Maybe let's add this as result "hints" and keep the CBC optimizer result as-is? |
…mit-as-load-management-restriction
|
@andig, please have a look at what I added: the result now has flags whether limits were hit / exceeded and additional time series reporting the overshoot per timestep. |
|
Note: there is a bit more work to finalise this PR even if we all agree on the features added:
|
it now gets reported without penalties and strategy incentives
|
I will do more testing, however, I think we are good for a review from evcc side whether the interface (specifically the result reporting) makes sense from the caller's perspective. |
…mit-as-load-management-restriction
|
@andig , I'm done with testing, fixing and cleaning up. Ready for merging from my point of view. |
|
I'll take care of the changes later tonight |
| if self.is_grid_demand_rate_active: | ||
| clean_objective += - self.grid.prc_p_exc_imp \ | ||
| * pulp.value(self.variables['p_max_imp_exc']) | ||
| print(clean_objective) |
There was a problem hiding this comment.
@ekkea
Latest version of evopt prints quite some numbers in the log. Guess it is due to this print statement?
There was a problem hiding this comment.
| print(clean_objective) |
Fix #23
TO BE DISCUSSED: