summaryrefslogtreecommitdiffstats
path: root/Project/ElectricCalculation.cpp
diff options
context:
space:
mode:
authorThales Lima Oliveira <thaleslima.ufu@gmail.com>2017-07-26 21:32:35 -0300
committerThales Lima Oliveira <thaleslima.ufu@gmail.com>2017-07-26 21:32:35 -0300
commit49ac4c4fcedb03ef09f8faab176159f48896dc7e (patch)
treed8a864599a68ff5e0bee39c01704feb9d947dbfa /Project/ElectricCalculation.cpp
parent4ca362b083d7b20adfd80f1ec4b46a52789cdeb7 (diff)
downloadPSP.git-49ac4c4fcedb03ef09f8faab176159f48896dc7e.tar.gz
PSP.git-49ac4c4fcedb03ef09f8faab176159f48896dc7e.tar.xz
PSP.git-49ac4c4fcedb03ef09f8faab176159f48896dc7e.zip
5 machine models implemented
Diffstat (limited to 'Project/ElectricCalculation.cpp')
-rw-r--r--Project/ElectricCalculation.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/Project/ElectricCalculation.cpp b/Project/ElectricCalculation.cpp
index 2fcab57..e67c9b4 100644
--- a/Project/ElectricCalculation.cpp
+++ b/Project/ElectricCalculation.cpp
@@ -681,15 +681,16 @@ Machines::SyncMachineModel ElectricCalculation::GetMachineModel(SyncGenerator* g
auto data = generator->GetElectricalData();
if(data.transTd0 != 0.0) {
if(data.transTq0 != 0.0) {
- if(data.subTd0 != 0.0) {
- if(data.subTq0 != 0.0)
- return Machines::SM_MODEL_5;
- else
- return Machines::SM_MODEL_4;
- } else
- return Machines::SM_MODEL_3;
- } else
+ if(data.subTd0 != 0.0 || data.subTq0 != 0.0) {
+ return Machines::SM_MODEL_5;
+ }
+ return Machines::SM_MODEL_3;
+ } else {
+ if(data.subTd0 != 0.0 || data.subTq0 != 0.0) {
+ return Machines::SM_MODEL_4;
+ }
return Machines::SM_MODEL_2;
+ }
}
return Machines::SM_MODEL_1;