# Is there a power flow formulation that considers branches power transfer limit in PowerModels.jl?

**URL:** <https://discourse.julialang.org/t/is-there-a-power-flow-formulation-that-considers-branches-power-transfer-limit-in-powermodels-jl/57548>\
**Category:** Optimization (Mathematical)\
**Created:** [March 19, 2021, 3:28pm UTC](https://discourse.julialang.org/t/is-there-a-power-flow-formulation-that-considers-branches-power-transfer-limit-in-powermodels-jl/57548 "2021-03-19T15:28:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RaulRib](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raulrib/32/23081_2.png) [@RaulRib](https://discourse.julialang.org/u/RaulRib)\
**Post date:** [March 19, 2021, 3:28pm UTC](https://discourse.julialang.org/t/is-there-a-power-flow-formulation-that-considers-branches-power-transfer-limit-in-powermodels-jl/57548/1 "2021-03-19T15:28:19Z")

</div>

Hello,

I am working on a project where I investigate the behavior of power systems with congested lines.When running run\_ac\_pf or run\_dc\_pf, I notice that some branches resulting power flow exceed their limit. Searching through PowerModels.jl dependencies, I could not find a PF model that considers these limits. Is there one?

I see that OPF models bound branch flow variables by “rate\_a” and consider thermal limits constraints, but apparently the same is not true for PF models.

Cheers!

---

<div class="post-metadata">

**Author:** ![metab0t](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/metab0t/32/15551_2.png) [@metab0t](https://discourse.julialang.org/u/metab0t)\
**Post date:** [March 19, 2021, 3:35pm UTC](https://discourse.julialang.org/t/is-there-a-power-flow-formulation-that-considers-branches-power-transfer-limit-in-powermodels-jl/57548/2 "2021-03-19T15:35:37Z")

</div>

PF solver aims to solve a nonlinear equation system so security constraints are not considered. (Power injection is fixed)  
OPF solver aims to solve a nonlinear optimization problem including objective function and security constraints. (Power injection is adjustable as decision variable)

---

<div class="post-metadata">

**Author:** ![ccoffrin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ccoffrin/32/400_2.png) [@ccoffrin](https://discourse.julialang.org/u/ccoffrin)\
**Post date:** [March 19, 2021, 3:48pm UTC](https://discourse.julialang.org/t/is-there-a-power-flow-formulation-that-considers-branches-power-transfer-limit-in-powermodels-jl/57548/3 "2021-03-19T15:48:56Z")

</div>

@metab0t is correct. If you would like flow limits to be enforced you should give `run_ac_opf` and `run_dc_opf` a try.
