PowerModels active and reactive power demand

Hello all,

I am new to Julia and I am trying to run an acopf problem, but having trouble on how to loop it for a whole day. I have the active and reactive power demand at each bus for every 30 minutes. Below is the code I have for allocating the same Pb and Qb at each node.

n=24
Pb = 7.75ones(n-1,1)
Qb = Pb
tan(acos(0.97))*ones(1,n-1)

Please help.

Hi @Glon, welcome to the forum :smile:

By default, PowerModels.jl builds single-period models.

Solving a multi period problem depends on how you want to solve it.

You could write a for-loop that loops over your data, modifies the network data struct in PowerModels, and solves a new problem for each 30 minute block.

Here’s the documentation for PowerModels: Getting Started · PowerModels

You might also want to consider something like this:

1 Like

Thank you!

I will give it a try and see how it goes.