# Power flow balance, active and reactive power, losses in Julia

**URL:** <https://discourse.julialang.org/t/power-flow-balance-active-and-reactive-power-losses-in-julia/122266>\
**Category:** Optimization (Mathematical)\
**Created:** [November 5, 2024, 12:54am UTC](https://discourse.julialang.org/t/power-flow-balance-active-and-reactive-power-losses-in-julia/122266 "2024-11-05T00:54:15Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [November 5, 2024, 1:15am UTC](https://discourse.julialang.org/t/power-flow-balance-active-and-reactive-power-losses-in-julia/122266/2 "2024-11-05T01:15:13Z")

</div>

Hi @saeedata7, welcome to the forum.

> are these codes right for calculating active and reactive power, losses in Python?

Note that this is a forum for Julia questions. We cannot help you with Python. However, your code looks like Julia, so perhaps this is just a typo?

You can improve your question by reading [Please read: make it easier to help you](https://discourse.julialang.org/t/please-read-make-it-easier-to-help-you/14757).

I can’t run your code because you are missing the definition of many of your data, etc.

If you’re interested in Power system optimization in Jullia, you may want to checkout [GitHub - lanl-ansi/PowerModels.jl: A Julia/JuMP Package for Power Network Optimization](https://github.com/lanl-ansi/PowerModels.jl).

---

_[View the full topic](https://discourse.julialang.org/t/power-flow-balance-active-and-reactive-power-losses-in-julia/122266)._
