deltaFlow
PowerMismatch.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
35#ifndef POWER_MISMATCH_H
36#define POWER_MISMATCH_H
37
38#include <Eigen/Dense>
39#include <vector>
40
60Eigen::VectorXd powerMismatch(
61 const Eigen::VectorXd& Ps,
62 const Eigen::VectorXd& Qs,
63 const Eigen::MatrixXd& G,
64 const Eigen::MatrixXd& B,
65 const Eigen::VectorXd& V,
66 const Eigen::VectorXd& delta,
67 int n_bus,
68 const std::vector<int>& pq_bus_id,
69 Eigen::VectorXd& P,
70 Eigen::VectorXd& Q
71);
72
73#endif
Eigen::VectorXd powerMismatch(const Eigen::VectorXd &Ps, const Eigen::VectorXd &Qs, const Eigen::MatrixXd &G, const Eigen::MatrixXd &B, const Eigen::VectorXd &V, const Eigen::VectorXd &delta, int n_bus, const std::vector< int > &pq_bus_id, Eigen::VectorXd &P, Eigen::VectorXd &Q)
Computes the power mismatch vector for use in Newton-Raphson iterations.