deltaFlow
NewtonRaphson.H
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Saud Zahir
3 *
4 * This file is part of deltaFlow.
5 *
6 * deltaFlow is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public
8 * License as published by the Free Software Foundation; either
9 * version 3 of the License, or (at your option) any later version.
10 *
11 * deltaFlow is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public
17 * License along with deltaFlow. If not, see
18 * <https://www.gnu.org/licenses/>.
19 */
20
77#ifndef NEWTONRAPHSON_H
78#define NEWTONRAPHSON_H
79
80#include <Eigen/Dense>
81#include <utility>
82#include <vector>
83
84struct BranchData;
85struct BusData;
86
107bool NewtonRaphson(
108 const Eigen::MatrixXd& G,
109 const Eigen::MatrixXd& B,
110 const Eigen::VectorXd& Ps,
111 const Eigen::VectorXd& Qs,
112 Eigen::VectorXd& V,
113 Eigen::VectorXd& delta,
114 int n_bus,
115 int n_pq,
116 const std::vector<int>& pq_bus_id,
117 int maxIter = 1024,
118 double tolerance = 1E-8,
119 std::vector<std::pair<int, double>>* iterHistory = nullptr
120);
121
122#endif
@ NewtonRaphson
Newton-Raphson iterative method.
Contains all relevant data for each transmission line or transformer branch.
Definition Data.H:83
Contains all relevant data for each bus in the power system.
Definition Data.H:55
Eigen::VectorXd V
Voltage magnitude [p.u.].
Definition Data.H:60
Eigen::VectorXd delta
Voltage angle [rad or deg].
Definition Data.H:61