summaryrefslogtreecommitdiffstats
path: root/Project/ElectricCalculation.h
diff options
context:
space:
mode:
authorThales1330 <thaleslima.ufu@gmail.com>2016-11-09 17:38:02 -0200
committerThales1330 <thaleslima.ufu@gmail.com>2016-11-09 17:38:02 -0200
commite49af3edd77a3494ff255c45eeee85bd8b287737 (patch)
treed2b65497b7d54d821fa684c54f5dac000f3e8dbe /Project/ElectricCalculation.h
parent457b0509cfcc0848faa0188820e01814ea69c0b1 (diff)
downloadPSP.git-e49af3edd77a3494ff255c45eeee85bd8b287737.tar.gz
PSP.git-e49af3edd77a3494ff255c45eeee85bd8b287737.tar.xz
PSP.git-e49af3edd77a3494ff255c45eeee85bd8b287737.zip
Fixing reactive generation limit [2]
Diffstat (limited to 'Project/ElectricCalculation.h')
-rw-r--r--Project/ElectricCalculation.h18
1 files changed, 18 insertions, 0 deletions
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<std::complex<double> > voltage,
std::vector<std::complex<double> > power,
std::vector<BusType> busType,
+ std::vector<ReactiveLimits> reactiveLimit,
double systemPowerBase);
protected: