Modelling of Electric Power Grid
The way to model the system and solve the system is the following:


Create a one-line power flow diagram 
Define your reference bus
Convert everything to  per-unit representation
Enumerate all buses
Write down a bus admittance matrix
Now write down your state variables, each load bus has a V and δ, generator buses have only V, and reference buses don't have state variables
To solve the system you can use many methods like Newton-Raphson or Gauss-Siedel


My best suggestion is that you try to get this book: Schaum's Outline of Electrical Power Systems. It has everything you need in an easy to understand format.