rl-institut / smooth

Simulation framework for non-linear state-dependant energy systems
Other
6 stars 7 forks source link

update battery: maximum flow definitions, allow for symmetrical c-rate and rename dod to soc_min #223

Closed j-brendel closed 3 years ago

j-brendel commented 3 years ago

The maximum flow definitions for p_in_max and p_out_max led to problems when using the MPC and turned out to be not necessarry as the limitations as to when the battery is full (and therefore can not be charged beyond 100%) and when it is empty (and therefore can not be discharged below 0 %) are handled within oemof and don't need to be defined in smooth.

There is also now the option to mark the c-rate a symmetrical by setting "self.symm_c_rate" to "True" (default is "False"). Then "self.c_rate_symm" is used for both "c_rate_charge" and "c_rate_discharge".
With this, the optimization is made simpler, as the optimizer can only optimize one common c-rate, witch is in the application often related to the power electronics costs.

The last change is a correction of the soc in update_states. There is a rounding error due to different accuracy (decimal places) which led to feasibility issues. The presented solution is a "quick fix" and will need to be replaced in the future.

j-ti commented 3 years ago

The last change is a correction of the soc in update_states. There is a rounding error due to different accuracy (decimal places) which led to feasibility issues. The presented solution is a "quick fix" and will need to be replaced in the future.

This fix for a rounding error only makes sense considering the MPC approach. Before merging to dev, it might be good to discuss this point with everybody, even though the influence on the results are very small