summaryrefslogtreecommitdiffstats
path: root/Project/FileHanding.cpp
diff options
context:
space:
mode:
authorThales Lima Oliveira <thaleslima.ufu@gmail.com>2018-04-11 09:23:12 -0300
committerGitHub <noreply@github.com>2018-04-11 09:23:12 -0300
commitaf070d92462ac5586aa6a0a80c51a8fa72710600 (patch)
tree1e78bf3ced07950a572b1d94c4b029c540c73148 /Project/FileHanding.cpp
parente5a5041915127e72820a0478724a20dc41f0327e (diff)
parentf6cd17abe2e788c2b1a1983a4d7efbd3b49880ca (diff)
downloadPSP.git-af070d92462ac5586aa6a0a80c51a8fa72710600.tar.gz
PSP.git-af070d92462ac5586aa6a0a80c51a8fa72710600.tar.xz
PSP.git-af070d92462ac5586aa6a0a80c51a8fa72710600.zip
Merge pull request #45 from Thales1330/wip/import-ANAREDE-files
Wip import anarede files
Diffstat (limited to 'Project/FileHanding.cpp')
-rw-r--r--Project/FileHanding.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Project/FileHanding.cpp b/Project/FileHanding.cpp
index 7262c57..91ddcfe 100644
--- a/Project/FileHanding.cpp
+++ b/Project/FileHanding.cpp
@@ -70,6 +70,8 @@ void FileHanding::SaveProject(wxFileName path)
XMLParser::SetNodeValue(doc, pfTolerance, simulationData.powerFlowTolerance);
auto pfMaxIter = XMLParser::AppendNode(doc, powerFlowPropNode, "MaxIterations");
XMLParser::SetNodeValue(doc, pfMaxIter, simulationData.powerFlowMaxIterations);
+ auto pfSlackAngle = XMLParser::AppendNode(doc, powerFlowPropNode, "SlackAngle");
+ XMLParser::SetNodeValue(doc, pfSlackAngle, simulationData.initAngle);
auto stabilityPropNode = XMLParser::AppendNode(doc, simulationPropNode, "Stability");
auto timeStep = XMLParser::AppendNode(doc, stabilityPropNode, "TimeStep");
@@ -284,6 +286,7 @@ bool FileHanding::OpenProject(wxFileName path)
simData.accFator = XMLParser::GetNodeValueDouble(powerFlow, "AccFactor");
simData.powerFlowTolerance = XMLParser::GetNodeValueDouble(powerFlow, "Tolerance");
simData.powerFlowMaxIterations = XMLParser::GetNodeValueInt(powerFlow, "MaxIterations");
+ simData.initAngle = XMLParser::GetNodeValueDouble(powerFlow, "SlackAngle");
// Stability
auto stability = simPropertiesNode->first_node("Stability");