Учитывая данные, такие как потребление электроэнергии, выработка от солнечной панели, цена, (все в данный момент времени t), у нас есть батарея, и мы хотим оценить, сколько она должна (разряжать) / заряжать в любой момент времени.Проблема может быть сформулирована следующим образом:
Pt = price of electricity at time t
Lt = consumption of electricity at time t
Zt = charge of battery at time t (how much is in the battery)
St = Electricity generated from solar generator at time t
Qt = amount the battery (dis)/charges at time t
функция, которую мы пытаемся оптимизировать, является Ct = Pt *(Lt - St - Qt)
. Это направлено на минимизацию количества покупаемой электроэнергии
При следующих ограничениях:
Lt - St - Qt >= 0 (our demand has to be non-negative)
Qmin <= Qt <= Qmax ( the battery can only (dis)/charge between certain values at any given time)
Zmin <= Zt <= Zmax. (the battery has to be within its capacity, i.e. you can't discharge more than the battery holders, and you can charge more than the battery can hold)
Zt+1 = Zt + Qt+1 ( this means that the battery level at the next time step is equal to the battery level at the previous time step plus the amount that was (dis)/charged from the battery)
У меня возникла проблема, как сформулировать в Python (Scipy) проблема, особенно обновление уровня заряда батареи.
Я знаю, что существуют другие библиотеки (Pyomo, Pulp), решения в которых будут приветствоваться.