Optimization with asymmetrical prices

9 次查看(过去 30 天)
Hi!
I am solving an optimization problem where a storage device is used to whether to buy or sell electricity during different time periods. I trying to understand how to mathematically solve an optimization problem in Matlab where there are different price/ cost arrays for selling and purchasing energy accordingly. It basically depends on a sign of the specific storage-related parameter (whether to take or give energy).
How could I implement this kind of conditional pricing in an objective function using the Matlab optimization toolbox?

采纳的回答

Walter Roberson
Walter Roberson 2023-9-5
When you have any kind of situation like that, the objective function almost always has discontinuous first derivatives. You have abrupt changes of behaviour between buy and sell, rather than smooth transitions between . You do not, for example, buy and sell according to a sine wave or according to Bessel functions: you effectively react according to unpredictable non-smooth external stimuli and abruptly change state.
Any optimization routine that relies upon jacobians or hessians cannot deal with those kinds of systems.
You need an optimization routine such as Genetic Algorithm (ga) which does not require that the functions be smooth.
It seems to me that if you had 100% accurate knowledge of the future, that you could achieve absolute best optimization. But you will never have 100% accurate knowledge of the future -- so it seems to me that your real problem is to try to pick the best forecasting algorithm that predicts the future the most accurately, with ability to make (possibly large) corrections based upon the "actual" data. You would have to test such algorithms multiple times over different scenarios in order to decide which algorithm was best overall (which is not necessarily going to be the one that optimizes best for any one scenario.)
  2 个评论
Anne
Anne 2023-9-6
Thank you for a very good overview.
This means that in this case, I couldn't use that simple optimization algorithm as it is with linear problems for example? Definitely, I will try to find more information about the genetic algorithm routine. Could you suggest some Matlab examples of a similar optimization problem so that I could learn and understand the testing part?
Torsten
Torsten 2023-9-6
编辑:Torsten 2023-9-6
If you define integer binary variables (0/1) where 0 stands for buying and 1 stands for selling, e.g., could you formulate your optimization problem with these variables ? In this case, you could try to use "intlinprog" for solving.
Is this of help for you ?

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Genetic Algorithm 的更多信息

标签

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by