By default the runpf() command does not enforce any of the limits you mention. 
The purpose of power flow is to compute the unknown voltages and flows for a 
set of specified generator voltages and active power injections. There is an 
option (pf.enforce_q_lims, see Table 4-2 in the MATPOWER User’s 
Manual<https://matpower.org/docs/MATPOWER-manual-7.1.pdf>) to enforce reactive 
generation limits, by relaxing the corresponding generator voltage setpoint. 
But that raises the point that each time you enforce a constraint with power 
flow, you have to define precisely how you will modify the inputs to the power 
flow (loads, generator active injections and voltage set points) to satisfy the 
constraint. For example, satisfying a violated branch limit, likely requires a 
redispatch of generators. How to you define how that redispatch should happen? 
The most logical way is to define some relative costs on the generation … and 
at that point you really are solving an OPF.

So, like Mirish said, I think what you really want is to use runopf() … with 
the appropriate set of costs and limits.

   Ray


On Mar 12, 2023, at 7:29 PM, Mirish Thakur <[email protected]> wrote:

Hi,
Why don't you use the "runopf" command then? It serves your purpose of 
enforcing the limits which you want.
Thanks
Mirish

On Sat, Mar 11, 2023 at 11:09 PM Muhammad Nadeem 
<[email protected]<mailto:[email protected]>> wrote:
Hello all,

Is there a way to enforce generation limits, branch flow limits, and voltage 
magnitude limits in the "runpf" command of matpower?



Thanks,
Nadeem


Reply via email to