From e49af3edd77a3494ff255c45eeee85bd8b287737 Mon Sep 17 00:00:00 2001 From: Thales1330 Date: Wed, 9 Nov 2016 17:38:02 -0200 Subject: Fixing reactive generation limit [2] --- Project/ElectricCalculation.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'Project/ElectricCalculation.h') diff --git a/Project/ElectricCalculation.h b/Project/ElectricCalculation.h index ac573cd..2b449a1 100644 --- a/Project/ElectricCalculation.h +++ b/Project/ElectricCalculation.h @@ -17,6 +17,23 @@ enum BusType { BUS_SLACK = 0, BUS_PV, BUS_PQ }; +enum ReactiveLimitsType { + RL_UNLIMITED = 0, // The bus can generate any ammount of reactive power. + RL_LIMITED, // The bus reactive power generation is limited. + RL_UNLIMITED_SOURCE, // The bus have at least one source of infinite reative power. + RL_MAX_REACHED, // Max limit reached + RL_MIN_REACHED, // Min limit reached + RL_NONE_REACHED // No limits reached +}; + +struct ReactiveLimits { + double maxLimit = 0.0; + double minLimit = 0.0; + ReactiveLimitsType maxLimitType = RL_UNLIMITED; + ReactiveLimitsType minLimitType = RL_UNLIMITED; + ReactiveLimitsType limitReached = RL_NONE_REACHED; +}; + class ElectricCalculation { public: @@ -27,6 +44,7 @@ class ElectricCalculation virtual void UpdateElementsPowerFlow(std::vector > voltage, std::vector > power, std::vector busType, + std::vector reactiveLimit, double systemPowerBase); protected: -- cgit