给定输入,如电力消耗,太阳能电池板发电,价格(所有在给定的时间t),我们有一个电池,我们想要评估它应该(dis)/charge在任何特定的时间。这样做的目的是尽量减少用电量。battery level at the previous time step plus the amount that was (dis)/charged from the battery)
我所面临的问题是如何在python中制定这个问题,特别是更新电池<e
我想在Pyomo中创建一个线性模型,它的目标函数中有分段线性函数。lambda model: model.Y, sense=minimize)opt.solve(instance) 但是它抛出了一个错误:Solver does not support SOS level 2 constraints (我使用的是GLPK)。到目前为止,我从Pyomo文档中了解到的是,分段函数是<em