Hi @vlle, I donāt use solph. But for an entire horizon problem, perhaps just add the following condition to the mixĀ ā on the assumption that two periods are required for the recharge and that discharging is banned (although that constraint is not shown) while recharging (perhaps this is an electric vehicle):

if `SOC_t`

< `force_charge_SOC`

,āthen `battery_t+1,2`

= ā`F_t+1,2`

where:

`t`

: the prevailing period *t*

`battery_t`

: battery outflow at period *t* (negative values represents inflows)

`SOC_t`

: battery state of charge at period *t*

`force_charge_SOC`

: a constant defining the minimum state of charge (say something like 20%)

`t+1,2`

: indicates the future two periods (assuming two periods are required for charging)

If discharge and recharge can occur simultaneously, you will also need to cater for that situation with variables for both `battery_in_t`

and `battery_out_t`

. And unless `F`

can additionally supply that prevailing load too, the underlying logic will need to be more sophisticated to adaptively cater for battery charging that necessarily exceeds more than two periods.

Or have IĀ missed something? cheers,Ā R