summaryrefslogtreecommitdiffstats
path: root/Project/Sum.cpp
diff options
context:
space:
mode:
authorThales Lima Oliveira <thaleslima.ufu@gmail.com>2018-03-26 08:35:19 -0300
committerThales Lima Oliveira <thaleslima.ufu@gmail.com>2018-03-26 08:35:19 -0300
commite5a5041915127e72820a0478724a20dc41f0327e (patch)
tree176149cbc29ed27303647992c73d4a84e9862cce /Project/Sum.cpp
parent29af4e28898f44df444fef5534134c6b6000418d (diff)
downloadPSP.git-e5a5041915127e72820a0478724a20dc41f0327e.tar.gz
PSP.git-e5a5041915127e72820a0478724a20dc41f0327e.tar.xz
PSP.git-e5a5041915127e72820a0478724a20dc41f0327e.zip
Control systems initialization bug fixed
Diffstat (limited to 'Project/Sum.cpp')
-rw-r--r--Project/Sum.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Project/Sum.cpp b/Project/Sum.cpp
index 9908497..6d15e7f 100644
--- a/Project/Sum.cpp
+++ b/Project/Sum.cpp
@@ -218,7 +218,10 @@ bool Sum::Solve(double* input, double timeStep)
for(auto itCN = nodeList.begin(), itCNEnd = nodeList.end(); itCN != itCNEnd; ++itCN) {
Node* childNode = *itCN;
if(childNode == node) {
- inputVector.push_back(cLine->GetValue());
+ if(!cLine->IsSolved())
+ inputVector.push_back(0.0);
+ else
+ inputVector.push_back(cLine->GetValue());
break;
}
}