Reputation: 7
I aim to develop an optimization model in Python for the supply of substance A based on the DA electricity prices. The desired output of the model is an hourly flow planning for the next day. I have drafted the following quadratic objective function:
in which the subscript i (or set N) specifies the unit: production unit I, II, III or the injection or extraction unit, phi depicts the flow for each unit (decision variables). DLC is a binary value which simulates the on/off button for each unit. Energy consumption e (kWh/m3) is the consumption at max capacity, which is scaled based on the flow. The function is subject to a set of linear constraints.
I could find little on multi-period quadratic optimization on-line and, therefore, I came here with my three questions:
Is solving this as a quadratic programming problem the right approach or are there linearization methods which could simplify the problem?
How can I model the multi-period scheduling element within Python?
What is the most user-friendly and suitable package to model this with in Python?
Many thanks in advance :)
Upvotes: 0
Views: 241
Reputation: 16724
As this is convex, you can use a bunch of linear equations to force staying close to the quadratic curve.
So replace Φ2 by z with
z ≥ Φ^2
which we approximate by
z ≥ a[k]*Φ+b[k]
for points along the z=Φ^2
curve.
Upvotes: 0
Reputation: 1
To answer your questions:
It is possible to solve this problem as a quadratic programming problem, but it may be easier to linearize the objective function using a method like McCormick relaxation. This can help to simplify the problem and make it more tractable.
To model the multi-period scheduling element, you can use decision variables to represent the flows for each hour of the planning horizon. These decision variables can be optimized subject to the appropriate constraints.
There are several packages that you can use to model this problem in Python. Some popular options include CVXPY, Pyomo, and Gurobi. It is best to choose a package that is well-documented and has a supportive community, so that you can easily find help and resources if you need them.
Upvotes: 0