PowerFlowProgram.java 609 B

12345678910111213141516171819
  1. package holeg.power_flow;
  2. public class PowerFlowProgram {
  3. public static void main(String[] args) {
  4. // Load data
  5. Bus[] buses = TestData.getIEEE14Busses();
  6. Line[] lines = TestData.getIEEE14Lines();
  7. // Create problem and solver
  8. PowerFlowProblem problem = new PowerFlowProblem(buses, lines, 1, 1 / 100.0);
  9. Solver solver = new NewtonRaphsonSolver();
  10. // Solve the problem with default settings
  11. SolverResult result = solver.solve(problem, new SolverSettings());
  12. // Print result
  13. result.printTo(problem, System.out, "M");
  14. }
  15. }