Creating a collection of ordered tuple

Hi All,

I am relatively new to Julia, moving from GAMS and AMPL. I am building a JuMP mode, for Distribution Optimal power Flow. The grid is mostly radial, so I am thinking of creating a collection of order tuples (branches, sending_node, receiving_node). This then permits me to write each branch voltage drop constraints as V(sending_node) - V(receiving_node) - r(branches)*i(branches) = 0, Where each branch has a sending node and receiving node.

I was thinking if I could create a bunch of ordered tuples, I can iterate these constraints over the indices present in the tuples.

Any ideas on how I can write this??


Hey @Sharabh_Shukla,

You can find documentation for JuMP here:

There are also lots of examples on Github, for example:

You might also be interested in GitHub - lanl-ansi/PowerModels.jl: A Julia/JuMP Package for Power Network Optimization