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
45class PowerMismatch final {
46 public:
66 static Eigen::VectorXd compute(
67 const Eigen::VectorXd& Ps,
68 const Eigen::VectorXd& Qs,
69 const Eigen::MatrixXd& G,
70 const Eigen::MatrixXd& B,
71 const Eigen::VectorXd& V,
72 const Eigen::VectorXd& delta,
73 int n_bus,
74 const std::vector<int>& pq_bus_id,
75 Eigen::VectorXd& P,
76 Eigen::VectorXd& Q
77 );
78};
79
80#endif
Computes the power mismatch vector for use in Newton-Raphson iterations.
static Eigen::VectorXd compute(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.