Modeling Simulation and Optimization of a Power System Network