summaryrefslogtreecommitdiffstats
path: root/Project
diff options
context:
space:
mode:
Diffstat (limited to 'Project')
-rw-r--r--Project/ControlEditor.cpp79
-rw-r--r--Project/ControlEditor.h19
-rw-r--r--Project/ControlElementContainer.cpp7
-rw-r--r--Project/ControlElementContainer.h4
-rw-r--r--Project/ControlElementSolver.cpp131
-rw-r--r--Project/ControlElementSolver.h44
-rw-r--r--Project/Divider.cpp76
-rw-r--r--Project/Divider.h43
-rw-r--r--Project/Electromechanical.cpp79
-rw-r--r--Project/Electromechanical.h13
-rw-r--r--Project/ElementPlotData.cpp2
-rw-r--r--Project/FileHanding.cpp807
-rw-r--r--Project/GeneratorStabForm.cpp9
-rw-r--r--Project/IOControl.cpp26
-rw-r--r--Project/IOControl.h7
-rw-r--r--Project/IOControlForm.cpp31
-rw-r--r--Project/MathOperation.cpp95
-rw-r--r--Project/MathOperation.h48
-rw-r--r--Project/Multiplier.cpp72
-rw-r--r--Project/Multiplier.h14
-rw-r--r--Project/Project.mk30
-rw-r--r--Project/Project.project4
-rw-r--r--Project/Project.txt4
-rw-r--r--Project/PropertiesForm.cpp2
-rw-r--r--Project/PropertiesForm.wxcp2
-rw-r--r--Project/Workspace.cpp6
-rw-r--r--Project/data/images/control/div.pngbin0 -> 713 bytes
-rw-r--r--Project/data/images/control/gain.pngbin599 -> 750 bytes
-rw-r--r--Project/data/images/control/io.pngbin787 -> 944 bytes
-rw-r--r--Project/data/images/control/limiter.pngbin637 -> 587 bytes
-rw-r--r--Project/data/images/control/mult.pngbin1080 -> 682 bytes
-rw-r--r--Project/data/images/control/rateLimiter.pngbin641 -> 651 bytes
-rw-r--r--Project/data/images/control/sat.pngbin779 -> 703 bytes
-rw-r--r--Project/data/images/control/sum.pngbin1173 -> 847 bytes
-rw-r--r--Project/data/images/control/transferFunc.pngbin808 -> 817 bytes
-rw-r--r--Project/data/images/control/value.pngbin610 -> 606 bytes
-rw-r--r--Project/data/images/icon.icobin0 -> 101146 bytes
-rw-r--r--Project/data/lang/pt_BR/pt_BR.mobin42633 -> 43272 bytes
-rw-r--r--Project/data/lang/pt_BR/pt_BR.po872
39 files changed, 1504 insertions, 1022 deletions
diff --git a/Project/ControlEditor.cpp b/Project/ControlEditor.cpp
index 75fe6c3..0bb6ed5 100644
--- a/Project/ControlEditor.cpp
+++ b/Project/ControlEditor.cpp
@@ -32,6 +32,8 @@
#include "Exponential.h"
#include "Constant.h"
#include "Gain.h"
+#include "MathOperation.h"
+#include "Divider.h"
#include "ControlElementSolver.h"
#include "ControlElementContainer.h"
@@ -173,32 +175,37 @@ void ControlEditor::BuildControlElementPanel()
wrapSizer->Add(constButton, 0, wxALL, 5);
constButton->Bind(wxEVT_LEFT_DOWN, &ControlEditor::LeftClickDown, this);
+ ControlElementButton* gainButton = new ControlElementButton(
+ m_panelControlElements, _("Gain"), wxImage(exePath + "\\..\\data\\images\\control\\gain.png"), ID_GAIN);
+ wrapSizer->Add(gainButton, 0, wxALL, 5);
+ gainButton->Bind(wxEVT_LEFT_DOWN, &ControlEditor::LeftClickDown, this);
+
ControlElementButton* limButton =
new ControlElementButton(m_panelControlElements, _("Limiter"),
wxImage(exePath + "\\..\\data\\images\\control\\limiter.png"), ID_LIMITER);
wrapSizer->Add(limButton, 0, wxALL, 5);
limButton->Bind(wxEVT_LEFT_DOWN, &ControlEditor::LeftClickDown, this);
- ControlElementButton* gainButton = new ControlElementButton(
- m_panelControlElements, _("Gain"), wxImage(exePath + "\\..\\data\\images\\control\\gain.png"), ID_GAIN);
- wrapSizer->Add(gainButton, 0, wxALL, 5);
- gainButton->Bind(wxEVT_LEFT_DOWN, &ControlEditor::LeftClickDown, this);
+ ControlElementButton* rateLimButton =
+ new ControlElementButton(m_panelControlElements, _("Rate limiter"),
+ wxImage(exePath + "\\..\\data\\images\\control\\rateLimiter.png"), ID_RATELIM);
+ wrapSizer->Add(rateLimButton, 0, wxALL, 5);
+ rateLimButton->Bind(wxEVT_LEFT_DOWN, &ControlEditor::LeftClickDown, this);
ControlElementButton* multButton = new ControlElementButton(
m_panelControlElements, _("Multiplier"), wxImage(exePath + "\\..\\data\\images\\control\\mult.png"), ID_MULT);
wrapSizer->Add(multButton, 0, wxALL, 5);
multButton->Bind(wxEVT_LEFT_DOWN, &ControlEditor::LeftClickDown, this);
+ ControlElementButton* divButton = new ControlElementButton(
+ m_panelControlElements, _("Divider"), wxImage(exePath + "\\..\\data\\images\\control\\div.png"), ID_MATH_DIV);
+ wrapSizer->Add(divButton, 0, wxALL, 5);
+ divButton->Bind(wxEVT_LEFT_DOWN, &ControlEditor::LeftClickDown, this);
+
ControlElementButton* satButton = new ControlElementButton(
m_panelControlElements, _("Exponential"), wxImage(exePath + "\\..\\data\\images\\control\\sat.png"), ID_EXP);
wrapSizer->Add(satButton, 0, wxALL, 5);
satButton->Bind(wxEVT_LEFT_DOWN, &ControlEditor::LeftClickDown, this);
-
- ControlElementButton* rateLimButton =
- new ControlElementButton(m_panelControlElements, _("Rate limiter"),
- wxImage(exePath + "\\..\\data\\images\\control\\rateLimiter.png"), ID_RATELIM);
- wrapSizer->Add(rateLimButton, 0, wxALL, 5);
- rateLimButton->Bind(wxEVT_LEFT_DOWN, &ControlEditor::LeftClickDown, this);
}
void ControlEditor::LeftClickDown(wxMouseEvent& event)
@@ -237,51 +244,55 @@ void ControlEditor::AddElement(ControlElementButtonID id)
switch(id) {
case ID_IO: {
m_mode = MODE_INSERT;
- IOControl* io = new IOControl(m_ioFlags, m_lastElementID);
+ IOControl* io = new IOControl(m_ioFlags, GetNextID());
m_elementList.push_back(io);
} break;
case ID_TF: {
m_mode = MODE_INSERT;
- TransferFunction* tf = new TransferFunction(m_lastElementID);
+ TransferFunction* tf = new TransferFunction(GetNextID());
m_elementList.push_back(tf);
} break;
case ID_SUM: {
m_mode = MODE_INSERT;
- Sum* sum = new Sum(m_lastElementID);
+ Sum* sum = new Sum(GetNextID());
m_elementList.push_back(sum);
} break;
case ID_CONST: {
m_mode = MODE_INSERT;
- Constant* constant = new Constant(m_lastElementID);
+ Constant* constant = new Constant(GetNextID());
m_elementList.push_back(constant);
} break;
case ID_LIMITER: {
m_mode = MODE_INSERT;
- Limiter* limiter = new Limiter(m_lastElementID);
+ Limiter* limiter = new Limiter(GetNextID());
m_elementList.push_back(limiter);
} break;
case ID_GAIN: {
m_mode = MODE_INSERT;
- Gain* gain = new Gain(m_lastElementID);
+ Gain* gain = new Gain(GetNextID());
m_elementList.push_back(gain);
} break;
case ID_MULT: {
m_mode = MODE_INSERT;
- Multiplier* mult = new Multiplier(m_lastElementID);
+ Multiplier* mult = new Multiplier(GetNextID());
m_elementList.push_back(mult);
} break;
case ID_EXP: {
m_mode = MODE_INSERT;
- Exponential* exp = new Exponential(m_lastElementID);
+ Exponential* exp = new Exponential(GetNextID());
m_elementList.push_back(exp);
} break;
case ID_RATELIM: {
m_mode = MODE_INSERT;
- RateLimiter* rateLim = new RateLimiter(m_lastElementID);
+ RateLimiter* rateLim = new RateLimiter(GetNextID());
m_elementList.push_back(rateLim);
} break;
+ case ID_MATH_DIV: {
+ m_mode = MODE_INSERT;
+ Divider* divider = new Divider(GetNextID());
+ m_elementList.push_back(divider);
+ }
}
- m_lastElementID++;
}
void ControlEditor::OnPaint(wxPaintEvent& event)
@@ -366,8 +377,7 @@ void ControlEditor::OnLeftClickDown(wxMouseEvent& event)
Node* node = *itN;
if(node->Contains(m_camera->ScreenToWorld(clickPoint))) {
m_mode = MODE_INSERT_LINE;
- ConnectionLine* line = new ConnectionLine(node, m_lastElementID);
- m_lastElementID++;
+ ConnectionLine* line = new ConnectionLine(node, GetNextID());
m_connectionList.push_back(line);
element->AddChild(line);
line->AddParent(element);
@@ -757,8 +767,6 @@ void ControlEditor::OnImportClick(wxCommandEvent& event)
wxOK | wxCENTRE | wxICON_ERROR);
msgDialog.ShowModal();
}
-
- SetLastElementID();
Redraw();
event.Skip();
}
@@ -801,7 +809,15 @@ void ControlEditor::OnTestClick(wxCommandEvent& event)
}
}
- solver.SolveNextStep(input);
+ // solver.SolveNextStep(input);
+ solver.SetInitialTerminalVoltage(input);
+ solver.SetActivePower(input);
+ solver.SetInitialMecPower(input);
+ solver.SetInitialVelocity(input);
+ solver.SetReactivePower(input);
+ solver.SetTerminalVoltage(input);
+ solver.SetVelocity(input);
+ solver.SolveNextStep();
if(printTime >= printStep) {
time.push_back(currentTime);
@@ -873,16 +889,17 @@ void ControlEditor::ConsolidateTexts()
}
}
-void ControlEditor::SetLastElementID()
+int ControlEditor::GetNextID()
{
int id = 0;
for(auto it = m_elementList.begin(), itEnd = m_elementList.end(); it != itEnd; ++it) {
- int elementID = (*it)->GetID();
- if(id < elementID) id = elementID;
+ ControlElement* element = *it;
+ if(element->GetID() > id) id = element->GetID();
}
for(auto it = m_connectionList.begin(), itEnd = m_connectionList.end(); it != itEnd; ++it) {
- int elementID = (*it)->GetID();
- if(id < elementID) id = elementID;
+ ConnectionLine* line = *it;
+ if(line->GetID() > id) id = line->GetID();
}
- m_lastElementID = ++id;
+ id++;
+ return id;
}
diff --git a/Project/ControlEditor.h b/Project/ControlEditor.h
index dfa76ab..5383e85 100644
--- a/Project/ControlEditor.h
+++ b/Project/ControlEditor.h
@@ -44,6 +44,8 @@ class RateLimiter;
class Exponential;
class Constant;
class Gain;
+class MathOperation;
+class Divider;
class ControlElementSolver;
class ControlElementContainer;
@@ -51,7 +53,18 @@ class ControlElementContainer;
class ChartView;
class ElementDataObject;
-enum ControlElementButtonID { ID_IO = 0, ID_TF, ID_SUM, ID_CONST, ID_LIMITER, ID_GAIN, ID_MULT, ID_EXP, ID_RATELIM };
+enum ControlElementButtonID {
+ ID_IO = 0,
+ ID_TF,
+ ID_SUM,
+ ID_CONST,
+ ID_LIMITER,
+ ID_GAIN,
+ ID_MULT,
+ ID_EXP,
+ ID_RATELIM,
+ ID_MATH_DIV
+};
/**
* @class ControlElementButton
@@ -140,7 +153,7 @@ class ControlEditor : public ControlEditorBase
void BuildControlElementPanel();
void SetViewport();
void ConsolidateTexts();
- void SetLastElementID();
+ int GetNextID();
std::vector<ConnectionLine*>::iterator DeleteLineFromList(std::vector<ConnectionLine*>::iterator& it);
@@ -160,8 +173,6 @@ class ControlEditor : public ControlEditorBase
bool m_firstDraw = true;
int m_ioFlags;
- int m_lastElementID = 0;
-
int m_inputType = 0;
double m_startTime = 1.0;
double m_slope = 1.0;
diff --git a/Project/ControlElementContainer.cpp b/Project/ControlElementContainer.cpp
index 3c420e7..9c9b1f1 100644
--- a/Project/ControlElementContainer.cpp
+++ b/Project/ControlElementContainer.cpp
@@ -46,6 +46,8 @@ void ControlElementContainer::FillContainer(ControlEditor* editor)
m_sumList.push_back(sum);
} else if(TransferFunction* tf = dynamic_cast<TransferFunction*>(*it)) {
m_tfList.push_back(tf);
+ } else if(Divider* divider = dynamic_cast<Divider*>(*it)) {
+ m_dividerList.push_back(divider);
}
}
}
@@ -62,6 +64,7 @@ void ControlElementContainer::ClearContainer()
m_rateLimiterList.clear();
m_sumList.clear();
m_tfList.clear();
+ m_dividerList.clear();
}
void ControlElementContainer::FillContainer(std::vector<ControlElement*> controlElementList,
@@ -90,6 +93,8 @@ void ControlElementContainer::FillContainer(std::vector<ControlElement*> control
m_sumList.push_back(sum);
} else if(TransferFunction* tf = dynamic_cast<TransferFunction*>(*it)) {
m_tfList.push_back(tf);
+ } else if(Divider* divider = dynamic_cast<Divider*>(*it)) {
+ m_dividerList.push_back(divider);
}
}
}
@@ -109,7 +114,7 @@ void ControlElementContainer::GetContainerCopy(std::vector<ControlElement*>& con
// Copy elements (exept connection line).
int nodeID = 0;
for(auto it = m_ctrlElementsList.begin(), itEnd = m_ctrlElementsList.end(); it != itEnd; ++it) {
- Element* oldElement = *it;
+ ControlElement* oldElement = *it;
ControlElement* copy = static_cast<ControlElement*>(oldElement->GetCopy());
controlElementList.push_back(copy);
// Copy nodes.
diff --git a/Project/ControlElementContainer.h b/Project/ControlElementContainer.h
index b9b9118..c8af332 100644
--- a/Project/ControlElementContainer.h
+++ b/Project/ControlElementContainer.h
@@ -33,6 +33,7 @@ class ControlElement;
#include "RateLimiter.h"
#include "Sum.h"
#include "TransferFunction.h"
+#include "Divider.h"
/**
* @class ControlElementContainer
@@ -66,10 +67,10 @@ class ControlElementContainer
std::vector<RateLimiter*> GetRateLimiterList() const { return m_rateLimiterList; }
std::vector<Sum*> GetSumList() const { return m_sumList; }
std::vector<TransferFunction*> GetTFList() const { return m_tfList; }
+ std::vector<Divider*> GetDividerList() const { return m_dividerList; }
protected:
std::vector<ControlElement*> m_ctrlElementsList;
std::vector<Constant*> m_constantList;
-
std::vector<ConnectionLine*> m_cLineList;
std::vector<Exponential*> m_exponentialList;
std::vector<Gain*> m_gainList;
@@ -79,6 +80,7 @@ class ControlElementContainer
std::vector<RateLimiter*> m_rateLimiterList;
std::vector<Sum*> m_sumList;
std::vector<TransferFunction*> m_tfList;
+ std::vector<Divider*> m_dividerList;
};
#endif // CONTROLELEMENTCONTAINER_H
diff --git a/Project/ControlElementSolver.cpp b/Project/ControlElementSolver.cpp
index 175a329..4ca4ef4 100644
--- a/Project/ControlElementSolver.cpp
+++ b/Project/ControlElementSolver.cpp
@@ -30,47 +30,36 @@
#include "Sum.h"
#include "TransferFunction.h"
-ControlElementSolver::ControlElementSolver(ControlEditor* controlEditor,
- double timeStep,
- double integrationError,
- bool startAllZero,
- double input)
+ControlElementSolver::ControlElementSolver(ControlEditor* controlEditor, double timeStep, double integrationError)
{
m_ctrlContainer = new ControlElementContainer();
m_ctrlContainer->FillContainer(controlEditor);
- Initialize(controlEditor, timeStep, integrationError, startAllZero, input);
+ Initialize(controlEditor, timeStep, integrationError);
}
ControlElementSolver::ControlElementSolver(ControlElementContainer* ctrlContainer,
double timeStep,
double integrationError,
- bool startAllZero,
- double input,
wxWindow* parent)
{
m_ctrlContainer = ctrlContainer;
- Initialize(parent, timeStep, integrationError, startAllZero, input);
+ Initialize(parent, timeStep, integrationError);
}
-void ControlElementSolver::Initialize(wxWindow* parent,
- double timeStep,
- double integrationError,
- bool startAllZero,
- double input)
+void ControlElementSolver::Initialize(wxWindow* parent, double timeStep, double integrationError)
{
// Check if the sistem have one input and one output
bool fail = false;
- wxString failMessage = "";
auto ioList = m_ctrlContainer->GetIOControlList();
- if(ioList.size() != 2) {
+ if(ioList.size() < 2) {
fail = true;
- failMessage = _("The control system must have one input and one output.");
+ m_failMessage = _("The control system must have at least one input and one output.");
}
bool haveInput, haveOutput;
haveInput = haveOutput = false;
for(auto it = ioList.begin(), itEnd = ioList.end(); it != itEnd; ++it) {
IOControl* io = *it;
- if(io->GetType() == Node::NODE_OUT) {
+ if(io->GetType() == Node::NODE_OUT && !haveInput) {
m_inputControl = io;
haveInput = true;
} else if(io->GetType() == Node::NODE_IN) {
@@ -80,37 +69,37 @@ void ControlElementSolver::Initialize(wxWindow* parent,
}
if(!fail && !haveInput) {
fail = true;
- failMessage = _("There is no input in the control system.");
+ m_failMessage = _("There is no input in the control system.");
}
if(!fail && !haveOutput) {
fail = true;
- failMessage = _("There is no output in the control system.");
+ m_failMessage = _("There is no output in the control system.");
}
if(!fail) {
if(m_inputControl->GetChildList().size() == 0) {
fail = true;
- failMessage = _("Input not connected.");
+ m_failMessage = _("Input not connected.");
}
}
m_timeStep = timeStep;
m_integrationError = integrationError;
if(!fail) {
- if(!InitializeValues(input, startAllZero)) {
+ if(!InitializeValues(true)) {
fail = true;
- failMessage = _("It was not possible to initialize the control system.");
+ m_failMessage = _("It was not possible to initialize the control system.");
}
}
if(fail) {
- wxMessageDialog msgDialog(parent, failMessage, _("Error"), wxOK | wxCENTRE | wxICON_ERROR);
+ wxMessageDialog msgDialog(parent, m_failMessage, _("Error"), wxOK | wxCENTRE | wxICON_ERROR);
msgDialog.ShowModal();
} else {
m_isOK = true;
}
}
-bool ControlElementSolver::InitializeValues(double input, bool startAllZero)
+bool ControlElementSolver::InitializeValues(bool startAllZero)
{
// Reset Elements values
auto elementList = m_ctrlContainer->GetControlElementsList();
@@ -147,7 +136,7 @@ bool ControlElementSolver::InitializeValues(double input, bool startAllZero)
while(error > minError) {
prevSol = currentSol;
prevError = error;
- SolveNextStep(input);
+ SolveNextStep();
currentSol = GetLastSolution();
numIt++;
error = std::abs(prevSol - currentSol);
@@ -160,7 +149,10 @@ bool ControlElementSolver::InitializeValues(double input, bool startAllZero)
m_timeStep /= 1.5;
}
}
- if(numIt >= maxIteration) return false;
+ if(numIt >= maxIteration) {
+ m_failMessage = _("It was not possible to initialize the control system.");
+ return false;
+ }
}
m_timeStep = origTimeStep;
m_solutions.clear();
@@ -169,7 +161,7 @@ bool ControlElementSolver::InitializeValues(double input, bool startAllZero)
return true;
}
-void ControlElementSolver::SolveNextStep(double input)
+void ControlElementSolver::SolveNextStep()
{
// Set all elements as not solved
auto elementList = m_ctrlContainer->GetControlElementsList();
@@ -183,12 +175,12 @@ void ControlElementSolver::SolveNextStep(double input)
cLine->SetSolved(false);
}
- // Get first node and set input value on connected lines
+ // Get first node connection
ConnectionLine* firstConn = static_cast<ConnectionLine*>(m_inputControl->GetChildList()[0]);
- m_inputControl->SetSolved();
- firstConn->SetValue(input);
+ /*m_inputControl->SetSolved();
+ firstConn->SetValue(1);
firstConn->SetSolved();
- FillAllConnectedChildren(firstConn);
+ FillAllConnectedChildren(firstConn);*/
// Set value to the connected lines in constants
auto constantList = m_ctrlContainer->GetConstantList();
@@ -203,6 +195,55 @@ void ControlElementSolver::SolveNextStep(double input)
}
}
+ // Set value to the connected lines in inputs
+ auto ioList = m_ctrlContainer->GetIOControlList();
+ for(auto it = ioList.begin(), itEnd = ioList.end(); it != itEnd; ++it) {
+ IOControl* io = *it;
+ if(io->GetChildList().size() == 1) {
+ io->SetSolved();
+ ConnectionLine* child = static_cast<ConnectionLine*>(io->GetChildList()[0]);
+ if(m_inputControl == io) firstConn = child;
+ bool inputType = true;
+ switch(io->GetValue()) {
+ io->SetSolved();
+ case IOControl::IN_TERMINAL_VOLTAGE: {
+ child->SetValue(m_terminalVoltage);
+ } break;
+ case IOControl::IN_VELOCITY: {
+ child->SetValue(m_velocity);
+ } break;
+ case IOControl::IN_ACTIVE_POWER: {
+ child->SetValue(m_activePower);
+ } break;
+ case IOControl::IN_REACTIVE_POWER: {
+ child->SetValue(m_reactivePower);
+ } break;
+ case IOControl::IN_INITIAL_TERMINAL_VOLTAGE: {
+ child->SetValue(m_initTerminalVoltage);
+ } break;
+ case IOControl::IN_INITIAL_MEC_POWER: {
+ child->SetValue(m_initMecPower);
+ } break;
+ case IOControl::IN_INITIAL_VELOCITY: {
+ child->SetValue(m_initVelocity);
+ } break;
+ case IOControl::IN_DELTA_VELOCITY: {
+ child->SetValue(m_deltaVelocity);
+ } break;
+ case IOControl::IN_DELTA_ACTIVE_POWER: {
+ child->SetValue(m_deltaPe);
+ } break;
+ default: {
+ inputType = false;
+ } break;
+ }
+ if(inputType) {
+ child->SetSolved();
+ FillAllConnectedChildren(child);
+ }
+ }
+ }
+
ConnectionLine* currentLine = firstConn;
while(currentLine) {
currentLine = SolveNextElement(currentLine);
@@ -233,12 +274,32 @@ void ControlElementSolver::SolveNextStep(double input)
}
}
- // Set the control system step output.
- if(m_outputControl->GetChildList().size() == 1) {
+ // Set the control system output.
+ /*if(m_outputControl->GetChildList().size() == 1) {
ConnectionLine* cLine = static_cast<ConnectionLine*>(m_outputControl->GetChildList()[0]);
m_solutions.push_back(cLine->GetValue());
} else
- m_solutions.push_back(0.0);
+ m_solutions.push_back(0.0);*/
+ for(auto it = ioList.begin(), itEnd = ioList.end(); it != itEnd; ++it) {
+ IOControl* io = *it;
+ if(io->GetChildList().size() == 1) {
+ io->SetSolved();
+ ConnectionLine* child = static_cast<ConnectionLine*>(io->GetChildList()[0]);
+ switch(io->GetValue()) {
+ io->SetSolved();
+ case IOControl::OUT_MEC_POWER: {
+ m_mecPower = child->GetValue();
+ m_solutions.push_back(m_mecPower);
+ } break;
+ case IOControl::OUT_FIELD_VOLTAGE: {
+ m_fieldVoltage = child->GetValue();
+ m_solutions.push_back(m_fieldVoltage);
+ } break;
+ default:
+ break;
+ }
+ }
+ }
}
void ControlElementSolver::FillAllConnectedChildren(ConnectionLine* parent)
diff --git a/Project/ControlElementSolver.h b/Project/ControlElementSolver.h
index 44925f5..9bc54f7 100644
--- a/Project/ControlElementSolver.h
+++ b/Project/ControlElementSolver.h
@@ -46,25 +46,33 @@ class ControlElementSolver
{
public:
ControlElementSolver() {}
- ControlElementSolver(ControlEditor* controlEditor,
- double timeStep = 1e-3,
- double integrationError = 1e-3,
- bool startAllZero = true,
- double input = 0.0);
+ ControlElementSolver(ControlEditor* controlEditor, double timeStep = 1e-3, double integrationError = 1e-3);
ControlElementSolver(ControlElementContainer* ctrlContainer,
double timeStep = 1e-3,
double integrationError = 1e-3,
- bool startAllZero = true,
- double input = 0.0,
wxWindow* parent = NULL);
virtual ~ControlElementSolver() {}
- virtual bool InitializeValues(double input, bool startAllZero);
- virtual void SolveNextStep(double input);
+ virtual bool InitializeValues(bool startAllZero);
+ virtual void SolveNextStep();
virtual std::vector<double> GetSolutions() { return m_solutions; }
virtual double GetLastSolution() { return m_solutions[m_solutions.size() - 1]; }
virtual bool IsOK() const { return m_isOK; }
+ virtual wxString GetErrorMessage() { return m_failMessage; }
+ void SetTerminalVoltage(double value) { m_terminalVoltage = value; }
+ void SetVelocity(double value) { m_velocity = value; }
+ void SetActivePower(double value) { m_activePower = value; }
+ void SetReactivePower(double value) { m_reactivePower = value; }
+ void SetInitialTerminalVoltage(double value) { m_initTerminalVoltage = value; }
+ void SetInitialMecPower(double value) { m_initMecPower = value; }
+ void SetInitialVelocity(double value) { m_initVelocity = value; }
+ void SetDeltaVelocity(double value) { m_deltaVelocity = value; }
+ void SetDeltaActivePower(double value) { m_deltaPe = value; }
+ double GetFieldVoltage() { return m_fieldVoltage; }
+ double GetMechanicalPower() { return m_mecPower; }
+ double GetVelocity() { return m_velocity; }
+ double GetActivePower() { return m_activePower; }
protected:
- void Initialize(wxWindow* parent, double timeStep, double integrationError, bool startAllZero, double input);
+ void Initialize(wxWindow* parent, double timeStep, double integrationError);
void FillAllConnectedChildren(ConnectionLine* parent);
ConnectionLine* SolveNextElement(ConnectionLine* currentLine);
@@ -73,9 +81,23 @@ class ControlElementSolver
double m_integrationError;
std::vector<double> m_solutions;
bool m_isOK = false;
+ wxString m_failMessage = _("Unknown error.");
- IOControl* m_inputControl = NULL;
+ IOControl* m_inputControl = NULL; /**< First input control to be solved */
IOControl* m_outputControl = NULL;
+ // Inputs
+ double m_terminalVoltage = 0.0;
+ double m_velocity = 0.0;
+ double m_activePower = 0.0;
+ double m_reactivePower = 0.0;
+ double m_initTerminalVoltage = 0.0;
+ double m_initMecPower = 0.0;
+ double m_initVelocity = 0.0;
+ double m_deltaVelocity = 0.0;
+ double m_deltaPe = 0.0;
+ // Outputs
+ double m_fieldVoltage = 0.0;
+ double m_mecPower = 0.0;
};
#endif // CONTROLELEMENTSOLVER_H
diff --git a/Project/Divider.cpp b/Project/Divider.cpp
new file mode 100644
index 0000000..2bd8251
--- /dev/null
+++ b/Project/Divider.cpp
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
+#include "Divider.h"
+#include "ConnectionLine.h"
+
+Divider::Divider(int id) : MathOperation(id) {}
+Divider::~Divider() {}
+void Divider::DrawSymbol() const
+{
+ // Plot divider.
+ glLineWidth(2.0);
+ std::vector<wxPoint2DDouble> mSymbol;
+ mSymbol.push_back(m_position + wxPoint2DDouble(-5, 0));
+ mSymbol.push_back(m_position + wxPoint2DDouble(5, 0));
+ glColor4d(0.0, 0.3, 1.0, 1.0);
+ DrawLine(mSymbol, GL_LINES);
+ DrawCircle(m_position + wxPoint2DDouble(0, -3), 2, 10, GL_POLYGON);
+ DrawCircle(m_position + wxPoint2DDouble(0, 3), 2, 10, GL_POLYGON);
+}
+
+bool Divider::Solve(double input, double timeStep)
+{
+ std::vector<double> inputVector;
+ for(auto itN = m_nodeList.begin(), itNEnd = m_nodeList.end(); itN != itNEnd; ++itN) {
+ Node* node = *itN;
+ if(node->GetNodeType() != Node::NODE_OUT) {
+ if(!node->IsConnected()) {
+ inputVector.push_back(0.0);
+ } else {
+ for(auto itC = m_childList.begin(), itCEnd = m_childList.end(); itC != itCEnd; ++itC) {
+ ConnectionLine* cLine = static_cast<ConnectionLine*>(*itC);
+ auto nodeList = cLine->GetNodeList();
+ for(auto itCN = nodeList.begin(), itCNEnd = nodeList.end(); itCN != itCNEnd; ++itCN) {
+ Node* childNode = *itCN;
+ if(childNode == node) {
+ inputVector.push_back(cLine->GetValue());
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ if(inputVector.size() != 2) return false;
+
+ // If the denominator is zero, set the output a big number (1e15).
+ if(std::abs(inputVector[1]) < 1e-15) {
+ m_output = 1e15;
+ } else {
+ m_output = inputVector[0] / inputVector[1];
+ }
+
+ return true;
+}
+
+Element* Divider::GetCopy()
+{
+ Divider* copy = new Divider(m_elementID);
+ *copy = *this;
+ return copy;
+}
diff --git a/Project/Divider.h b/Project/Divider.h
new file mode 100644
index 0000000..59b7309
--- /dev/null
+++ b/Project/Divider.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
+#ifndef DIVIDER_H
+#define DIVIDER_H
+
+#include "MathOperation.h"
+
+class ConnectionLine;
+
+/**
+ * @class Divider
+ * @author Thales Lima Oliveira <thales@ufu.br>
+ * @date 09/10/2017
+ * @brief Control element that divides two inputs.
+ * @file Divider.h
+ */
+class Divider : public MathOperation
+{
+ public:
+ Divider(int id);
+ ~Divider();
+
+ virtual void DrawSymbol() const;
+ virtual bool Solve(double input, double timeStep);
+ virtual Element* GetCopy();
+};
+
+#endif // DIVIDER_H
diff --git a/Project/Electromechanical.cpp b/Project/Electromechanical.cpp
index 4b8a711..b1d0e2f 100644
--- a/Project/Electromechanical.cpp
+++ b/Project/Electromechanical.cpp
@@ -513,11 +513,6 @@ bool Electromechanical::InitializeDynamicElements()
double epq = vq0 + ra * iq0 - xp * id0;
sd = 1.0 + satF * std::pow(epq, 6);
xds = (xd - xp) / sd + xp;
- /*CalculateSyncMachineSaturation(syncGenerator, id0, iq0, sq, sd, true, k);
- xqs = (xq - xp) / sq + xp;
- xds = (xd - xp) / sd + xp;
- eq0 = data.terminalVoltage + std::complex<double>(ra, xqs) * ia;
- delta = std::arg(eq0);*/
}
double ef0 = vq0 + ra * iq0 - xds * id0;
@@ -541,14 +536,8 @@ bool Electromechanical::InitializeDynamicElements()
data.oldSd = sd;
data.oldSq = sq;
- m_sdC = sd;
- m_sqC = sq;
-
switch(data.model) {
case Machines::SM_MODEL_1: {
- // double tranXd = data.transXd * k;
-
- // data.tranEq = data.initialFieldVoltage + (xd - tranXd) * id0;
data.tranEq = std::abs(eq0);
data.tranEd = 0.0;
@@ -606,10 +595,18 @@ bool Electromechanical::InitializeDynamicElements()
// Initialize controllers
if(data.useAVR) {
if(data.avrSolver) delete data.avrSolver;
- data.avrSolver = new ControlElementSolver(data.avr, m_timeStep * m_ctrlTimeStepMultiplier, m_tolerance,
- false, std::abs(data.terminalVoltage), m_parent);
+ data.avrSolver =
+ new ControlElementSolver(data.avr, m_timeStep * m_ctrlTimeStepMultiplier, m_tolerance, m_parent);
+ data.avrSolver->SetTerminalVoltage(std::abs(data.terminalVoltage));
+ data.avrSolver->SetInitialTerminalVoltage(std::abs(data.terminalVoltage));
+ data.avrSolver->SetActivePower(dataPU.activePower);
+ data.avrSolver->SetReactivePower(dataPU.reactivePower);
+ data.avrSolver->SetVelocity(data.speed);
+ data.avrSolver->SetInitialVelocity(data.speed);
+ data.avrSolver->InitializeValues(false);
if(!data.avrSolver->IsOK()) {
- m_errorMsg = _("Error on initializate the AVR of \"") + data.name + _("\".");
+ m_errorMsg = _("Error on initializate the AVR of \"") + data.name + wxT("\".\n") +
+ data.avrSolver->GetErrorMessage();
syncGenerator->SetElectricalData(data);
return false;
}
@@ -617,9 +614,16 @@ bool Electromechanical::InitializeDynamicElements()
if(data.useSpeedGovernor) {
if(data.speedGovSolver) delete data.speedGovSolver;
data.speedGovSolver = new ControlElementSolver(data.speedGov, m_timeStep * m_ctrlTimeStepMultiplier,
- m_tolerance, false, data.speed, m_parent);
+ m_tolerance, m_parent);
+ data.speedGovSolver->SetActivePower(dataPU.activePower);
+ data.speedGovSolver->SetReactivePower(dataPU.reactivePower);
+ data.speedGovSolver->SetVelocity(data.speed);
+ data.speedGovSolver->SetInitialVelocity(data.speed);
+ data.speedGovSolver->SetInitialMecPower(data.pm);
+ data.speedGovSolver->InitializeValues(false);
if(!data.speedGovSolver->IsOK()) {
- m_errorMsg = _("Error on initializate the speed governor of \"") + data.name + _("\".");
+ m_errorMsg = _("Error on initializate the speed governor of \"") + data.name + wxT("\".\n") +
+ data.speedGovSolver->GetErrorMessage();
syncGenerator->SetElectricalData(data);
return false;
}
@@ -686,7 +690,6 @@ bool Electromechanical::CalculateMachinesCurrents()
xdqs = 0.5 * (xds + xqs);
std::complex<double> y0 = std::complex<double>(ra, -xdq) / std::complex<double>(ra * ra + xd * xq, 0.0);
- // std::complex<double> iUnadjusted = y0 * e;
std::complex<double> iUnadjusted = y0 * v;
// [Ref] Arrillaga, J.; Arnold, C. P.. "Computer Modelling of Electrical Power Systems". Pg. 225-226
@@ -765,8 +768,6 @@ void Electromechanical::CalculateIntegrationConstants(SyncGenerator* syncGenerat
if(data.model == Machines::SM_MODEL_2 || data.model == Machines::SM_MODEL_3 || data.model == Machines::SM_MODEL_4 ||
data.model == Machines::SM_MODEL_5) {
data.icTranEq.m = m_timeStep / (2.0f * transTd0 + m_timeStep);
- // data.icTranEq.c = (1.0f - 2.0 * data.icTranEq.m) * data.tranEq +
- // data.icTranEq.m * (data.fieldVoltage + (syncXd - transXd) * id);
data.icTranEq.c = (1.0 - data.icTranEq.m * (1.0 + data.sd)) * data.tranEq +
data.icTranEq.m * (data.fieldVoltage + (syncXd - transXd) * id);
}
@@ -774,7 +775,6 @@ void Electromechanical::CalculateIntegrationConstants(SyncGenerator* syncGenerat
// Ed'
if(data.model == Machines::SM_MODEL_3 || data.model == Machines::SM_MODEL_4 || data.model == Machines::SM_MODEL_5) {
data.icTranEd.m = m_timeStep / (2.0f * transTq0 + m_timeStep);
- // data.icTranEd.c = (1.0f - 2.0f * data.icTranEd.m) * data.tranEd - data.icTranEd.m * (syncXq - transXq) * iq;
data.icTranEd.c =
(1.0 - data.icTranEd.m * (1.0 + data.sq)) * data.tranEd - data.icTranEd.m * (syncXq - transXq) * iq;
}
@@ -782,22 +782,17 @@ void Electromechanical::CalculateIntegrationConstants(SyncGenerator* syncGenerat
// Eq''
if(data.model == Machines::SM_MODEL_4 || data.model == Machines::SM_MODEL_5) {
data.icSubEq.m = m_timeStep / (2.0f * subTd0 + m_timeStep);
- // data.icSubEq.c =
- // (1.0f - 2.0f * data.icSubEq.m) * data.subEq + data.icSubEq.m * (data.tranEq + (transXd - subXd) * id);
data.icSubEq.c = (1.0 - data.icSubEq.m * (1.0 + data.sd)) * data.subEq +
data.icSubEq.m * (data.sd * data.tranEq + (transXd - subXd) * id);
}
// Ed''
if(data.model == Machines::SM_MODEL_4) {
data.icSubEd.m = m_timeStep / (2.0f * subTq0 + m_timeStep);
- // data.icSubEd.c = (1.0f - 2.0f * data.icSubEd.m) * data.subEd - data.icSubEd.m * (syncXq - subXq) * iq;
data.icSubEd.c =
(1.0f - data.icSubEd.m * (1.0 + data.sq)) * data.subEd - data.icSubEd.m * (syncXq - subXq) * iq;
}
if(data.model == Machines::SM_MODEL_5) {
data.icSubEd.m = m_timeStep / (2.0f * subTq0 + m_timeStep);
- // data.icSubEd.c =
- // (1.0f - 2.0f * data.icSubEd.m) * data.subEd + data.icSubEd.m * (data.tranEd - (transXq - subXq) * iq);
data.icSubEd.c = (1.0f - data.icSubEd.m * (1.0 + data.sq)) * data.subEd +
data.icSubEd.m * (data.sq * data.tranEd - (transXq - subXq) * iq);
}
@@ -836,17 +831,12 @@ bool Electromechanical::SolveSynchronousMachines()
sd = 2.0 * sd - data.oldSd;
sq = 2.0 * sq - data.oldSq;
- m_sdC = sd;
- m_sqC = sq;
-
CalculateSyncMachineIntVariables(syncGenerator, id, iq, sd, sq, pe, k);
} else {
CalculateIntegrationConstants(syncGenerator, 0.0f, 0.0f);
}
}
- m_wError = 0;
-
double error = 1.0;
int iterations = 0;
while(error > m_tolerance) {
@@ -893,7 +883,6 @@ bool Electromechanical::SolveSynchronousMachines()
return false;
}
}
- m_numIt = iterations;
// Solve controllers.
int ctrlRatio = static_cast<int>(1 / m_ctrlTimeStepMultiplier);
@@ -901,13 +890,26 @@ bool Electromechanical::SolveSynchronousMachines()
SyncGenerator* syncGenerator = *it;
auto data = syncGenerator->GetElectricalData();
if(data.useAVR && data.avrSolver) {
- for(int i = 0; i < ctrlRatio; ++i) data.avrSolver->SolveNextStep(std::abs(data.terminalVoltage));
- data.fieldVoltage = data.initialFieldVoltage + data.avrSolver->GetLastSolution();
+ data.avrSolver->SetTerminalVoltage(std::abs(data.terminalVoltage));
+ data.avrSolver->SetDeltaActivePower(data.electricalPower.real() - data.avrSolver->GetActivePower());
+ data.avrSolver->SetActivePower(data.electricalPower.real());
+ data.avrSolver->SetReactivePower(data.electricalPower.imag());
+ data.avrSolver->SetDeltaVelocity(data.speed - data.avrSolver->GetVelocity());
+ data.avrSolver->SetVelocity(data.speed);
+
+ for(int i = 0; i < ctrlRatio; ++i) data.avrSolver->SolveNextStep();
+
+ data.fieldVoltage = data.initialFieldVoltage + data.avrSolver->GetFieldVoltage();
}
if(data.useSpeedGovernor && data.speedGovSolver) {
- for(int i = 0; i < ctrlRatio; ++i) data.speedGovSolver->SolveNextStep(data.speed);
- data.pm = data.speedGovSolver->GetLastSolution();
+ data.speedGovSolver->SetVelocity(data.speed);
+ data.speedGovSolver->SetActivePower(data.electricalPower.real());
+ data.speedGovSolver->SetReactivePower(data.electricalPower.imag());
+
+ for(int i = 0; i < ctrlRatio; ++i) data.speedGovSolver->SolveNextStep();
+
+ data.pm = data.speedGovSolver->GetMechanicalPower();
}
syncGenerator->SetElectricalData(data);
}
@@ -938,11 +940,6 @@ void Electromechanical::SaveData()
bus->SetElectricalData(data);
}
}
-
- m_wErrorVector.push_back(m_wError);
- m_numItVector.push_back(m_numIt);
- m_sdCVector.push_back(m_sdC);
- m_sqCVector.push_back(m_sqC);
}
void Electromechanical::SetSyncMachinesModel()
@@ -1012,8 +1009,6 @@ double Electromechanical::CalculateSyncMachineIntVariables(SyncGenerator* syncGe
double w = data.icSpeed.c + data.icSpeed.m * (data.pm - pe);
error = std::max(error, std::abs(data.speed - w) / m_refSpeed);
- m_wError += std::abs(data.speed - w) / m_refSpeed;
-
double delta = data.icDelta.c + data.icDelta.m * w;
error = std::max(error, std::abs(data.delta - delta));
diff --git a/Project/Electromechanical.h b/Project/Electromechanical.h
index bd6784d..cba15dc 100644
--- a/Project/Electromechanical.h
+++ b/Project/Electromechanical.h
@@ -57,13 +57,6 @@ class Electromechanical : public ElectricCalculation
bool RunStabilityCalculation();
wxString GetErrorMessage() const { return m_errorMsg; }
std::vector<double> GetTimeVector() const { return m_timeVector; }
- std::vector<double> m_wErrorVector;
- std::vector<double> m_deltaErrorVector;
- std::vector<double> m_transEdErrorVector;
- std::vector<double> m_transEqErrorVector;
- std::vector<double> m_numItVector;
- std::vector<double> m_sdCVector;
- std::vector<double> m_sqCVector;
protected:
void SetEventTimeList();
@@ -133,12 +126,6 @@ class Electromechanical : public ElectricCalculation
std::vector<bool> m_eventOccurrenceList;
std::vector<double> m_timeVector;
-
- // tests
- double m_wError = 0.0;
- double m_sdC = 1.0;
- double m_sqC = 1.0;
- double m_numIt = 0;
};
#endif // ELECTROMECHANICAL_H
diff --git a/Project/ElementPlotData.cpp b/Project/ElementPlotData.cpp
index d08108b..577ae23 100644
--- a/Project/ElementPlotData.cpp
+++ b/Project/ElementPlotData.cpp
@@ -33,7 +33,7 @@ void ElementPlotData::AddData(std::vector<double> values, wxString name)
data->SetAxis(0);
data->SetColour(*wxBLACK);
data->SetPenType(wxPENSTYLE_SOLID);
- data->SetThick(2);
+ data->SetThick(1);
m_elementData.push_back(data);
}
diff --git a/Project/FileHanding.cpp b/Project/FileHanding.cpp
index e1a8e4b..210f86b 100644
--- a/Project/FileHanding.cpp
+++ b/Project/FileHanding.cpp
@@ -1995,6 +1995,32 @@ void FileHanding::SaveControlElements(rapidxml::xml_document<>& doc,
SaveControlNodes(doc, nodeList, multiplier->GetNodeList());
} //}
+ //{ Divider
+ auto dividersNode = AppendNode(doc, elementsNode, "DividerList");
+ auto dividersList = ctrlContainer->GetDividerList();
+ for(auto it = dividersList.begin(), itEnd = dividersList.end(); it != itEnd; ++it) {
+ Divider* divider = *it;
+ auto dividerNode = AppendNode(doc, dividersNode, "Divider");
+ SetNodeAttribute(doc, dividerNode, "ID", divider->GetID());
+ auto cadProp = AppendNode(doc, dividerNode, "CADProperties");
+ auto position = AppendNode(doc, cadProp, "Position");
+ auto posX = AppendNode(doc, position, "X");
+ SetNodeValue(doc, posX, divider->GetPosition().m_x);
+ auto posY = AppendNode(doc, position, "Y");
+ SetNodeValue(doc, posY, divider->GetPosition().m_y);
+ auto size = AppendNode(doc, cadProp, "Size");
+ auto width = AppendNode(doc, size, "Width");
+ SetNodeValue(doc, width, divider->GetWidth());
+ auto height = AppendNode(doc, size, "Height");
+ SetNodeValue(doc, height, divider->GetHeight());
+ auto angle = AppendNode(doc, cadProp, "Angle");
+ SetNodeValue(doc, angle, divider->GetAngle());
+
+ // Nodes
+ auto nodeList = AppendNode(doc, dividerNode, "NodeList");
+ SaveControlNodes(doc, nodeList, divider->GetNodeList());
+ } //}
+
//{ Rate limiter
auto rateLimitersNode = AppendNode(doc, elementsNode, "RateLimiterList");
auto rateLimiterList = ctrlContainer->GetRateLimiterList();
@@ -2148,437 +2174,486 @@ bool FileHanding::OpenControlElements(rapidxml::xml_document<>& doc,
//{ Constant
auto constListNode = elementsNode->first_node("ConstantList");
- if(!constListNode) return false;
- auto constNode = constListNode->first_node("Constant");
- while(constNode) {
- int id = GetAttributeValueInt(constNode, "ID");
- Constant* constant = new Constant(id);
+ if(constListNode) {
+ auto constNode = constListNode->first_node("Constant");
+ while(constNode) {
+ int id = GetAttributeValueInt(constNode, "ID");
+ Constant* constant = new Constant(id);
- auto cadPropNode = constNode->first_node("CADProperties");
- if(!cadPropNode) return false;
+ auto cadPropNode = constNode->first_node("CADProperties");
+ if(!cadPropNode) return false;
- auto position = cadPropNode->first_node("Position");
- double posX = GetNodeValueDouble(position, "X");
- double posY = GetNodeValueDouble(position, "Y");
- auto size = cadPropNode->first_node("Size");
- double width = GetNodeValueDouble(size, "Width");
- double height = GetNodeValueDouble(size, "Height");
- double angle = GetNodeValueDouble(cadPropNode, "Angle");
+ auto position = cadPropNode->first_node("Position");
+ double posX = GetNodeValueDouble(position, "X");
+ double posY = GetNodeValueDouble(position, "Y");
+ auto size = cadPropNode->first_node("Size");
+ double width = GetNodeValueDouble(size, "Width");
+ double height = GetNodeValueDouble(size, "Height");
+ double angle = GetNodeValueDouble(cadPropNode, "Angle");
- double value = GetNodeValueDouble(constNode, "Value");
+ double value = GetNodeValueDouble(constNode, "Value");
- constant->SetWidth(width);
- constant->SetHeight(height);
- constant->SetAngle(angle);
- constant->SetPosition(wxPoint2DDouble(posX, posY));
- constant->StartMove(constant->GetPosition());
+ constant->SetWidth(width);
+ constant->SetHeight(height);
+ constant->SetAngle(angle);
+ constant->SetPosition(wxPoint2DDouble(posX, posY));
+ constant->StartMove(constant->GetPosition());
- constant->SetValue(value);
+ constant->SetValue(value);
- std::vector<Node*> nodeVector;
- if(!OpenControlNodeList(constNode, nodeVector)) return false;
+ std::vector<Node*> nodeVector;
+ if(!OpenControlNodeList(constNode, nodeVector)) return false;
- constant->SetNodeList(nodeVector);
- constant->UpdatePoints();
- elementList.push_back(constant);
+ constant->SetNodeList(nodeVector);
+ constant->UpdatePoints();
+ elementList.push_back(constant);
- constNode = constNode->next_sibling("Constant");
- } //}
+ constNode = constNode->next_sibling("Constant");
+ }
+ }
+ //}
//{ Exponential
auto expListNode = elementsNode->first_node("ExponentialList");
- if(!expListNode) return false;
- auto expNode = expListNode->first_node("Exponential");
- while(expNode) {
- int id = GetAttributeValueInt(expNode, "ID");
- Exponential* exponential = new Exponential(id);
-
- auto cadPropNode = expNode->first_node("CADProperties");
- if(!cadPropNode) return false;
-
- auto position = cadPropNode->first_node("Position");
- double posX = GetNodeValueDouble(position, "X");
- double posY = GetNodeValueDouble(position, "Y");
- auto size = cadPropNode->first_node("Size");
- double width = GetNodeValueDouble(size, "Width");
- double height = GetNodeValueDouble(size, "Height");
- double angle = GetNodeValueDouble(cadPropNode, "Angle");
-
- auto value = expNode->first_node("Value");
- double a = GetNodeValueDouble(value, "A");
- double b = GetNodeValueDouble(value, "B");
-
- exponential->SetWidth(width);
- exponential->SetHeight(height);
- exponential->SetAngle(angle);
- exponential->SetPosition(wxPoint2DDouble(posX, posY));
- exponential->StartMove(exponential->GetPosition());
-
- exponential->SetValues(a, b);
-
- std::vector<Node*> nodeVector;
- if(!OpenControlNodeList(expNode, nodeVector)) return false;
-
- exponential->SetNodeList(nodeVector);
- exponential->UpdatePoints();
- elementList.push_back(exponential);
-
- expNode = expNode->next_sibling("Exponential");
- } //}
+ if(expListNode) {
+ auto expNode = expListNode->first_node("Exponential");
+ while(expNode) {
+ int id = GetAttributeValueInt(expNode, "ID");
+ Exponential* exponential = new Exponential(id);
+
+ auto cadPropNode = expNode->first_node("CADProperties");
+ if(!cadPropNode) return false;
+
+ auto position = cadPropNode->first_node("Position");
+ double posX = GetNodeValueDouble(position, "X");
+ double posY = GetNodeValueDouble(position, "Y");
+ auto size = cadPropNode->first_node("Size");
+ double width = GetNodeValueDouble(size, "Width");
+ double height = GetNodeValueDouble(size, "Height");
+ double angle = GetNodeValueDouble(cadPropNode, "Angle");
+
+ auto value = expNode->first_node("Value");
+ double a = GetNodeValueDouble(value, "A");
+ double b = GetNodeValueDouble(value, "B");
+
+ exponential->SetWidth(width);
+ exponential->SetHeight(height);
+ exponential->SetAngle(angle);
+ exponential->SetPosition(wxPoint2DDouble(posX, posY));
+ exponential->StartMove(exponential->GetPosition());
+
+ exponential->SetValues(a, b);
+
+ std::vector<Node*> nodeVector;
+ if(!OpenControlNodeList(expNode, nodeVector)) return false;
+
+ exponential->SetNodeList(nodeVector);
+ exponential->UpdatePoints();
+ elementList.push_back(exponential);
+
+ expNode = expNode->next_sibling("Exponential");
+ }
+ }
+ //}
//{ Gain
auto gainListNode = elementsNode->first_node("GainList");
- if(!gainListNode) return false;
- auto gainNode = gainListNode->first_node("Gain");
- while(gainNode) {
- int id = GetAttributeValueInt(gainNode, "ID");
- Gain* gain = new Gain(id);
-
- auto cadPropNode = gainNode->first_node("CADProperties");
- if(!cadPropNode) return false;
-
- auto position = cadPropNode->first_node("Position");
- double posX = GetNodeValueDouble(position, "X");
- double posY = GetNodeValueDouble(position, "Y");
- auto size = cadPropNode->first_node("Size");
- double width = GetNodeValueDouble(size, "Width");
- double height = GetNodeValueDouble(size, "Height");
- double angle = GetNodeValueDouble(cadPropNode, "Angle");
-
- double value = GetNodeValueDouble(gainNode, "Value");
-
- gain->SetWidth(width);
- gain->SetHeight(height);
- gain->SetAngle(angle);
- gain->SetPosition(wxPoint2DDouble(posX, posY));
- gain->SetValue(value);
- gain->StartMove(gain->GetPosition());
-
- std::vector<Node*> nodeVector;
- if(!OpenControlNodeList(gainNode, nodeVector)) return false;
-
- gain->SetNodeList(nodeVector);
- gain->UpdatePoints();
- elementList.push_back(gain);
-
- gainNode = gainNode->next_sibling("Gain");
+ if(gainListNode) {
+ auto gainNode = gainListNode->first_node("Gain");
+ while(gainNode) {
+ int id = GetAttributeValueInt(gainNode, "ID");
+ Gain* gain = new Gain(id);
+
+ auto cadPropNode = gainNode->first_node("CADProperties");
+ if(!cadPropNode) return false;
+
+ auto position = cadPropNode->first_node("Position");
+ double posX = GetNodeValueDouble(position, "X");
+ double posY = GetNodeValueDouble(position, "Y");
+ auto size = cadPropNode->first_node("Size");
+ double width = GetNodeValueDouble(size, "Width");
+ double height = GetNodeValueDouble(size, "Height");
+ double angle = GetNodeValueDouble(cadPropNode, "Angle");
+
+ double value = GetNodeValueDouble(gainNode, "Value");
+
+ gain->SetWidth(width);
+ gain->SetHeight(height);
+ gain->SetAngle(angle);
+ gain->SetPosition(wxPoint2DDouble(posX, posY));
+ gain->SetValue(value);
+ gain->StartMove(gain->GetPosition());
+
+ std::vector<Node*> nodeVector;
+ if(!OpenControlNodeList(gainNode, nodeVector)) return false;
+
+ gain->SetNodeList(nodeVector);
+ gain->UpdatePoints();
+ elementList.push_back(gain);
+
+ gainNode = gainNode->next_sibling("Gain");
+ }
}
//}
//{ IO
auto ioListNode = elementsNode->first_node("IOList");
- if(!ioListNode) return false;
- auto ioNode = ioListNode->first_node("IO");
- while(ioNode) {
- int id = GetAttributeValueInt(ioNode, "ID");
-
- auto cadPropNode = ioNode->first_node("CADProperties");
- if(!cadPropNode) return false;
-
- auto position = cadPropNode->first_node("Position");
- double posX = GetNodeValueDouble(position, "X");
- double posY = GetNodeValueDouble(position, "Y");
- auto size = cadPropNode->first_node("Size");
- double width = GetNodeValueDouble(size, "Width");
- double height = GetNodeValueDouble(size, "Height");
- double angle = GetNodeValueDouble(cadPropNode, "Angle");
-
- std::vector<Node*> nodeVector;
- if(!OpenControlNodeList(ioNode, nodeVector)) return false;
-
- IOControl::IOFlags value = static_cast<IOControl::IOFlags>(GetNodeValueInt(ioNode, "Value"));
- int ioFlags = GetNodeValueInt(ioNode, "IOFlags");
-
- IOControl* io = new IOControl(ioFlags, id);
-
- io->SetWidth(width);
- io->SetHeight(height);
- io->SetAngle(angle);
- io->SetPosition(wxPoint2DDouble(posX, posY));
- io->SetValue(value);
- io->StartMove(io->GetPosition());
- io->SetNodeList(nodeVector);
- io->UpdatePoints();
- elementList.push_back(io);
-
- ioNode = ioNode->next_sibling("IO");
+ if(ioListNode) {
+ auto ioNode = ioListNode->first_node("IO");
+ while(ioNode) {
+ int id = GetAttributeValueInt(ioNode, "ID");
+
+ auto cadPropNode = ioNode->first_node("CADProperties");
+ if(!cadPropNode) return false;
+
+ auto position = cadPropNode->first_node("Position");
+ double posX = GetNodeValueDouble(position, "X");
+ double posY = GetNodeValueDouble(position, "Y");
+ auto size = cadPropNode->first_node("Size");
+ double width = GetNodeValueDouble(size, "Width");
+ double height = GetNodeValueDouble(size, "Height");
+ double angle = GetNodeValueDouble(cadPropNode, "Angle");
+
+ std::vector<Node*> nodeVector;
+ if(!OpenControlNodeList(ioNode, nodeVector)) return false;
+
+ IOControl::IOFlags value = static_cast<IOControl::IOFlags>(GetNodeValueInt(ioNode, "Value"));
+ int ioFlags = GetNodeValueInt(ioNode, "IOFlags");
+
+ IOControl* io = new IOControl(ioFlags, id);
+
+ io->SetWidth(width);
+ io->SetHeight(height);
+ io->SetAngle(angle);
+ io->SetPosition(wxPoint2DDouble(posX, posY));
+ io->SetValue(value);
+ io->StartMove(io->GetPosition());
+ io->SetNodeList(nodeVector);
+ io->UpdatePoints();
+ elementList.push_back(io);
+
+ ioNode = ioNode->next_sibling("IO");
+ }
}
//}
//{ Limiter
auto limiterListNode = elementsNode->first_node("LimiterList");
- if(!limiterListNode) return false;
- auto limiterNode = limiterListNode->first_node("Limiter");
- while(limiterNode) {
- int id = GetAttributeValueInt(limiterNode, "ID");
- Limiter* limiter = new Limiter(id);
-
- auto cadPropNode = limiterNode->first_node("CADProperties");
- if(!cadPropNode) return false;
-
- auto position = cadPropNode->first_node("Position");
- double posX = GetNodeValueDouble(position, "X");
- double posY = GetNodeValueDouble(position, "Y");
- auto size = cadPropNode->first_node("Size");
- double width = GetNodeValueDouble(size, "Width");
- double height = GetNodeValueDouble(size, "Height");
- double angle = GetNodeValueDouble(cadPropNode, "Angle");
-
- double upLimit = GetNodeValueDouble(limiterNode, "UpperLimit");
- double lowLimit = GetNodeValueDouble(limiterNode, "LowerLimit");
-
- std::vector<Node*> nodeVector;
- if(!OpenControlNodeList(limiterNode, nodeVector)) return false;
-
- limiter->SetWidth(width);
- limiter->SetHeight(height);
- limiter->SetAngle(angle);
- limiter->SetPosition(wxPoint2DDouble(posX, posY));
- limiter->SetUpLimit(upLimit);
- limiter->SetLowLimit(lowLimit);
-
- limiter->StartMove(limiter->GetPosition());
- limiter->SetNodeList(nodeVector);
- limiter->UpdatePoints();
- elementList.push_back(limiter);
-
- limiterNode = limiterNode->next_sibling("Limiter");
+ if(limiterListNode) {
+ auto limiterNode = limiterListNode->first_node("Limiter");
+ while(limiterNode) {
+ int id = GetAttributeValueInt(limiterNode, "ID");
+ Limiter* limiter = new Limiter(id);
+
+ auto cadPropNode = limiterNode->first_node("CADProperties");
+ if(!cadPropNode) return false;
+
+ auto position = cadPropNode->first_node("Position");
+ double posX = GetNodeValueDouble(position, "X");
+ double posY = GetNodeValueDouble(position, "Y");
+ auto size = cadPropNode->first_node("Size");
+ double width = GetNodeValueDouble(size, "Width");
+ double height = GetNodeValueDouble(size, "Height");
+ double angle = GetNodeValueDouble(cadPropNode, "Angle");
+
+ double upLimit = GetNodeValueDouble(limiterNode, "UpperLimit");
+ double lowLimit = GetNodeValueDouble(limiterNode, "LowerLimit");
+
+ std::vector<Node*> nodeVector;
+ if(!OpenControlNodeList(limiterNode, nodeVector)) return false;
+
+ limiter->SetWidth(width);
+ limiter->SetHeight(height);
+ limiter->SetAngle(angle);
+ limiter->SetPosition(wxPoint2DDouble(posX, posY));
+ limiter->SetUpLimit(upLimit);
+ limiter->SetLowLimit(lowLimit);
+
+ limiter->StartMove(limiter->GetPosition());
+ limiter->SetNodeList(nodeVector);
+ limiter->UpdatePoints();
+ elementList.push_back(limiter);
+
+ limiterNode = limiterNode->next_sibling("Limiter");
+ }
}
//}
//{ Multiplier
auto multiplierListNode = elementsNode->first_node("MultiplierList");
- if(!multiplierListNode) return false;
- auto multiplierNode = multiplierListNode->first_node("Multiplier");
- while(multiplierNode) {
- int id = GetAttributeValueInt(multiplierNode, "ID");
- Multiplier* multiplier = new Multiplier(id);
-
- auto cadPropNode = multiplierNode->first_node("CADProperties");
- if(!cadPropNode) return false;
-
- auto position = cadPropNode->first_node("Position");
- double posX = GetNodeValueDouble(position, "X");
- double posY = GetNodeValueDouble(position, "Y");
- auto size = cadPropNode->first_node("Size");
- double width = GetNodeValueDouble(size, "Width");
- double height = GetNodeValueDouble(size, "Height");
- double angle = GetNodeValueDouble(cadPropNode, "Angle");
-
- std::vector<Node*> nodeVector;
- if(!OpenControlNodeList(multiplierNode, nodeVector)) return false;
-
- multiplier->SetWidth(width);
- multiplier->SetHeight(height);
- multiplier->SetAngle(angle);
- multiplier->SetPosition(wxPoint2DDouble(posX, posY));
-
- multiplier->StartMove(multiplier->GetPosition());
- multiplier->SetNodeList(nodeVector);
- multiplier->UpdatePoints();
- elementList.push_back(multiplier);
+ if(multiplierListNode) {
+ auto multiplierNode = multiplierListNode->first_node("Multiplier");
+ while(multiplierNode) {
+ int id = GetAttributeValueInt(multiplierNode, "ID");
+ Multiplier* multiplier = new Multiplier(id);
+
+ auto cadPropNode = multiplierNode->first_node("CADProperties");
+ if(!cadPropNode) return false;
+
+ auto position = cadPropNode->first_node("Position");
+ double posX = GetNodeValueDouble(position, "X");
+ double posY = GetNodeValueDouble(position, "Y");
+ auto size = cadPropNode->first_node("Size");
+ double width = GetNodeValueDouble(size, "Width");
+ double height = GetNodeValueDouble(size, "Height");
+ double angle = GetNodeValueDouble(cadPropNode, "Angle");
+
+ std::vector<Node*> nodeVector;
+ if(!OpenControlNodeList(multiplierNode, nodeVector)) return false;
+
+ multiplier->SetWidth(width);
+ multiplier->SetHeight(height);
+ multiplier->SetAngle(angle);
+ multiplier->SetPosition(wxPoint2DDouble(posX, posY));
+
+ multiplier->StartMove(multiplier->GetPosition());
+ multiplier->SetNodeList(nodeVector);
+ multiplier->UpdatePoints();
+ elementList.push_back(multiplier);
+
+ multiplierNode = multiplierNode->next_sibling("Multiplier");
+ }
+ }
+ //}
- multiplierNode = multiplierNode->next_sibling("Multiplier");
+ //{ Divider
+ auto dividerListNode = elementsNode->first_node("DividerList");
+ if(dividerListNode) {
+ auto dividerNode = dividerListNode->first_node("Divider");
+ while(dividerNode) {
+ int id = GetAttributeValueInt(dividerNode, "ID");
+ Divider* divider = new Divider(id);
+
+ auto cadPropNode = dividerNode->first_node("CADProperties");
+ if(!cadPropNode) return false;
+
+ auto position = cadPropNode->first_node("Position");
+ double posX = GetNodeValueDouble(position, "X");
+ double posY = GetNodeValueDouble(position, "Y");
+ auto size = cadPropNode->first_node("Size");
+ double width = GetNodeValueDouble(size, "Width");
+ double height = GetNodeValueDouble(size, "Height");
+ double angle = GetNodeValueDouble(cadPropNode, "Angle");
+
+ std::vector<Node*> nodeVector;
+ if(!OpenControlNodeList(dividerNode, nodeVector)) return false;
+
+ divider->SetWidth(width);
+ divider->SetHeight(height);
+ divider->SetAngle(angle);
+ divider->SetPosition(wxPoint2DDouble(posX, posY));
+
+ divider->StartMove(divider->GetPosition());
+ divider->SetNodeList(nodeVector);
+ divider->UpdatePoints();
+ elementList.push_back(divider);
+
+ dividerNode = dividerNode->next_sibling("Divider");
+ }
}
//}
//{ Rate limiter
auto rateLimiterListNode = elementsNode->first_node("RateLimiterList");
- if(!rateLimiterListNode) return false;
- auto rateLimiterNode = rateLimiterListNode->first_node("RateLimiter");
- while(rateLimiterNode) {
- int id = GetAttributeValueInt(rateLimiterNode, "ID");
- RateLimiter* limiter = new RateLimiter(id);
-
- auto cadPropNode = rateLimiterNode->first_node("CADProperties");
- if(!cadPropNode) return false;
-
- auto position = cadPropNode->first_node("Position");
- double posX = GetNodeValueDouble(position, "X");
- double posY = GetNodeValueDouble(position, "Y");
- auto size = cadPropNode->first_node("Size");
- double width = GetNodeValueDouble(size, "Width");
- double height = GetNodeValueDouble(size, "Height");
- double angle = GetNodeValueDouble(cadPropNode, "Angle");
-
- double upLimit = GetNodeValueDouble(rateLimiterNode, "UpperLimit");
- double lowLimit = GetNodeValueDouble(rateLimiterNode, "LowerLimit");
-
- std::vector<Node*> nodeVector;
- if(!OpenControlNodeList(rateLimiterNode, nodeVector)) return false;
-
- limiter->SetWidth(width);
- limiter->SetHeight(height);
- limiter->SetAngle(angle);
- limiter->SetPosition(wxPoint2DDouble(posX, posY));
- limiter->SetUpLimit(upLimit);
- limiter->SetLowLimit(lowLimit);
-
- limiter->StartMove(limiter->GetPosition());
- limiter->SetNodeList(nodeVector);
- limiter->UpdatePoints();
- elementList.push_back(limiter);
-
- rateLimiterNode = rateLimiterNode->next_sibling("RateLimiter");
+ if(rateLimiterListNode) {
+ auto rateLimiterNode = rateLimiterListNode->first_node("RateLimiter");
+ while(rateLimiterNode) {
+ int id = GetAttributeValueInt(rateLimiterNode, "ID");
+ RateLimiter* limiter = new RateLimiter(id);
+
+ auto cadPropNode = rateLimiterNode->first_node("CADProperties");
+ if(!cadPropNode) return false;
+
+ auto position = cadPropNode->first_node("Position");
+ double posX = GetNodeValueDouble(position, "X");
+ double posY = GetNodeValueDouble(position, "Y");
+ auto size = cadPropNode->first_node("Size");
+ double width = GetNodeValueDouble(size, "Width");
+ double height = GetNodeValueDouble(size, "Height");
+ double angle = GetNodeValueDouble(cadPropNode, "Angle");
+
+ double upLimit = GetNodeValueDouble(rateLimiterNode, "UpperLimit");
+ double lowLimit = GetNodeValueDouble(rateLimiterNode, "LowerLimit");
+
+ std::vector<Node*> nodeVector;
+ if(!OpenControlNodeList(rateLimiterNode, nodeVector)) return false;
+
+ limiter->SetWidth(width);
+ limiter->SetHeight(height);
+ limiter->SetAngle(angle);
+ limiter->SetPosition(wxPoint2DDouble(posX, posY));
+ limiter->SetUpLimit(upLimit);
+ limiter->SetLowLimit(lowLimit);
+
+ limiter->StartMove(limiter->GetPosition());
+ limiter->SetNodeList(nodeVector);
+ limiter->UpdatePoints();
+ elementList.push_back(limiter);
+
+ rateLimiterNode = rateLimiterNode->next_sibling("RateLimiter");
+ }
}
//}
//{ Sum
auto sumListNode = elementsNode->first_node("SumList");
- if(!sumListNode) return false;
- auto sumNode = sumListNode->first_node("Sum");
- while(sumNode) {
- int id = GetAttributeValueInt(sumNode, "ID");
- Sum* sum = new Sum(id);
-
- auto cadPropNode = sumNode->first_node("CADProperties");
- if(!cadPropNode) return false;
-
- auto position = cadPropNode->first_node("Position");
- double posX = GetNodeValueDouble(position, "X");
- double posY = GetNodeValueDouble(position, "Y");
- auto size = cadPropNode->first_node("Size");
- double width = GetNodeValueDouble(size, "Width");
- double height = GetNodeValueDouble(size, "Height");
- double angle = GetNodeValueDouble(cadPropNode, "Angle");
-
- std::vector<Sum::Signal> signs;
- auto signsNode = sumNode->first_node("Signs");
- auto sign = signsNode->first_node("Value");
- while(sign) {
- long value;
- wxString(sign->value()).ToCLong(&value);
- signs.push_back(static_cast<Sum::Signal>(value));
- sign = sign->next_sibling("Value");
- }
- sum->SetSignalList(signs);
+ if(sumListNode) {
+ auto sumNode = sumListNode->first_node("Sum");
+ while(sumNode) {
+ int id = GetAttributeValueInt(sumNode, "ID");
+ Sum* sum = new Sum(id);
+
+ auto cadPropNode = sumNode->first_node("CADProperties");
+ if(!cadPropNode) return false;
+
+ auto position = cadPropNode->first_node("Position");
+ double posX = GetNodeValueDouble(position, "X");
+ double posY = GetNodeValueDouble(position, "Y");
+ auto size = cadPropNode->first_node("Size");
+ double width = GetNodeValueDouble(size, "Width");
+ double height = GetNodeValueDouble(size, "Height");
+ double angle = GetNodeValueDouble(cadPropNode, "Angle");
+
+ std::vector<Sum::Signal> signs;
+ auto signsNode = sumNode->first_node("Signs");
+ auto sign = signsNode->first_node("Value");
+ while(sign) {
+ long value;
+ wxString(sign->value()).ToCLong(&value);
+ signs.push_back(static_cast<Sum::Signal>(value));
+ sign = sign->next_sibling("Value");
+ }
+ sum->SetSignalList(signs);
- std::vector<Node*> nodeVector;
- if(!OpenControlNodeList(sumNode, nodeVector)) return false;
+ std::vector<Node*> nodeVector;
+ if(!OpenControlNodeList(sumNode, nodeVector)) return false;
- sum->SetWidth(width);
- sum->SetHeight(height);
- sum->SetAngle(angle);
- sum->SetPosition(wxPoint2DDouble(posX, posY));
+ sum->SetWidth(width);
+ sum->SetHeight(height);
+ sum->SetAngle(angle);
+ sum->SetPosition(wxPoint2DDouble(posX, posY));
- sum->StartMove(sum->GetPosition());
- sum->SetNodeList(nodeVector);
- sum->UpdatePoints();
- elementList.push_back(sum);
+ sum->StartMove(sum->GetPosition());
+ sum->SetNodeList(nodeVector);
+ sum->UpdatePoints();
+ elementList.push_back(sum);
- sumNode = sumNode->next_sibling("Sum");
+ sumNode = sumNode->next_sibling("Sum");
+ }
}
//}
//{ Transfer function
auto tfListNode = elementsNode->first_node("TransferFunctionList");
- if(!tfListNode) return false;
- auto tfNode = tfListNode->first_node("TransferFunction");
- while(tfNode) {
- int id = GetAttributeValueInt(tfNode, "ID");
- TransferFunction* tf = new TransferFunction(id);
-
- auto cadPropNode = tfNode->first_node("CADProperties");
- if(!cadPropNode) return false;
-
- auto position = cadPropNode->first_node("Position");
- double posX = GetNodeValueDouble(position, "X");
- double posY = GetNodeValueDouble(position, "Y");
- auto size = cadPropNode->first_node("Size");
- double width = GetNodeValueDouble(size, "Width");
- double height = GetNodeValueDouble(size, "Height");
- double angle = GetNodeValueDouble(cadPropNode, "Angle");
-
- std::vector<double> numerator, denominator;
- auto numeratorNode = tfNode->first_node("Numerator");
- auto nValue = numeratorNode->first_node("Value");
- while(nValue) {
- double value = 0.0;
- wxString(nValue->value()).ToCDouble(&value);
- numerator.push_back(value);
- nValue = nValue->next_sibling("Value");
- }
- auto denominatorNode = tfNode->first_node("Denominator");
- auto dValue = denominatorNode->first_node("Value");
- while(dValue) {
- double value = 0.0;
- wxString(dValue->value()).ToCDouble(&value);
- denominator.push_back(value);
- dValue = dValue->next_sibling("Value");
- }
+ if(tfListNode) {
+ auto tfNode = tfListNode->first_node("TransferFunction");
+ while(tfNode) {
+ int id = GetAttributeValueInt(tfNode, "ID");
+ TransferFunction* tf = new TransferFunction(id);
+
+ auto cadPropNode = tfNode->first_node("CADProperties");
+ if(!cadPropNode) return false;
+
+ auto position = cadPropNode->first_node("Position");
+ double posX = GetNodeValueDouble(position, "X");
+ double posY = GetNodeValueDouble(position, "Y");
+ auto size = cadPropNode->first_node("Size");
+ double width = GetNodeValueDouble(size, "Width");
+ double height = GetNodeValueDouble(size, "Height");
+ double angle = GetNodeValueDouble(cadPropNode, "Angle");
+
+ std::vector<double> numerator, denominator;
+ auto numeratorNode = tfNode->first_node("Numerator");
+ auto nValue = numeratorNode->first_node("Value");
+ while(nValue) {
+ double value = 0.0;
+ wxString(nValue->value()).ToCDouble(&value);
+ numerator.push_back(value);
+ nValue = nValue->next_sibling("Value");
+ }
+ auto denominatorNode = tfNode->first_node("Denominator");
+ auto dValue = denominatorNode->first_node("Value");
+ while(dValue) {
+ double value = 0.0;
+ wxString(dValue->value()).ToCDouble(&value);
+ denominator.push_back(value);
+ dValue = dValue->next_sibling("Value");
+ }
- std::vector<Node*> nodeVector;
- if(!OpenControlNodeList(tfNode, nodeVector)) return false;
+ std::vector<Node*> nodeVector;
+ if(!OpenControlNodeList(tfNode, nodeVector)) return false;
- tf->SetWidth(width);
- tf->SetHeight(height);
- tf->SetAngle(angle);
- tf->SetPosition(wxPoint2DDouble(posX, posY));
+ tf->SetWidth(width);
+ tf->SetHeight(height);
+ tf->SetAngle(angle);
+ tf->SetPosition(wxPoint2DDouble(posX, posY));
- tf->SetNumerator(numerator);
- tf->SetDenominator(denominator);
+ tf->SetNumerator(numerator);
+ tf->SetDenominator(denominator);
- tf->StartMove(tf->GetPosition());
- tf->SetNodeList(nodeVector);
+ tf->StartMove(tf->GetPosition());
+ tf->SetNodeList(nodeVector);
- tf->UpdateTFText();
+ tf->UpdateTFText();
- elementList.push_back(tf);
+ elementList.push_back(tf);
- tfNode = tfNode->next_sibling("TransferFunction");
+ tfNode = tfNode->next_sibling("TransferFunction");
+ }
}
//}
// Connection line
auto connectionListNode = elementsNode->first_node("ConnectionList");
- if(!connectionListNode) return false;
- auto connNode = connectionListNode->first_node("Connection");
- while(connNode) {
- ConnectionLine* cLine = NULL;
- int id = GetAttributeValueInt(connNode, "ID");
-
- auto cadPropNode = connNode->first_node("CADProperties");
- if(!cadPropNode) return false;
- double offset = GetNodeValueDouble(cadPropNode, "Offset");
-
- auto parentList = connNode->first_node("ParentList");
- if(!parentList) return false;
-
- auto parentNode = parentList->first_node("Parent");
- bool firstNode = true;
- while(parentNode) {
- int elementID = GetNodeValueInt(parentNode, "ElementID");
- int nodeID = GetNodeValueInt(parentNode, "NodeID");
-
- ControlElement* element = GetControlElementFromID(elementList, elementID);
- Node* node = element->GetNodeList()[nodeID];
-
- if(firstNode) cLine = new ConnectionLine(node, id);
- cLine->AddParent(element);
- element->AddChild(cLine);
- if(!firstNode) cLine->AppendNode(node, element);
-
- if(firstNode) firstNode = false;
- parentNode = parentNode->next_sibling("Parent");
- }
+ if(connectionListNode) {
+ auto connNode = connectionListNode->first_node("Connection");
+ while(connNode) {
+ ConnectionLine* cLine = NULL;
+ int id = GetAttributeValueInt(connNode, "ID");
+
+ auto cadPropNode = connNode->first_node("CADProperties");
+ if(!cadPropNode) return false;
+ double offset = GetNodeValueDouble(cadPropNode, "Offset");
+
+ auto parentList = connNode->first_node("ParentList");
+ if(!parentList) return false;
+
+ auto parentNode = parentList->first_node("Parent");
+ bool firstNode = true;
+ while(parentNode) {
+ int elementID = GetNodeValueInt(parentNode, "ElementID");
+ int nodeID = GetNodeValueInt(parentNode, "NodeID");
+
+ ControlElement* element = GetControlElementFromID(elementList, elementID);
+ Node* node = element->GetNodeList()[nodeID];
+
+ if(firstNode) cLine = new ConnectionLine(node, id);
+ cLine->AddParent(element);
+ element->AddChild(cLine);
+ if(!firstNode) cLine->AppendNode(node, element);
+
+ if(firstNode) firstNode = false;
+ parentNode = parentNode->next_sibling("Parent");
+ }
- auto parentLine = connNode->first_node("ParentLine");
- if(!parentLine) return false;
- int parentLineID = GetAttributeValueInt(parentLine, "ID");
- if(parentLineID != -1) {
- for(auto it = connectionList.begin(), itEnd = connectionList.end(); it != itEnd; ++it) {
- ConnectionLine* parent = *it;
- if(parent->GetID() == parentLineID) {
- cLine->SetParentLine(parent);
- parent->AddChild(cLine);
+ auto parentLine = connNode->first_node("ParentLine");
+ if(!parentLine) return false;
+ int parentLineID = GetAttributeValueInt(parentLine, "ID");
+ if(parentLineID != -1) {
+ for(auto it = connectionList.begin(), itEnd = connectionList.end(); it != itEnd; ++it) {
+ ConnectionLine* parent = *it;
+ if(parent->GetID() == parentLineID) {
+ cLine->SetParentLine(parent);
+ parent->AddChild(cLine);
+ }
}
}
- }
- cLine->SetOffset(offset);
- cLine->UpdatePoints();
- connectionList.push_back(cLine);
- connNode = connNode->next_sibling("Connection");
+ cLine->SetOffset(offset);
+ cLine->UpdatePoints();
+ connectionList.push_back(cLine);
+ connNode = connNode->next_sibling("Connection");
+ }
}
ctrlContainer->FillContainer(elementList, connectionList);
return true;
diff --git a/Project/GeneratorStabForm.cpp b/Project/GeneratorStabForm.cpp
index 7a68391..9a468b7 100644
--- a/Project/GeneratorStabForm.cpp
+++ b/Project/GeneratorStabForm.cpp
@@ -67,7 +67,10 @@ void GeneratorStabForm::OnEditAVRButtonClick(wxCommandEvent& event)
data.avr = new ControlElementContainer();
m_syncGenerator->SetElectricalData(data);
}
- ControlEditor* cEditor = new ControlEditor(m_parent, IOControl::IN_TERMINAL_VOLTAGE | IOControl::OUT_FIELD_VOLTAGE);
+ ControlEditor* cEditor = new ControlEditor(
+ m_parent, IOControl::IN_TERMINAL_VOLTAGE | IOControl::IN_ACTIVE_POWER | IOControl::IN_REACTIVE_POWER |
+ IOControl::IN_INITIAL_TERMINAL_VOLTAGE | IOControl::IN_VELOCITY | IOControl::IN_INITIAL_VELOCITY |
+ IOControl::IN_DELTA_VELOCITY | IOControl::IN_DELTA_ACTIVE_POWER | IOControl::OUT_FIELD_VOLTAGE);
cEditor->SetElementsList(data.avr->GetControlElementsList());
cEditor->SetConnectionsList(data.avr->GetConnectionLineList());
cEditor->SetControlContainer(data.avr);
@@ -86,7 +89,9 @@ void GeneratorStabForm::OnSpeedGovernorButtonClick(wxCommandEvent& event)
data.speedGov = new ControlElementContainer();
m_syncGenerator->SetElectricalData(data);
}
- ControlEditor* cEditor = new ControlEditor(m_parent, IOControl::IN_VELOCITY | IOControl::OUT_MEC_POWER);
+ ControlEditor* cEditor = new ControlEditor(
+ m_parent, IOControl::IN_VELOCITY | IOControl::IN_ACTIVE_POWER | IOControl::IN_REACTIVE_POWER |
+ IOControl::IN_INITIAL_VELOCITY | IOControl::IN_INITIAL_MEC_POWER | IOControl::OUT_MEC_POWER);
cEditor->SetElementsList(data.speedGov->GetControlElementsList());
cEditor->SetConnectionsList(data.speedGov->GetConnectionLineList());
cEditor->SetControlContainer(data.speedGov);
diff --git a/Project/IOControl.cpp b/Project/IOControl.cpp
index bf40200..44cbf8e 100644
--- a/Project/IOControl.cpp
+++ b/Project/IOControl.cpp
@@ -152,6 +152,8 @@ void IOControl::Rotate(bool clockwise)
wxString IOControl::GenerateText()
{
wxString omega = wxString::FromUTF8("\xCF\x89");
+ wxString subZero = wxString::FromUTF8("\xE2\x82\x92");
+ wxString capDelta = wxString::FromUTF8("\xCE\x94");
switch(m_value) {
case IN_TERMINAL_VOLTAGE: {
@@ -164,11 +166,11 @@ wxString IOControl::GenerateText()
} break;
case IN_ACTIVE_POWER: {
m_ioNodeType = Node::NODE_OUT;
- return _("Pe");
+ return _("P");
} break;
case IN_REACTIVE_POWER: {
m_ioNodeType = Node::NODE_OUT;
- return _("Qe");
+ return _("Q");
} break;
case OUT_FIELD_VOLTAGE: {
m_ioNodeType = Node::NODE_IN;
@@ -178,6 +180,26 @@ wxString IOControl::GenerateText()
m_ioNodeType = Node::NODE_IN;
return _("Pm");
} break;
+ case IN_INITIAL_TERMINAL_VOLTAGE: {
+ m_ioNodeType = Node::NODE_OUT;
+ return _("Vt") + subZero;
+ } break;
+ case IN_INITIAL_MEC_POWER: {
+ m_ioNodeType = Node::NODE_OUT;
+ return _("Pm") + subZero;
+ } break;
+ case IN_INITIAL_VELOCITY: {
+ m_ioNodeType = Node::NODE_OUT;
+ return omega + subZero;
+ } break;
+ case IN_DELTA_VELOCITY: {
+ m_ioNodeType = Node::NODE_OUT;
+ return capDelta + omega;
+ } break;
+ case IN_DELTA_ACTIVE_POWER: {
+ m_ioNodeType = Node::NODE_OUT;
+ return capDelta + _("P");
+ } break;
}
return "";
}
diff --git a/Project/IOControl.h b/Project/IOControl.h
index 307cc1a..084367d 100644
--- a/Project/IOControl.h
+++ b/Project/IOControl.h
@@ -41,7 +41,12 @@ class IOControl : public ControlElement
IN_ACTIVE_POWER = 1 << 2,
IN_REACTIVE_POWER = 1 << 3,
OUT_FIELD_VOLTAGE = 1 << 4,
- OUT_MEC_POWER = 1 << 5
+ OUT_MEC_POWER = 1 << 5,
+ IN_INITIAL_TERMINAL_VOLTAGE = 1 << 6,
+ IN_INITIAL_MEC_POWER = 1 << 7,
+ IN_INITIAL_VELOCITY = 1 << 8,
+ IN_DELTA_VELOCITY = 1 << 9,
+ IN_DELTA_ACTIVE_POWER = 1 << 10,
};
IOControl(int ioFlags, int id);
diff --git a/Project/IOControlForm.cpp b/Project/IOControlForm.cpp
index 583e534..4a25468 100644
--- a/Project/IOControlForm.cpp
+++ b/Project/IOControlForm.cpp
@@ -59,6 +59,37 @@ IOControlForm::IOControlForm(wxWindow* parent, IOControl* ioControl) : IOControl
if(m_ioControl->GetValue() == IOControl::OUT_MEC_POWER) outChoiceNumber = (int)m_outputFlags.size() - 1;
}
+ if(ioFlags & IOControl::IN_INITIAL_MEC_POWER) {
+ m_choiceInput->Append(_("Initial mechanical power"));
+ m_inputFlags.push_back(IOControl::IN_INITIAL_MEC_POWER);
+ if(m_ioControl->GetValue() == IOControl::IN_INITIAL_MEC_POWER) inChoiceNumber = (int)m_inputFlags.size() - 1;
+ }
+
+ if(ioFlags & IOControl::IN_INITIAL_TERMINAL_VOLTAGE) {
+ m_choiceInput->Append(_("Initial terminal voltage"));
+ m_inputFlags.push_back(IOControl::IN_INITIAL_TERMINAL_VOLTAGE);
+ if(m_ioControl->GetValue() == IOControl::IN_INITIAL_TERMINAL_VOLTAGE)
+ inChoiceNumber = (int)m_inputFlags.size() - 1;
+ }
+
+ if(ioFlags & IOControl::IN_INITIAL_VELOCITY) {
+ m_choiceInput->Append(_("Initial velocity"));
+ m_inputFlags.push_back(IOControl::IN_INITIAL_VELOCITY);
+ if(m_ioControl->GetValue() == IOControl::IN_INITIAL_VELOCITY) inChoiceNumber = (int)m_inputFlags.size() - 1;
+ }
+
+ if(ioFlags & IOControl::IN_DELTA_VELOCITY) {
+ m_choiceInput->Append(_("Velocity variation"));
+ m_inputFlags.push_back(IOControl::IN_DELTA_VELOCITY);
+ if(m_ioControl->GetValue() == IOControl::IN_DELTA_VELOCITY) inChoiceNumber = (int)m_inputFlags.size() - 1;
+ }
+
+ if(ioFlags & IOControl::IN_DELTA_ACTIVE_POWER) {
+ m_choiceInput->Append(_("Active power variation"));
+ m_inputFlags.push_back(IOControl::IN_DELTA_ACTIVE_POWER);
+ if(m_ioControl->GetValue() == IOControl::IN_DELTA_ACTIVE_POWER) inChoiceNumber = (int)m_inputFlags.size() - 1;
+ }
+
if(inChoiceNumber != -1) {
m_choiceInput->SetSelection(inChoiceNumber);
m_checkBoxInput->SetValue(true);
diff --git a/Project/MathOperation.cpp b/Project/MathOperation.cpp
new file mode 100644
index 0000000..5f544ce
--- /dev/null
+++ b/Project/MathOperation.cpp
@@ -0,0 +1,95 @@
+/*
+ * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
+#include "MathOperation.h"
+#include "ConnectionLine.h"
+
+MathOperation::MathOperation(int id) : ControlElement(id)
+{
+ m_width = m_height = 36.0;
+ Node* nodeIn1 = new Node(m_position + wxPoint2DDouble(-18, -9), Node::NODE_IN, m_borderSize);
+ nodeIn1->StartMove(m_position);
+ Node* nodeIn2 = new Node(m_position + wxPoint2DDouble(-18, 9), Node::NODE_IN, m_borderSize);
+ nodeIn2->StartMove(m_position);
+ Node* nodeOut = new Node(m_position + wxPoint2DDouble(18, 0), Node::NODE_OUT, m_borderSize);
+ nodeOut->SetAngle(180.0);
+ nodeOut->StartMove(m_position);
+ m_nodeList.push_back(nodeIn1);
+ m_nodeList.push_back(nodeIn2);
+ m_nodeList.push_back(nodeOut);
+}
+
+MathOperation::~MathOperation() {}
+void MathOperation::Draw(wxPoint2DDouble translation, double scale) const
+{
+ glLineWidth(1.0);
+ if(m_selected) {
+ glColor4dv(m_selectionColour.GetRGBA());
+ double borderSize = (m_borderSize * 2.0 + 1.0) / scale;
+ DrawRectangle(m_position, m_width + borderSize, m_height + borderSize);
+ }
+ glColor4d(1.0, 1.0, 1.0, 1.0);
+ DrawRectangle(m_position, m_width, m_height);
+ glColor4d(0.0, 0.0, 0.0, 1.0);
+ DrawRectangle(m_position, m_width, m_height, GL_LINE_LOOP);
+
+ // Draw personalized element symbol.
+ DrawSymbol();
+
+ glColor4d(0.0, 0.0, 0.0, 1.0);
+ DrawNodes();
+}
+
+void MathOperation::Rotate(bool clockwise)
+{
+ if(clockwise)
+ m_angle += 90.0;
+ else
+ m_angle -= 90.0;
+ if(m_angle >= 360.0)
+ m_angle = 0.0;
+ else if(m_angle < 0)
+ m_angle = 270.0;
+
+ UpdatePoints();
+
+ for(auto it = m_nodeList.begin(), itEnd = m_nodeList.end(); it != itEnd; ++it) {
+ Node* node = *it;
+ node->Rotate(clockwise);
+ }
+}
+
+void MathOperation::UpdatePoints()
+{
+ if(m_angle == 0.0) {
+ m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(-18, -9));
+ m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(-18, 9));
+ m_nodeList[2]->SetPosition(m_position + wxPoint2DDouble(18, 0));
+ } else if(m_angle == 90.0) {
+ m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(9, -18));
+ m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(-9, -18));
+ m_nodeList[2]->SetPosition(m_position + wxPoint2DDouble(0, 18));
+ } else if(m_angle == 180.0) {
+ m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(18, 9));
+ m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(18, -9));
+ m_nodeList[2]->SetPosition(m_position + wxPoint2DDouble(-18, 0));
+ } else if(m_angle == 270.0) {
+ m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(-9, 18));
+ m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(9, 18));
+ m_nodeList[2]->SetPosition(m_position + wxPoint2DDouble(0, -18));
+ }
+}
diff --git a/Project/MathOperation.h b/Project/MathOperation.h
new file mode 100644
index 0000000..96e538b
--- /dev/null
+++ b/Project/MathOperation.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
+#ifndef MATHOPERATION_H
+#define MATHOPERATION_H
+
+#include "ControlElement.h"
+
+class ConnectionLine;
+
+/**
+ * @class MathOperation
+ * @author Thales Lima Oliveira <thales@ufu.br>
+ * @date 09/10/2017
+ * @brief Abstract class that define the general behavior of math operation control block.
+ * @file MathOperation.h
+ */
+class MathOperation : public ControlElement
+{
+ public:
+ MathOperation(int id);
+ ~MathOperation();
+
+ virtual void Draw(wxPoint2DDouble translation, double scale) const;
+ virtual void DrawSymbol() const {}
+ virtual bool Contains(wxPoint2DDouble position) const { return m_rect.Contains(position); }
+ virtual bool Intersects(wxRect2DDouble rect) const { return m_rect.Intersects(rect); }
+ virtual bool ShowForm(wxWindow* parent, Element* element) { return false; }
+ virtual void Rotate(bool clockwise = true);
+
+ virtual void UpdatePoints();
+};
+
+#endif // MATHOPERATION_H
diff --git a/Project/Multiplier.cpp b/Project/Multiplier.cpp
index 2b5d702..14dd182 100644
--- a/Project/Multiplier.cpp
+++ b/Project/Multiplier.cpp
@@ -18,35 +18,10 @@
#include "Multiplier.h"
#include "ConnectionLine.h"
-Multiplier::Multiplier(int id) : ControlElement(id)
-{
- m_width = m_height = 36.0;
- Node* nodeIn1 = new Node(m_position + wxPoint2DDouble(-18, -9), Node::NODE_IN, m_borderSize);
- nodeIn1->StartMove(m_position);
- Node* nodeIn2 = new Node(m_position + wxPoint2DDouble(-18, 9), Node::NODE_IN, m_borderSize);
- nodeIn2->StartMove(m_position);
- Node* nodeOut = new Node(m_position + wxPoint2DDouble(18, 0), Node::NODE_OUT, m_borderSize);
- nodeOut->SetAngle(180.0);
- nodeOut->StartMove(m_position);
- m_nodeList.push_back(nodeIn1);
- m_nodeList.push_back(nodeIn2);
- m_nodeList.push_back(nodeOut);
-}
-
+Multiplier::Multiplier(int id) : MathOperation(id) {}
Multiplier::~Multiplier() {}
-void Multiplier::Draw(wxPoint2DDouble translation, double scale) const
+void Multiplier::DrawSymbol() const
{
- glLineWidth(1.0);
- if(m_selected) {
- glColor4dv(m_selectionColour.GetRGBA());
- double borderSize = (m_borderSize * 2.0 + 1.0) / scale;
- DrawRectangle(m_position, m_width + borderSize, m_height + borderSize);
- }
- glColor4d(1.0, 1.0, 1.0, 1.0);
- DrawRectangle(m_position, m_width, m_height);
- glColor4d(0.0, 0.0, 0.0, 1.0);
- DrawRectangle(m_position, m_width, m_height, GL_LINE_LOOP);
-
// Plot x.
glLineWidth(2.0);
std::vector<wxPoint2DDouble> xSymbol;
@@ -56,49 +31,6 @@ void Multiplier::Draw(wxPoint2DDouble translation, double scale) const
xSymbol.push_back(m_position + wxPoint2DDouble(5, -5));
glColor4d(0.0, 0.3, 1.0, 1.0);
DrawLine(xSymbol, GL_LINES);
-
- glColor4d(0.0, 0.0, 0.0, 1.0);
- DrawNodes();
-}
-
-void Multiplier::Rotate(bool clockwise)
-{
- if(clockwise)
- m_angle += 90.0;
- else
- m_angle -= 90.0;
- if(m_angle >= 360.0)
- m_angle = 0.0;
- else if(m_angle < 0)
- m_angle = 270.0;
-
- UpdatePoints();
-
- for(auto it = m_nodeList.begin(), itEnd = m_nodeList.end(); it != itEnd; ++it) {
- Node* node = *it;
- node->Rotate(clockwise);
- }
-}
-
-void Multiplier::UpdatePoints()
-{
- if(m_angle == 0.0) {
- m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(-18, -9));
- m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(-18, 9));
- m_nodeList[2]->SetPosition(m_position + wxPoint2DDouble(18, 0));
- } else if(m_angle == 90.0) {
- m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(9, -18));
- m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(-9, -18));
- m_nodeList[2]->SetPosition(m_position + wxPoint2DDouble(0, 18));
- } else if(m_angle == 180.0) {
- m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(18, 9));
- m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(18, -9));
- m_nodeList[2]->SetPosition(m_position + wxPoint2DDouble(-18, 0));
- } else if(m_angle == 270.0) {
- m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(-9, 18));
- m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(9, 18));
- m_nodeList[2]->SetPosition(m_position + wxPoint2DDouble(0, -18));
- }
}
bool Multiplier::Solve(double input, double timeStep)
diff --git a/Project/Multiplier.h b/Project/Multiplier.h
index f675b34..2bc0be9 100644
--- a/Project/Multiplier.h
+++ b/Project/Multiplier.h
@@ -18,7 +18,7 @@
#ifndef MULTIPLIER_H
#define MULTIPLIER_H
-#include "ControlElement.h"
+#include "MathOperation.h"
class ConnectionLine;
@@ -29,22 +29,14 @@ class ConnectionLine;
* @brief Multiplies two inputs.
* @file Multiplier.h
*/
-class Multiplier : public ControlElement
+class Multiplier : public MathOperation
{
public:
Multiplier(int id);
~Multiplier();
- virtual void Draw(wxPoint2DDouble translation, double scale) const;
- virtual bool Contains(wxPoint2DDouble position) const { return m_rect.Contains(position); }
- virtual bool Intersects(wxRect2DDouble rect) const { return m_rect.Intersects(rect); }
- virtual bool ShowForm(wxWindow* parent, Element* element) { return false; }
- virtual void Rotate(bool clockwise = true);
-
- virtual void UpdatePoints();
-
+ virtual void DrawSymbol() const;
virtual bool Solve(double input, double timeStep);
-
virtual Element* GetCopy();
};
diff --git a/Project/Project.mk b/Project/Project.mk
index d74ffe2..4aa8df3 100644
--- a/Project/Project.mk
+++ b/Project/Project.mk
@@ -13,7 +13,7 @@ CurrentFileName :=
CurrentFilePath :=
CurrentFileFullPath :=
User :=NDSE-69
-Date :=05/10/2017
+Date :=11/10/2017
CodeLitePath :="C:/Program Files/CodeLite"
LinkerName :=C:/TDM-GCC-64/bin/g++.exe
SharedObjectLinkerName :=C:/TDM-GCC-64/bin/g++.exe -shared -fPIC
@@ -68,13 +68,13 @@ Objects0=$(IntermediateDirectory)/main.cpp$(ObjectSuffix) $(IntermediateDirector
$(IntermediateDirectory)/ChartViewBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/PropertiesFormBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/DataReportBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/MainFrameBase.cpp$(ObjectSuffix) $(IntermediateDirectory)/WorkspaceBase.cpp$(ObjectSuffix) $(IntermediateDirectory)/ElementForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/ControlEditorBase.cpp$(ObjectSuffix) $(IntermediateDirectory)/ChartViewBase.cpp$(ObjectSuffix) $(IntermediateDirectory)/PropertiesForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/DataReportBase.cpp$(ObjectSuffix) \
$(IntermediateDirectory)/ElectricCalculation.cpp$(ObjectSuffix) $(IntermediateDirectory)/PowerFlow.cpp$(ObjectSuffix) $(IntermediateDirectory)/Fault.cpp$(ObjectSuffix) $(IntermediateDirectory)/Electromechanical.cpp$(ObjectSuffix) $(IntermediateDirectory)/Element.cpp$(ObjectSuffix) $(IntermediateDirectory)/ElementDataObject.cpp$(ObjectSuffix) $(IntermediateDirectory)/ElementPlotData.cpp$(ObjectSuffix) $(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(ObjectSuffix) $(IntermediateDirectory)/Camera.cpp$(ObjectSuffix) $(IntermediateDirectory)/MainFrame.cpp$(ObjectSuffix) \
$(IntermediateDirectory)/Workspace.cpp$(ObjectSuffix) $(IntermediateDirectory)/ChartView.cpp$(ObjectSuffix) $(IntermediateDirectory)/ControlEditor.cpp$(ObjectSuffix) $(IntermediateDirectory)/DataReport.cpp$(ObjectSuffix) $(IntermediateDirectory)/FileHanding.cpp$(ObjectSuffix) $(IntermediateDirectory)/ConnectionLine.cpp$(ObjectSuffix) $(IntermediateDirectory)/Constant.cpp$(ObjectSuffix) $(IntermediateDirectory)/ControlElement.cpp$(ObjectSuffix) $(IntermediateDirectory)/ControlElementContainer.cpp$(ObjectSuffix) $(IntermediateDirectory)/ControlElementSolver.cpp$(ObjectSuffix) \
- $(IntermediateDirectory)/Exponential.cpp$(ObjectSuffix) $(IntermediateDirectory)/Gain.cpp$(ObjectSuffix) $(IntermediateDirectory)/IOControl.cpp$(ObjectSuffix) $(IntermediateDirectory)/Limiter.cpp$(ObjectSuffix) $(IntermediateDirectory)/Multiplier.cpp$(ObjectSuffix) $(IntermediateDirectory)/RateLimiter.cpp$(ObjectSuffix) $(IntermediateDirectory)/Sum.cpp$(ObjectSuffix) $(IntermediateDirectory)/TransferFunction.cpp$(ObjectSuffix) $(IntermediateDirectory)/GraphicalElement.cpp$(ObjectSuffix) $(IntermediateDirectory)/Text.cpp$(ObjectSuffix) \
- $(IntermediateDirectory)/Branch.cpp$(ObjectSuffix) $(IntermediateDirectory)/Bus.cpp$(ObjectSuffix) $(IntermediateDirectory)/Capacitor.cpp$(ObjectSuffix) $(IntermediateDirectory)/IndMotor.cpp$(ObjectSuffix) $(IntermediateDirectory)/Inductor.cpp$(ObjectSuffix) $(IntermediateDirectory)/Line.cpp$(ObjectSuffix) $(IntermediateDirectory)/Load.cpp$(ObjectSuffix) $(IntermediateDirectory)/Machines.cpp$(ObjectSuffix) $(IntermediateDirectory)/PowerElement.cpp$(ObjectSuffix) $(IntermediateDirectory)/Shunt.cpp$(ObjectSuffix) \
- $(IntermediateDirectory)/SyncGenerator.cpp$(ObjectSuffix) $(IntermediateDirectory)/SyncMotor.cpp$(ObjectSuffix) $(IntermediateDirectory)/Transformer.cpp$(ObjectSuffix) $(IntermediateDirectory)/GeneralPropertiesForm.cpp$(ObjectSuffix)
+ $(IntermediateDirectory)/Exponential.cpp$(ObjectSuffix) $(IntermediateDirectory)/Gain.cpp$(ObjectSuffix) $(IntermediateDirectory)/IOControl.cpp$(ObjectSuffix) $(IntermediateDirectory)/Limiter.cpp$(ObjectSuffix) $(IntermediateDirectory)/Multiplier.cpp$(ObjectSuffix) $(IntermediateDirectory)/RateLimiter.cpp$(ObjectSuffix) $(IntermediateDirectory)/Sum.cpp$(ObjectSuffix) $(IntermediateDirectory)/TransferFunction.cpp$(ObjectSuffix) $(IntermediateDirectory)/Divider.cpp$(ObjectSuffix) $(IntermediateDirectory)/MathOperation.cpp$(ObjectSuffix) \
+ $(IntermediateDirectory)/GraphicalElement.cpp$(ObjectSuffix) $(IntermediateDirectory)/Text.cpp$(ObjectSuffix) $(IntermediateDirectory)/Branch.cpp$(ObjectSuffix) $(IntermediateDirectory)/Bus.cpp$(ObjectSuffix) $(IntermediateDirectory)/Capacitor.cpp$(ObjectSuffix) $(IntermediateDirectory)/IndMotor.cpp$(ObjectSuffix) $(IntermediateDirectory)/Inductor.cpp$(ObjectSuffix) $(IntermediateDirectory)/Line.cpp$(ObjectSuffix) $(IntermediateDirectory)/Load.cpp$(ObjectSuffix) $(IntermediateDirectory)/Machines.cpp$(ObjectSuffix) \
+ $(IntermediateDirectory)/PowerElement.cpp$(ObjectSuffix) $(IntermediateDirectory)/Shunt.cpp$(ObjectSuffix) $(IntermediateDirectory)/SyncGenerator.cpp$(ObjectSuffix) $(IntermediateDirectory)/SyncMotor.cpp$(ObjectSuffix)
-Objects1=$(IntermediateDirectory)/SimulationsSettingsForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/AboutForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/ConstantForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/ControlSystemTest.cpp$(ObjectSuffix) $(IntermediateDirectory)/ExponentialForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/GainForm.cpp$(ObjectSuffix) \
- $(IntermediateDirectory)/IOControlForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/LimiterForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/RateLimiterForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/SumForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/TransferFunctionForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/TextForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/BusForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/GeneratorStabForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/IndMotorForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/LineForm.cpp$(ObjectSuffix) \
- $(IntermediateDirectory)/LoadForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/SwitchingForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/SyncMachineForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/TransformerForm.cpp$(ObjectSuffix)
+Objects1=$(IntermediateDirectory)/Transformer.cpp$(ObjectSuffix) $(IntermediateDirectory)/GeneralPropertiesForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/SimulationsSettingsForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/AboutForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/ConstantForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/ControlSystemTest.cpp$(ObjectSuffix) \
+ $(IntermediateDirectory)/ExponentialForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/GainForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/IOControlForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/LimiterForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/RateLimiterForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/SumForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/TransferFunctionForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/TextForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/BusForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/GeneratorStabForm.cpp$(ObjectSuffix) \
+ $(IntermediateDirectory)/IndMotorForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/LineForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/LoadForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/SwitchingForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/SyncMachineForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/TransformerForm.cpp$(ObjectSuffix)
@@ -484,6 +484,22 @@ $(IntermediateDirectory)/TransferFunction.cpp$(DependSuffix): TransferFunction.c
$(IntermediateDirectory)/TransferFunction.cpp$(PreprocessSuffix): TransferFunction.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/TransferFunction.cpp$(PreprocessSuffix) TransferFunction.cpp
+$(IntermediateDirectory)/Divider.cpp$(ObjectSuffix): Divider.cpp $(IntermediateDirectory)/Divider.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Divider.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Divider.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/Divider.cpp$(DependSuffix): Divider.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Divider.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Divider.cpp$(DependSuffix) -MM Divider.cpp
+
+$(IntermediateDirectory)/Divider.cpp$(PreprocessSuffix): Divider.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Divider.cpp$(PreprocessSuffix) Divider.cpp
+
+$(IntermediateDirectory)/MathOperation.cpp$(ObjectSuffix): MathOperation.cpp $(IntermediateDirectory)/MathOperation.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/MathOperation.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/MathOperation.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/MathOperation.cpp$(DependSuffix): MathOperation.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/MathOperation.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/MathOperation.cpp$(DependSuffix) -MM MathOperation.cpp
+
+$(IntermediateDirectory)/MathOperation.cpp$(PreprocessSuffix): MathOperation.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/MathOperation.cpp$(PreprocessSuffix) MathOperation.cpp
+
$(IntermediateDirectory)/GraphicalElement.cpp$(ObjectSuffix): GraphicalElement.cpp $(IntermediateDirectory)/GraphicalElement.cpp$(DependSuffix)
$(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/GraphicalElement.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/GraphicalElement.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/GraphicalElement.cpp$(DependSuffix): GraphicalElement.cpp
diff --git a/Project/Project.project b/Project/Project.project
index 98b1a43..091dde7 100644
--- a/Project/Project.project
+++ b/Project/Project.project
@@ -34,6 +34,8 @@
<File Name="RateLimiter.cpp"/>
<File Name="Sum.cpp"/>
<File Name="TransferFunction.cpp"/>
+ <File Name="Divider.cpp"/>
+ <File Name="MathOperation.cpp"/>
</VirtualDirectory>
<VirtualDirectory Name="graphical">
<File Name="GraphicalElement.cpp"/>
@@ -149,6 +151,8 @@
<File Name="RateLimiter.h"/>
<File Name="Sum.h"/>
<File Name="TransferFunction.h"/>
+ <File Name="Divider.h"/>
+ <File Name="MathOperation.h"/>
</VirtualDirectory>
<VirtualDirectory Name="power">
<File Name="Branch.h"/>
diff --git a/Project/Project.txt b/Project/Project.txt
index 571d423..cd6bd62 100644
--- a/Project/Project.txt
+++ b/Project/Project.txt
@@ -1,2 +1,2 @@
-./Release/main.cpp.o ./Release/win_resources.rc.o ./Release/PropertiesData.cpp.o ./Release/ArtMetro.cpp.o ./Release/wxGLString.cpp.o ./Release/MainFrameBitmaps.cpp.o ./Release/WorkspaceBitmaps.cpp.o ./Release/BusFormBitmaps.cpp.o ./Release/ElementFormBitmaps.cpp.o ./Release/ControlEditorBitmaps.cpp.o ./Release/ChartViewBitmaps.cpp.o ./Release/PropertiesFormBitmaps.cpp.o ./Release/DataReportBitmaps.cpp.o ./Release/MainFrameBase.cpp.o ./Release/WorkspaceBase.cpp.o ./Release/ElementForm.cpp.o ./Release/ControlEditorBase.cpp.o ./Release/ChartViewBase.cpp.o ./Release/PropertiesForm.cpp.o ./Release/DataReportBase.cpp.o ./Release/ElectricCalculation.cpp.o ./Release/PowerFlow.cpp.o ./Release/Fault.cpp.o ./Release/Electromechanical.cpp.o ./Release/Element.cpp.o ./Release/ElementDataObject.cpp.o ./Release/ElementPlotData.cpp.o ./Release/wxMathPlot_mathplot.cpp.o ./Release/Camera.cpp.o ./Release/MainFrame.cpp.o ./Release/Workspace.cpp.o ./Release/ChartView.cpp.o ./Release/ControlEditor.cpp.o ./Release/DataReport.cpp.o ./Release/FileHanding.cpp.o ./Release/ConnectionLine.cpp.o ./Release/Constant.cpp.o ./Release/ControlElement.cpp.o ./Release/ControlElementContainer.cpp.o ./Release/ControlElementSolver.cpp.o ./Release/Exponential.cpp.o ./Release/Gain.cpp.o ./Release/IOControl.cpp.o ./Release/Limiter.cpp.o ./Release/Multiplier.cpp.o ./Release/RateLimiter.cpp.o ./Release/Sum.cpp.o ./Release/TransferFunction.cpp.o ./Release/GraphicalElement.cpp.o ./Release/Text.cpp.o ./Release/Branch.cpp.o ./Release/Bus.cpp.o ./Release/Capacitor.cpp.o ./Release/IndMotor.cpp.o ./Release/Inductor.cpp.o ./Release/Line.cpp.o ./Release/Load.cpp.o ./Release/Machines.cpp.o ./Release/PowerElement.cpp.o ./Release/Shunt.cpp.o ./Release/SyncGenerator.cpp.o ./Release/SyncMotor.cpp.o ./Release/Transformer.cpp.o ./Release/GeneralPropertiesForm.cpp.o
-./Release/SimulationsSettingsForm.cpp.o ./Release/AboutForm.cpp.o ./Release/ConstantForm.cpp.o ./Release/ControlSystemTest.cpp.o ./Release/ExponentialForm.cpp.o ./Release/GainForm.cpp.o ./Release/IOControlForm.cpp.o ./Release/LimiterForm.cpp.o ./Release/RateLimiterForm.cpp.o ./Release/SumForm.cpp.o ./Release/TransferFunctionForm.cpp.o ./Release/TextForm.cpp.o ./Release/BusForm.cpp.o ./Release/GeneratorStabForm.cpp.o ./Release/IndMotorForm.cpp.o ./Release/LineForm.cpp.o ./Release/LoadForm.cpp.o ./Release/ReactiveShuntElementForm.cpp.o ./Release/SwitchingForm.cpp.o ./Release/SyncMachineForm.cpp.o ./Release/TransformerForm.cpp.o
+./Release/main.cpp.o ./Release/win_resources.rc.o ./Release/PropertiesData.cpp.o ./Release/ArtMetro.cpp.o ./Release/wxGLString.cpp.o ./Release/MainFrameBitmaps.cpp.o ./Release/WorkspaceBitmaps.cpp.o ./Release/BusFormBitmaps.cpp.o ./Release/ElementFormBitmaps.cpp.o ./Release/ControlEditorBitmaps.cpp.o ./Release/ChartViewBitmaps.cpp.o ./Release/PropertiesFormBitmaps.cpp.o ./Release/DataReportBitmaps.cpp.o ./Release/MainFrameBase.cpp.o ./Release/WorkspaceBase.cpp.o ./Release/ElementForm.cpp.o ./Release/ControlEditorBase.cpp.o ./Release/ChartViewBase.cpp.o ./Release/PropertiesForm.cpp.o ./Release/DataReportBase.cpp.o ./Release/ElectricCalculation.cpp.o ./Release/PowerFlow.cpp.o ./Release/Fault.cpp.o ./Release/Electromechanical.cpp.o ./Release/Element.cpp.o ./Release/ElementDataObject.cpp.o ./Release/ElementPlotData.cpp.o ./Release/wxMathPlot_mathplot.cpp.o ./Release/Camera.cpp.o ./Release/MainFrame.cpp.o ./Release/Workspace.cpp.o ./Release/ChartView.cpp.o ./Release/ControlEditor.cpp.o ./Release/DataReport.cpp.o ./Release/FileHanding.cpp.o ./Release/ConnectionLine.cpp.o ./Release/Constant.cpp.o ./Release/ControlElement.cpp.o ./Release/ControlElementContainer.cpp.o ./Release/ControlElementSolver.cpp.o ./Release/Exponential.cpp.o ./Release/Gain.cpp.o ./Release/IOControl.cpp.o ./Release/Limiter.cpp.o ./Release/Multiplier.cpp.o ./Release/RateLimiter.cpp.o ./Release/Sum.cpp.o ./Release/TransferFunction.cpp.o ./Release/Divider.cpp.o ./Release/MathOperation.cpp.o ./Release/GraphicalElement.cpp.o ./Release/Text.cpp.o ./Release/Branch.cpp.o ./Release/Bus.cpp.o ./Release/Capacitor.cpp.o ./Release/IndMotor.cpp.o ./Release/Inductor.cpp.o ./Release/Line.cpp.o ./Release/Load.cpp.o ./Release/Machines.cpp.o ./Release/PowerElement.cpp.o ./Release/Shunt.cpp.o ./Release/SyncGenerator.cpp.o ./Release/SyncMotor.cpp.o
+./Release/Transformer.cpp.o ./Release/GeneralPropertiesForm.cpp.o ./Release/SimulationsSettingsForm.cpp.o ./Release/AboutForm.cpp.o ./Release/ConstantForm.cpp.o ./Release/ControlSystemTest.cpp.o ./Release/ExponentialForm.cpp.o ./Release/GainForm.cpp.o ./Release/IOControlForm.cpp.o ./Release/LimiterForm.cpp.o ./Release/RateLimiterForm.cpp.o ./Release/SumForm.cpp.o ./Release/TransferFunctionForm.cpp.o ./Release/TextForm.cpp.o ./Release/BusForm.cpp.o ./Release/GeneratorStabForm.cpp.o ./Release/IndMotorForm.cpp.o ./Release/LineForm.cpp.o ./Release/LoadForm.cpp.o ./Release/ReactiveShuntElementForm.cpp.o ./Release/SwitchingForm.cpp.o ./Release/SyncMachineForm.cpp.o ./Release/TransformerForm.cpp.o
diff --git a/Project/PropertiesForm.cpp b/Project/PropertiesForm.cpp
index af7fcc2..bd09f3e 100644
--- a/Project/PropertiesForm.cpp
+++ b/Project/PropertiesForm.cpp
@@ -532,7 +532,7 @@ AboutFormBase::AboutFormBase(wxWindow* parent, wxWindowID id, const wxString& ti
flexGridSizer247->Add(m_staticTextVersionLabel, 0, wxALL, WXC_FROM_DIP(5));
- m_staticTextVersion = new wxStaticText(this, wxID_ANY, _("Alpha 2017w38b"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
+ m_staticTextVersion = new wxStaticText(this, wxID_ANY, _("Alpha 2017w41a"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
flexGridSizer247->Add(m_staticTextVersion, 0, wxALL, WXC_FROM_DIP(5));
diff --git a/Project/PropertiesForm.wxcp b/Project/PropertiesForm.wxcp
index 72d0a53..c3fc587 100644
--- a/Project/PropertiesForm.wxcp
+++ b/Project/PropertiesForm.wxcp
@@ -5801,7 +5801,7 @@
}, {
"type": "multi-string",
"m_label": "Label:",
- "m_value": "Alpha 2017w38b"
+ "m_value": "Alpha 2017w41a"
}, {
"type": "string",
"m_label": "Wrap:",
diff --git a/Project/Workspace.cpp b/Project/Workspace.cpp
index bd385b5..97be7b4 100644
--- a/Project/Workspace.cpp
+++ b/Project/Workspace.cpp
@@ -1466,12 +1466,6 @@ bool Workspace::RunStability()
ElementPlotData plotData;
if(element->GetPlotData(plotData)) plotDataList.push_back(plotData);
}
- ElementPlotData tests(_("Error"), ElementPlotData::CT_TEST);
- tests.AddData(stability.m_wErrorVector, _("Speed error"));
- tests.AddData(stability.m_sdCVector, _("Sd"));
- tests.AddData(stability.m_sqCVector, _("Sq"));
- tests.AddData(stability.m_numItVector, _("Number iterations"));
- plotDataList.push_back(tests);
ChartView* cView = new ChartView(this, plotDataList, m_stabilityTimeVector);
cView->Show();
diff --git a/Project/data/images/control/div.png b/Project/data/images/control/div.png
new file mode 100644
index 0000000..5ab2b20
--- /dev/null
+++ b/Project/data/images/control/div.png
Binary files differ
diff --git a/Project/data/images/control/gain.png b/Project/data/images/control/gain.png
index 33a3532..978a217 100644
--- a/Project/data/images/control/gain.png
+++ b/Project/data/images/control/gain.png
Binary files differ
diff --git a/Project/data/images/control/io.png b/Project/data/images/control/io.png
index 2a2201f..0d1da22 100644
--- a/Project/data/images/control/io.png
+++ b/Project/data/images/control/io.png
Binary files differ
diff --git a/Project/data/images/control/limiter.png b/Project/data/images/control/limiter.png
index 3aff22d..ee402cc 100644
--- a/Project/data/images/control/limiter.png
+++ b/Project/data/images/control/limiter.png
Binary files differ
diff --git a/Project/data/images/control/mult.png b/Project/data/images/control/mult.png
index fcdda5a..a009b3c 100644
--- a/Project/data/images/control/mult.png
+++ b/Project/data/images/control/mult.png
Binary files differ
diff --git a/Project/data/images/control/rateLimiter.png b/Project/data/images/control/rateLimiter.png
index d1b7f74..49a92aa 100644
--- a/Project/data/images/control/rateLimiter.png
+++ b/Project/data/images/control/rateLimiter.png
Binary files differ
diff --git a/Project/data/images/control/sat.png b/Project/data/images/control/sat.png
index a7c2555..9fc77be 100644
--- a/Project/data/images/control/sat.png
+++ b/Project/data/images/control/sat.png
Binary files differ
diff --git a/Project/data/images/control/sum.png b/Project/data/images/control/sum.png
index b572434..29d3330 100644
--- a/Project/data/images/control/sum.png
+++ b/Project/data/images/control/sum.png
Binary files differ
diff --git a/Project/data/images/control/transferFunc.png b/Project/data/images/control/transferFunc.png
index 5902a99..b1e95e1 100644
--- a/Project/data/images/control/transferFunc.png
+++ b/Project/data/images/control/transferFunc.png
Binary files differ
diff --git a/Project/data/images/control/value.png b/Project/data/images/control/value.png
index 822908b..b274e7a 100644
--- a/Project/data/images/control/value.png
+++ b/Project/data/images/control/value.png
Binary files differ
diff --git a/Project/data/images/icon.ico b/Project/data/images/icon.ico
new file mode 100644
index 0000000..f1817fa
--- /dev/null
+++ b/Project/data/images/icon.ico
Binary files differ
diff --git a/Project/data/lang/pt_BR/pt_BR.mo b/Project/data/lang/pt_BR/pt_BR.mo
index 05ffb05..699ae18 100644
--- a/Project/data/lang/pt_BR/pt_BR.mo
+++ b/Project/data/lang/pt_BR/pt_BR.mo
Binary files differ
diff --git a/Project/data/lang/pt_BR/pt_BR.po b/Project/data/lang/pt_BR/pt_BR.po
index c9f09e9..15abcdd 100644
--- a/Project/data/lang/pt_BR/pt_BR.po
+++ b/Project/data/lang/pt_BR/pt_BR.po
@@ -1,8 +1,8 @@
msgid ""
msgstr ""
"Project-Id-Version: PSP-UFU pt_BR 0.0.1\n"
-"POT-Creation-Date: 2017-09-14 20:02-0300\n"
-"PO-Revision-Date: 2017-09-14 20:12-0300\n"
+"POT-Creation-Date: 2017-10-11 19:08-0300\n"
+"PO-Revision-Date: 2017-10-11 19:11-0300\n"
"Last-Translator: \n"
"Language-Team: Thales Lima Oliveira <thaleslima.ufu@gmail.com>\n"
"Language: pt_BR\n"
@@ -17,35 +17,35 @@ msgstr ""
"X-Poedit-SearchPathExcluded-0: wxMathPlot\n"
"X-Poedit-SearchPathExcluded-1: rapidXML\n"
-#: AboutForm.cpp:22
+#: AboutForm.cpp:39
msgid "Developers"
msgstr "Desenvolvedores"
-#: AboutForm.cpp:27
+#: AboutForm.cpp:44
msgid "Main developer and project admin"
msgstr "Desenvolvedor principal e administrador do projeto"
-#: AboutForm.cpp:32
+#: AboutForm.cpp:49
msgid "Contributors / Special Thanks"
msgstr "Colaboradores / Agradecimentos Especiais"
-#: AboutForm.cpp:38
+#: AboutForm.cpp:55
msgid "Chief advisor"
msgstr "Conselheiro-chefe"
-#: Bus.cpp:178
+#: Bus.cpp:195
msgid "Edit bus"
msgstr "Editar barra"
-#: Bus.cpp:207 Transformer.cpp:407 Transformer.cpp:418
+#: Bus.cpp:224 Transformer.cpp:424 Transformer.cpp:435
msgid " V"
msgstr " V"
-#: Bus.cpp:207 Transformer.cpp:410 Transformer.cpp:421
+#: Bus.cpp:224 Transformer.cpp:427 Transformer.cpp:438
msgid " kV"
msgstr " kV"
-#: Bus.cpp:209
+#: Bus.cpp:226
msgid ""
"\n"
"V = "
@@ -53,16 +53,16 @@ msgstr ""
"\n"
"V = "
-#: Bus.cpp:209 Bus.cpp:215 Bus.cpp:216 Bus.cpp:217 Bus.cpp:219 Bus.cpp:220
-#: Bus.cpp:221 Bus.cpp:224 Capacitor.cpp:186 IndMotor.cpp:99 IndMotor.cpp:118
-#: Inductor.cpp:180 Line.cpp:497 Line.cpp:499 Line.cpp:501 Line.cpp:503
-#: Load.cpp:201 Load.cpp:218 SyncGenerator.cpp:176 SyncGenerator.cpp:195
-#: SyncMotor.cpp:124 SyncMotor.cpp:143 Transformer.cpp:436 Transformer.cpp:438
-#: Transformer.cpp:440 Transformer.cpp:442
+#: Bus.cpp:226 Bus.cpp:232 Bus.cpp:233 Bus.cpp:234 Bus.cpp:236 Bus.cpp:237
+#: Bus.cpp:238 Bus.cpp:241 Capacitor.cpp:203 IndMotor.cpp:109 IndMotor.cpp:128
+#: Inductor.cpp:197 Line.cpp:517 Line.cpp:519 Line.cpp:521 Line.cpp:523
+#: Load.cpp:218 Load.cpp:235 SyncGenerator.cpp:193 SyncGenerator.cpp:212
+#: SyncMotor.cpp:141 SyncMotor.cpp:160 Transformer.cpp:453 Transformer.cpp:455
+#: Transformer.cpp:457 Transformer.cpp:459
msgid " p.u."
msgstr " p.u."
-#: Bus.cpp:214
+#: Bus.cpp:231
msgid ""
"\n"
"\n"
@@ -72,7 +72,7 @@ msgstr ""
"\n"
"Informações da falta:"
-#: Bus.cpp:215
+#: Bus.cpp:232
msgid ""
"\n"
"Va = "
@@ -80,7 +80,7 @@ msgstr ""
"\n"
"Va = "
-#: Bus.cpp:216
+#: Bus.cpp:233
msgid ""
"\n"
"Vb = "
@@ -88,7 +88,7 @@ msgstr ""
"\n"
"Vb = "
-#: Bus.cpp:217
+#: Bus.cpp:234
msgid ""
"\n"
"Vc = "
@@ -96,7 +96,7 @@ msgstr ""
"\n"
"Vc = "
-#: Bus.cpp:219
+#: Bus.cpp:236
msgid ""
"\n"
"Ia = "
@@ -104,7 +104,7 @@ msgstr ""
"\n"
"Ia = "
-#: Bus.cpp:220
+#: Bus.cpp:237
msgid ""
"\n"
"Ib = "
@@ -112,7 +112,7 @@ msgstr ""
"\n"
"Ib = "
-#: Bus.cpp:221
+#: Bus.cpp:238
msgid ""
"\n"
"Ic = "
@@ -120,7 +120,7 @@ msgstr ""
"\n"
"Ic = "
-#: Bus.cpp:224
+#: Bus.cpp:241
msgid ""
"\n"
"\n"
@@ -130,111 +130,111 @@ msgstr ""
"\n"
"Scc = "
-#: Bus.cpp:240 TextForm.cpp:856
+#: Bus.cpp:257 TextForm.cpp:873
msgid "Voltage"
msgstr "Tensão"
-#: Bus.cpp:241 DataReport.cpp:227 DataReport.cpp:255 DataReport.cpp:258
-#: DataReport.cpp:261 DataReport.cpp:270 DataReport.cpp:273 DataReport.cpp:276
-#: DataReport.cpp:289 DataReport.cpp:292 DataReport.cpp:295 DataReport.cpp:304
-#: DataReport.cpp:307 DataReport.cpp:310 TextForm.cpp:857
+#: Bus.cpp:258 DataReport.cpp:244 DataReport.cpp:272 DataReport.cpp:275
+#: DataReport.cpp:278 DataReport.cpp:287 DataReport.cpp:290 DataReport.cpp:293
+#: DataReport.cpp:306 DataReport.cpp:309 DataReport.cpp:312 DataReport.cpp:321
+#: DataReport.cpp:324 DataReport.cpp:327 TextForm.cpp:874
msgid "Angle"
msgstr "Ângulo"
-#: BusForm.cpp:6
+#: BusForm.cpp:23
msgid "Three-phase"
msgstr "Trifásico"
-#: BusForm.cpp:7
+#: BusForm.cpp:24
msgid "Line-to-line"
msgstr "Fase-fase"
-#: BusForm.cpp:8
+#: BusForm.cpp:25
msgid "Double line-to-ground"
msgstr "Fase-fase-terra"
-#: BusForm.cpp:9
+#: BusForm.cpp:26
msgid "Line-to-ground"
msgstr "Fase-terra"
-#: BusForm.cpp:81
+#: BusForm.cpp:98
msgid "Value entered incorrectly in the field \"Rated voltage\"."
msgstr "Valor inserido incorretamente no campo \"Tensão nominal\"."
-#: BusForm.cpp:87
+#: BusForm.cpp:104
msgid "Value entered incorrectly in the field \"Controlled voltage\"."
msgstr "Valor inserido incorretamente no campo \"Tensão controlada\"."
-#: BusForm.cpp:122
+#: BusForm.cpp:139
msgid "Value entered incorrectly in the field \"Fault resistance\"."
msgstr "Valor inserido incorretamente no campo \"Resistência da falta\"."
-#: BusForm.cpp:126
+#: BusForm.cpp:143
msgid "Value entered incorrectly in the field \"Fault reactance\"."
msgstr "Valor inserido incorretamente no campo \"Reatância da falta\"."
-#: BusForm.cpp:133
+#: BusForm.cpp:150
msgid "Value entered incorrectly in the field \"Time\"."
msgstr "Valor inserido incorretamente no campo \"Instante\"."
-#: BusForm.cpp:137
+#: BusForm.cpp:154
msgid "Value entered incorrectly in the field \"Fault lenght\"."
msgstr "Valor inserido incorretamente no campo \"Duração da falta\"."
-#: BusForm.cpp:141
+#: BusForm.cpp:158
msgid ""
"Value entered incorrectly in the field \"Fault resistence (stability)\"."
msgstr ""
"Valor inserido incorretamente no campo \"Resistência da falta "
"(estabilidade)\"."
-#: BusForm.cpp:145
+#: BusForm.cpp:162
msgid "Value entered incorrectly in the field \"Fault reactance (stability)\"."
msgstr ""
"Valor inserido incorretamente no campo \"Reatância da falta (estabilidade)\"."
-#: BusForm.cpp:209
+#: BusForm.cpp:226
msgid "Lines AB"
msgstr "Fases AB"
-#: BusForm.cpp:210
+#: BusForm.cpp:227
msgid "Lines BC"
msgstr "Fases BC"
-#: BusForm.cpp:211
+#: BusForm.cpp:228
msgid "Lines CA"
msgstr "Fase CA"
-#: BusForm.cpp:216
+#: BusForm.cpp:233
msgid "Line A"
msgstr "Fase A"
-#: BusForm.cpp:217
+#: BusForm.cpp:234
msgid "Line B"
msgstr "Fase B"
-#: BusForm.cpp:218
+#: BusForm.cpp:235
msgid "Line C"
msgstr "Fase C"
-#: BusForm.cpp:225 TextForm.cpp:959
+#: BusForm.cpp:242 TextForm.cpp:976
msgid "V"
msgstr "V"
-#: BusForm.cpp:228 TextForm.cpp:960
+#: BusForm.cpp:245 TextForm.cpp:977
msgid "kV"
msgstr "kV"
-#: Capacitor.cpp:112
+#: Capacitor.cpp:129
msgid "Edit Capacitor"
msgstr "Editar Capacitor"
-#: Capacitor.cpp:131 ChartView.cpp:94
+#: Capacitor.cpp:148 ChartView.cpp:111
msgid "Capacitor"
msgstr "Capacitor"
-#: Capacitor.cpp:183 IndMotor.cpp:115 Inductor.cpp:177 Load.cpp:215
-#: SyncGenerator.cpp:192 SyncMotor.cpp:140
+#: Capacitor.cpp:200 IndMotor.cpp:125 Inductor.cpp:194 Load.cpp:232
+#: SyncGenerator.cpp:209 SyncMotor.cpp:157
msgid ""
"\n"
"Q = "
@@ -242,148 +242,148 @@ msgstr ""
"\n"
"Q = "
-#: Capacitor.cpp:189 IndMotor.cpp:121 Inductor.cpp:183 Load.cpp:221
-#: SyncGenerator.cpp:198 SyncMotor.cpp:146
+#: Capacitor.cpp:206 IndMotor.cpp:131 Inductor.cpp:200 Load.cpp:238
+#: SyncGenerator.cpp:215 SyncMotor.cpp:163
msgid " VAr"
msgstr " VAr"
-#: Capacitor.cpp:192 IndMotor.cpp:124 Inductor.cpp:186 Load.cpp:224
-#: SyncGenerator.cpp:201 SyncMotor.cpp:149
+#: Capacitor.cpp:209 IndMotor.cpp:134 Inductor.cpp:203 Load.cpp:241
+#: SyncGenerator.cpp:218 SyncMotor.cpp:166
msgid " kVAr"
msgstr " kVAr"
-#: Capacitor.cpp:195 IndMotor.cpp:127 Inductor.cpp:189 Load.cpp:227
-#: SyncGenerator.cpp:204 SyncMotor.cpp:152
+#: Capacitor.cpp:212 IndMotor.cpp:137 Inductor.cpp:206 Load.cpp:244
+#: SyncGenerator.cpp:221 SyncMotor.cpp:169
msgid " MVAr"
msgstr " MVAr"
-#: ChartView.cpp:17 ChartView.cpp:136
+#: ChartView.cpp:34 ChartView.cpp:153
msgid "Color"
msgstr "Cor"
-#: ChartView.cpp:28
+#: ChartView.cpp:45
msgid "Solid"
msgstr "Sólido"
-#: ChartView.cpp:29
+#: ChartView.cpp:46
msgid "Dot"
msgstr "Ponto"
-#: ChartView.cpp:30
+#: ChartView.cpp:47
msgid "Dash"
msgstr "Traço"
-#: ChartView.cpp:31
+#: ChartView.cpp:48
msgid "Dot and dash"
msgstr "Ponto e traço"
-#: ChartView.cpp:32
+#: ChartView.cpp:49
msgid "Cross"
msgstr "Cruz"
-#: ChartView.cpp:33
+#: ChartView.cpp:50
msgid "Driagonal cross"
msgstr "Cruz diagonal"
-#: ChartView.cpp:83 ChartView.cpp:503 ElementForm.cpp:236
+#: ChartView.cpp:100 ChartView.cpp:520 ElementForm.cpp:236
msgid "Time"
msgstr "Tempo"
-#: ChartView.cpp:90 ElementForm.h:143
+#: ChartView.cpp:107 ElementForm.h:143
msgid "Bus"
msgstr "Barra"
-#: ChartView.cpp:91
+#: ChartView.cpp:108
msgid "Induction motor"
msgstr "Motor de indução"
-#: ChartView.cpp:92 DataReport.cpp:380 DataReport.cpp:391 DataReport.cpp:532
-#: DataReport.cpp:733 DataReport.cpp:771 ElementForm.h:448
+#: ChartView.cpp:109 DataReport.cpp:397 DataReport.cpp:408 DataReport.cpp:549
+#: DataReport.cpp:750 DataReport.cpp:788 ElementForm.h:448
msgid "Line"
msgstr "Linha"
-#: ChartView.cpp:93 ElementForm.h:592
+#: ChartView.cpp:110 ElementForm.h:592
msgid "Load"
msgstr "Carga"
-#: ChartView.cpp:95 Inductor.cpp:125
+#: ChartView.cpp:112 Inductor.cpp:142
msgid "Inductor"
msgstr "Indutor"
-#: ChartView.cpp:96
+#: ChartView.cpp:113
msgid "Synchronous compensator"
msgstr "Compensador síncrono"
-#: ChartView.cpp:97
+#: ChartView.cpp:114
msgid "Synchronous generator"
msgstr "Gerador síncrono"
-#: ChartView.cpp:98 DataReport.cpp:426 DataReport.cpp:437 DataReport.cpp:583
-#: DataReport.cpp:837 DataReport.cpp:875 ElementForm.h:547
+#: ChartView.cpp:115 DataReport.cpp:443 DataReport.cpp:454 DataReport.cpp:600
+#: DataReport.cpp:854 DataReport.cpp:892 ElementForm.h:547
msgid "Transformer"
msgstr "Transformador"
-#: ChartView.cpp:99 ControlEditor.cpp:750
+#: ChartView.cpp:116 ControlEditor.cpp:781
msgid "Test"
msgstr "Teste"
-#: ChartView.cpp:124 ChartViewBase.cpp:123
+#: ChartView.cpp:141 ChartViewBase.cpp:123
msgid "Draw"
msgstr "Plotar"
-#: ChartView.cpp:140 ChartViewBase.cpp:127
+#: ChartView.cpp:157 ChartViewBase.cpp:127
msgid "Thickness"
msgstr "Espessura"
-#: ChartView.cpp:142 ChartViewBase.cpp:133 DataReport.cpp:212
-#: DataReport.cpp:224 DataReport.cpp:234 DataReport.cpp:279
-#: ElementForm.cpp:2329 SwitchingForm.cpp:6 SwitchingForm.cpp:15
+#: ChartView.cpp:159 ChartViewBase.cpp:133 DataReport.cpp:229
+#: DataReport.cpp:241 DataReport.cpp:251 DataReport.cpp:296
+#: ElementForm.cpp:2329 SwitchingForm.cpp:23 SwitchingForm.cpp:32
msgid "Type"
msgstr "Tipo"
-#: ChartView.cpp:144 ChartViewBase.cpp:141
+#: ChartView.cpp:161 ChartViewBase.cpp:141
msgid "Axis"
msgstr "Eixo"
-#: ChartView.cpp:159 ChartViewBase.cpp:160
+#: ChartView.cpp:176 ChartViewBase.cpp:160
msgid "Margins"
msgstr "Margens"
-#: ChartView.cpp:164 ChartViewBase.cpp:175
+#: ChartView.cpp:181 ChartViewBase.cpp:175
msgid "Axis limit"
msgstr "Limites dos eixos"
-#: ChartView.cpp:207
+#: ChartView.cpp:224
msgid "Save image"
msgstr "Salvar imagem"
-#: ChartView.cpp:243
+#: ChartView.cpp:260
msgid "Chart send to clipboard"
msgstr "Gráfico enviado para a área de transferência"
-#: ChartView.cpp:243 GeneralPropertiesForm.cpp:96
+#: ChartView.cpp:260 GeneralPropertiesForm.cpp:113
msgid "Info"
msgstr "Informação"
-#: ChartView.cpp:247
+#: ChartView.cpp:264
msgid "It was not possible to send to clipboard"
msgstr "Não foi possível enviar para a área de transferência"
-#: ChartView.cpp:247 ChartView.cpp:466 ControlEditor.cpp:733
-#: ControlEditor.cpp:821 ControlElementSolver.cpp:89 ControlSystemTest.cpp:36
-#: ControlSystemTest.cpp:43 ControlSystemTest.cpp:50 ControlSystemTest.cpp:57
-#: Element.cpp:277 Element.cpp:291 GeneralPropertiesForm.cpp:57 Line.cpp:151
-#: Line.cpp:377 MainFrame.cpp:269 SumForm.cpp:43 SumForm.cpp:58
-#: TextForm.cpp:1208 Workspace.cpp:1127 Workspace.cpp:1182 Workspace.cpp:1290
-#: Workspace.cpp:1394 Workspace.cpp:1416 Workspace.cpp:1434 Workspace.cpp:1452
+#: ChartView.cpp:264 ChartView.cpp:483 ControlEditor.cpp:766
+#: ControlEditor.cpp:860 ControlElementSolver.cpp:95 ControlSystemTest.cpp:53
+#: ControlSystemTest.cpp:60 ControlSystemTest.cpp:67 ControlSystemTest.cpp:74
+#: Element.cpp:297 Element.cpp:311 GeneralPropertiesForm.cpp:74 Line.cpp:168
+#: Line.cpp:397 MainFrame.cpp:308 SumForm.cpp:58 SumForm.cpp:74
+#: TextForm.cpp:1225 Workspace.cpp:1144 Workspace.cpp:1199 Workspace.cpp:1307
+#: Workspace.cpp:1411 Workspace.cpp:1433 Workspace.cpp:1451
msgid "Error"
msgstr "Erro"
-#: ChartView.cpp:459
+#: ChartView.cpp:476
msgid "Save CSV file"
msgstr "Salvar arquivo CSV"
-#: ChartView.cpp:466
+#: ChartView.cpp:483
msgid "It was not possible to open or create the selected file."
msgstr "Não foi possível criar ou abrir o arquivo selecionado."
@@ -495,75 +495,79 @@ msgstr "Y máx"
msgid "Chart viewer"
msgstr "Visualizador de gráficos"
-#: ConstantForm.cpp:24
+#: ConstantForm.cpp:41
msgid "Value entered incorrectly in the field \"Constant value\"."
msgstr "Valor inserido incorretamente no campo \"Valor da constante\"."
-#: ControlEditor.cpp:135
+#: ControlEditor.cpp:158
msgid "In/Out"
msgstr "Entrada/Saída"
-#: ControlEditor.cpp:141
+#: ControlEditor.cpp:163
msgid "Transfer fcn"
msgstr "Func Transferência"
-#: ControlEditor.cpp:145 ElementForm.h:826
+#: ControlEditor.cpp:169 ElementForm.h:826
msgid "Sum"
msgstr "Somador"
-#: ControlEditor.cpp:151 ElementForm.h:944
+#: ControlEditor.cpp:174 ElementForm.h:944
msgid "Constant"
msgstr "Constante"
-#: ControlEditor.cpp:156 ElementForm.h:856
+#: ControlEditor.cpp:179 ElementForm.h:970
+msgid "Gain"
+msgstr "Ganho"
+
+#: ControlEditor.cpp:184 ElementForm.h:856
msgid "Limiter"
msgstr "Limitador"
-#: ControlEditor.cpp:161 ElementForm.h:970
-msgid "Gain"
-msgstr "Ganho"
+#: ControlEditor.cpp:190 ElementForm.h:886
+msgid "Rate limiter"
+msgstr "Limitador de taxa"
-#: ControlEditor.cpp:166
+#: ControlEditor.cpp:196
msgid "Multiplier"
msgstr "Multiplicador"
-#: ControlEditor.cpp:170 ElementForm.h:918
+#: ControlEditor.cpp:201
+msgid "Divider"
+msgstr "Divisor"
+
+#: ControlEditor.cpp:206 ElementForm.h:918
msgid "Exponential"
msgstr "Exponencial"
-#: ControlEditor.cpp:176 ElementForm.h:886
-msgid "Rate limiter"
-msgstr "Limitador de taxa"
-
-#: ControlEditor.cpp:714
+#: ControlEditor.cpp:747
msgid "Save CTL file"
msgstr "Salvar arquivo CTL"
-#: ControlEditor.cpp:725
+#: ControlEditor.cpp:758
msgid "Open CTL file"
msgstr "Abrir arquivo CTL"
-#: ControlEditor.cpp:733 MainFrame.cpp:269
+#: ControlEditor.cpp:766 MainFrame.cpp:308
msgid "It was not possible to open the selected file."
msgstr "Não foi possível abrir o arquivo selecionado."
-#: ControlEditor.cpp:750 Electromechanical.cpp:26
+#: ControlEditor.cpp:781 Electromechanical.cpp:44
msgid "Initializing..."
msgstr "Inicializando..."
-#: ControlEditor.cpp:805
+#: ControlEditor.cpp:844
msgid "I/O"
msgstr "I/O"
-#: ControlEditor.cpp:806 ElementForm.cpp:3488
+#: ControlEditor.cpp:845 ElementForm.cpp:3488
msgid "Input"
msgstr "Entrada"
-#: ControlEditor.cpp:807 ElementForm.cpp:3498
+#: ControlEditor.cpp:846 ElementForm.cpp:3498
msgid "Output"
msgstr "Saída"
-#: ControlEditor.cpp:821
+#: ControlEditor.cpp:860
msgid "It was not possible to solve the control system"
msgstr "Não foi possível resolver o sistema de controle"
@@ -603,7 +607,7 @@ msgstr "Arrastar"
msgid "Move"
msgstr "Mover"
-#: ControlEditorBase.cpp:85 Element.cpp:238 Line.cpp:284 MainFrameBase.cpp:144
+#: ControlEditorBase.cpp:85 Element.cpp:258 Line.cpp:304 MainFrameBase.cpp:144
msgid "Delete"
msgstr "Excluir"
@@ -685,186 +689,190 @@ msgstr "Editor de controle"
msgid "Control system test"
msgstr "Teste do sistema de controle"
-#: ControlElementSolver.cpp:50
-msgid "The control system must have one input and one output."
-msgstr "O sistema de controle deve ter uma entrada e uma saída."
+#: ControlElementSolver.cpp:56
+msgid "The control system must have at least one input and one output."
+msgstr "O sistema de controle deve ter pelo menos uma entrada e uma saída."
-#: ControlElementSolver.cpp:66
+#: ControlElementSolver.cpp:72
msgid "There is no input in the control system."
msgstr "Não há entrada no sistema de controle."
-#: ControlElementSolver.cpp:70
+#: ControlElementSolver.cpp:76
msgid "There is no output in the control system."
msgstr "Não há saída no sistema de controle."
-#: ControlElementSolver.cpp:75
+#: ControlElementSolver.cpp:81
msgid "Input not connected."
msgstr "Entrada não conectada."
-#: ControlElementSolver.cpp:84
+#: ControlElementSolver.cpp:90 ControlElementSolver.cpp:153
msgid "It was not possible to initialize the control system."
msgstr "Não foi possível inicializar o sistema de controle."
-#: ControlSystemTest.cpp:36
+#: ControlElementSolver.h:84
+msgid "Unknown error."
+msgstr "Erro desconhecido."
+
+#: ControlSystemTest.cpp:53
msgid "Value entered incorrectly in the field \"Start time\"."
msgstr "Valor inserido incorretamente no campo \"Tempo de início\"."
-#: ControlSystemTest.cpp:43
+#: ControlSystemTest.cpp:60
msgid "Value entered incorrectly in the field \"Slope\"."
msgstr "Valor inserido incorretamente no campo \"Inclinação\"."
-#: ControlSystemTest.cpp:50 SimulationsSettingsForm.cpp:96
+#: ControlSystemTest.cpp:67 SimulationsSettingsForm.cpp:113
msgid "Value entered incorrectly in the field \"Time step\"."
msgstr "Valor inserido incorretamente no campo \"Passo de integração\"."
-#: ControlSystemTest.cpp:57 SimulationsSettingsForm.cpp:99
+#: ControlSystemTest.cpp:74 SimulationsSettingsForm.cpp:116
msgid "Value entered incorrectly in the field \"Simulation time\"."
msgstr "Valor inserido incorretamente no campo \"Tempo de simulação\"."
-#: DataReport.cpp:184
+#: DataReport.cpp:201
msgid "Voltage (p.u.)"
msgstr "Tensão (p.u.)"
-#: DataReport.cpp:185
+#: DataReport.cpp:202
msgid "Voltage (V)"
msgstr "Tensão (V)"
-#: DataReport.cpp:186
+#: DataReport.cpp:203
msgid "Voltage (kV)"
msgstr "Tensão (kV)"
-#: DataReport.cpp:188
+#: DataReport.cpp:205
msgid "Active Power (p.u.)"
msgstr "Potência ativa (p.u.)"
-#: DataReport.cpp:189
+#: DataReport.cpp:206
msgid "Active Power (W)"
msgstr "Potência ativa (W)"
-#: DataReport.cpp:190
+#: DataReport.cpp:207
msgid "Active Power (kW)"
msgstr "Potência ativa (kW)"
-#: DataReport.cpp:191
+#: DataReport.cpp:208
msgid "Active Power (MW)"
msgstr "Potência ativa (MW)"
-#: DataReport.cpp:193
+#: DataReport.cpp:210
msgid "Reactive Power (p.u.)"
msgstr "Potência reativa (p.u.)"
-#: DataReport.cpp:194
+#: DataReport.cpp:211
msgid "Reactive Power (VAr)"
msgstr "Potência reativa (VAr)"
-#: DataReport.cpp:195
+#: DataReport.cpp:212
msgid "Reactive Power (kVAr)"
msgstr "Potência reativa (kVAr)"
-#: DataReport.cpp:196
+#: DataReport.cpp:213
msgid "Reactive Power (MVAr)"
msgstr "Potência reativa (MVAr)"
-#: DataReport.cpp:198
+#: DataReport.cpp:215
msgid "R (p.u.)"
msgstr "R (p.u.)"
-#: DataReport.cpp:199
+#: DataReport.cpp:216
msgid "R ("
msgstr "R ("
-#: DataReport.cpp:201
+#: DataReport.cpp:218
msgid "XL (p.u.)"
msgstr "XL (p.u.)"
-#: DataReport.cpp:202
+#: DataReport.cpp:219
msgid "XL ("
msgstr "XL ("
-#: DataReport.cpp:204
+#: DataReport.cpp:221
msgid "B (p.u.)"
msgstr "B (p.u.)"
-#: DataReport.cpp:205
+#: DataReport.cpp:222
msgid "B (S)"
msgstr "B (S)"
-#: DataReport.cpp:207
+#: DataReport.cpp:224
msgid "Current (p.u.)"
msgstr "Corrente (p.u.)"
-#: DataReport.cpp:208
+#: DataReport.cpp:225
msgid "Current (A)"
msgstr "Corrente (A)"
-#: DataReport.cpp:209
+#: DataReport.cpp:226
msgid "Current (kA)"
msgstr "Corrente (kA)"
-#: DataReport.cpp:213 DataReport.cpp:223 DataReport.cpp:235 DataReport.cpp:264
-#: DataReport.cpp:280 DataReport.cpp:298 ElementForm.cpp:40 ElementForm.cpp:409
+#: DataReport.cpp:230 DataReport.cpp:240 DataReport.cpp:252 DataReport.cpp:281
+#: DataReport.cpp:297 DataReport.cpp:315 ElementForm.cpp:40 ElementForm.cpp:409
#: ElementForm.cpp:1307 ElementForm.cpp:1620 ElementForm.cpp:2020
-#: ElementForm.cpp:2189 ElementForm.cpp:2446 TextForm.cpp:855 TextForm.cpp:866
-#: TextForm.cpp:875 TextForm.cpp:886 TextForm.cpp:897 TextForm.cpp:905
-#: TextForm.cpp:912 TextForm.cpp:919 TextForm.cpp:927
+#: ElementForm.cpp:2189 ElementForm.cpp:2446 TextForm.cpp:872 TextForm.cpp:883
+#: TextForm.cpp:892 TextForm.cpp:903 TextForm.cpp:914 TextForm.cpp:922
+#: TextForm.cpp:929 TextForm.cpp:936 TextForm.cpp:944
msgid "Name"
msgstr "Nome"
-#: DataReport.cpp:214 DataReport.cpp:236 DataReport.cpp:281
+#: DataReport.cpp:231 DataReport.cpp:253 DataReport.cpp:298
msgid "From"
msgstr "De"
-#: DataReport.cpp:215 DataReport.cpp:237 DataReport.cpp:282
+#: DataReport.cpp:232 DataReport.cpp:254 DataReport.cpp:299
msgid "To"
msgstr "Para"
-#: DataReport.cpp:220 DataReport.cpp:246 DataReport.cpp:286
+#: DataReport.cpp:237 DataReport.cpp:263 DataReport.cpp:303
msgid "Online"
msgstr "Conectado"
-#: DataReport.cpp:244
+#: DataReport.cpp:261
msgid "TAP"
msgstr "TAP"
-#: DataReport.cpp:245
+#: DataReport.cpp:262
msgid "Phase Shift"
msgstr "Defasagem"
-#: DataReport.cpp:249
+#: DataReport.cpp:266
msgid "Fault bus name"
msgstr "Nome da barra com falta"
-#: DataReport.cpp:250 DataReport.cpp:265 DataReport.cpp:283 DataReport.cpp:299
+#: DataReport.cpp:267 DataReport.cpp:282 DataReport.cpp:300 DataReport.cpp:316
msgid "Phase A"
msgstr "Fase A"
-#: DataReport.cpp:251 DataReport.cpp:266 DataReport.cpp:284 DataReport.cpp:300
+#: DataReport.cpp:268 DataReport.cpp:283 DataReport.cpp:301 DataReport.cpp:317
msgid "Phase B"
msgstr "Fase B"
-#: DataReport.cpp:252 DataReport.cpp:267 DataReport.cpp:285 DataReport.cpp:301
+#: DataReport.cpp:269 DataReport.cpp:284 DataReport.cpp:302 DataReport.cpp:318
msgid "Phase C"
msgstr "Fase C"
-#: DataReport.cpp:365 DataReport.cpp:414 DataReport.cpp:522 DataReport.cpp:573
-#: DataReport.cpp:721 DataReport.cpp:825
+#: DataReport.cpp:382 DataReport.cpp:431 DataReport.cpp:539 DataReport.cpp:590
+#: DataReport.cpp:738 DataReport.cpp:842
msgid "Yes"
msgstr "Sim"
-#: DataReport.cpp:368 DataReport.cpp:417 DataReport.cpp:525 DataReport.cpp:576
-#: DataReport.cpp:724 DataReport.cpp:828
+#: DataReport.cpp:385 DataReport.cpp:434 DataReport.cpp:542 DataReport.cpp:593
+#: DataReport.cpp:741 DataReport.cpp:845
msgid "No"
msgstr "Não"
-#: DataReport.cpp:486
+#: DataReport.cpp:503
msgid "Slack"
msgstr "Referência"
-#: DataReport.cpp:489
+#: DataReport.cpp:506
msgid "PV"
msgstr "PV"
-#: DataReport.cpp:492
+#: DataReport.cpp:509
msgid "PQ"
msgstr "PQ"
@@ -901,32 +909,36 @@ msgstr "Geradores"
msgid "Data report"
msgstr "Relatório de dados"
-#: Electromechanical.cpp:26
+#: Electromechanical.cpp:44
msgid "Running simulation"
msgstr "Simulação em andamento"
-#: Electromechanical.cpp:33
+#: Electromechanical.cpp:51
msgid "It was not possible to build the admittance matrix."
msgstr "Não foi possível construir a matriz admitância."
-#: Electromechanical.cpp:74
+#: Electromechanical.cpp:92
#, c-format
msgid "Simulation cancelled at %.2fs."
msgstr "Simulação cancelada em %.2fs."
-#: Electromechanical.cpp:564
-msgid "Error on initializate the AVR of \""
-msgstr "Erro ao inicializar o AVR de \""
+#: Electromechanical.cpp:507
+msgid "Error on initializate the saturation values of \""
+msgstr "Erro ao inicializar os valores de saturação de \""
-#: Electromechanical.cpp:564 Electromechanical.cpp:574
+#: Electromechanical.cpp:507
msgid "\"."
msgstr "\"."
-#: Electromechanical.cpp:574
+#: Electromechanical.cpp:608
+msgid "Error on initializate the AVR of \""
+msgstr "Erro ao inicializar o AVR de \""
+
+#: Electromechanical.cpp:625
msgid "Error on initializate the speed governor of \""
msgstr "Erro ao inicializar o regulador de velocidade de \""
-#: Electromechanical.cpp:820
+#: Electromechanical.cpp:881
msgid ""
"Impossible to solve the synchronous generators.\n"
"Check the system parameters and/or decrease the time step."
@@ -934,15 +946,20 @@ msgstr ""
"Impossível de solucionar os geradores síncronos.\n"
"Verifique os parâmetros do sistema e/ou diminua o passo de integração."
-#: Electromechanical.h:47
+#: Electromechanical.cpp:1232
+msgid ""
+"It was not possible to solve the saturation of the synchronous machine \""
+msgstr "Não foi possível solucionar a saturação da máquina síncrona \""
+
+#: Electromechanical.h:103
msgid "Unknown error"
msgstr "Erro desconhecido"
-#: Element.cpp:230 MainFrameBase.cpp:148
+#: Element.cpp:250 MainFrameBase.cpp:148
msgid "Rotate clockwise"
msgstr "Girar no sentido horário"
-#: Element.cpp:234
+#: Element.cpp:254
msgid "Rotate counter-clockwise"
msgstr "Girar no sentido anti-horário"
@@ -978,8 +995,8 @@ msgstr "Resistência da falta (R)"
#: ElementForm.cpp:320 ElementForm.cpp:852 ElementForm.cpp:909
#: ElementForm.cpp:932 ElementForm.cpp:955 ElementForm.cpp:986
#: ElementForm.cpp:1009 ElementForm.cpp:1040 ElementForm.cpp:1063
-#: ElementForm.cpp:1140 ElementForm.cpp:1163 TextForm.cpp:958 TextForm.cpp:968
-#: TextForm.cpp:973 TextForm.cpp:981 TextForm.cpp:989
+#: ElementForm.cpp:1140 ElementForm.cpp:1163 TextForm.cpp:975 TextForm.cpp:985
+#: TextForm.cpp:990 TextForm.cpp:998 TextForm.cpp:1006
msgid "p.u."
msgstr "p.u."
@@ -1006,15 +1023,15 @@ msgid "Rated power"
msgstr "Potência nominal"
#: ElementForm.cpp:459 ElementForm.cpp:2040 ElementForm.cpp:2466
-#: IOControlForm.cpp:25 SyncGenerator.cpp:226 TextForm.cpp:867 TextForm.cpp:898
-#: TextForm.cpp:920 TextForm.cpp:928
+#: IOControlForm.cpp:42 SyncGenerator.cpp:243 TextForm.cpp:884 TextForm.cpp:915
+#: TextForm.cpp:937 TextForm.cpp:945
msgid "Active power"
msgstr "Potência ativa"
#: ElementForm.cpp:488 ElementForm.cpp:2069 ElementForm.cpp:2209
-#: ElementForm.cpp:2495 IOControlForm.cpp:30 SyncGenerator.cpp:227
-#: TextForm.cpp:868 TextForm.cpp:899 TextForm.cpp:906 TextForm.cpp:913
-#: TextForm.cpp:921 TextForm.cpp:929
+#: ElementForm.cpp:2495 IOControlForm.cpp:47 SyncGenerator.cpp:244
+#: TextForm.cpp:885 TextForm.cpp:916 TextForm.cpp:923 TextForm.cpp:930
+#: TextForm.cpp:938 TextForm.cpp:946
msgid "Reactive power"
msgstr "Potência reativa"
@@ -1266,17 +1283,17 @@ msgstr "Tipo de carga"
msgid "Switching properties"
msgstr "Propriedades de chaveamento"
-#: ElementForm.cpp:2327 SwitchingForm.cpp:23 SwitchingForm.cpp:36
-#: SwitchingForm.cpp:52
+#: ElementForm.cpp:2327 SwitchingForm.cpp:40 SwitchingForm.cpp:53
+#: SwitchingForm.cpp:69
msgid "Insert"
msgstr "Inserir"
-#: ElementForm.cpp:2328 ElementForm.cpp:2344 SwitchingForm.cpp:23
-#: SwitchingForm.cpp:36
+#: ElementForm.cpp:2328 ElementForm.cpp:2344 SwitchingForm.cpp:40
+#: SwitchingForm.cpp:53
msgid "Remove"
msgstr "Remover"
-#: ElementForm.cpp:2332 SwitchingForm.cpp:7 SwitchingForm.cpp:16
+#: ElementForm.cpp:2332 SwitchingForm.cpp:24 SwitchingForm.cpp:33
msgid "Time (s)"
msgstr "Tempo (s)"
@@ -1364,7 +1381,7 @@ msgstr "Valor da constante"
msgid "Gain value"
msgstr "Valor do ganho"
-#: ElementForm.h:242 SyncGenerator.cpp:49
+#: ElementForm.h:242 SyncGenerator.cpp:66
msgid "Generator"
msgstr "Gerador"
@@ -1380,7 +1397,7 @@ msgstr "Elemento shunt reativo"
msgid "Motor"
msgstr "Motor"
-#: ElementForm.h:770 Text.h:87
+#: ElementForm.h:770 Text.h:110
msgid "Text"
msgstr "Texto"
@@ -1392,55 +1409,55 @@ msgstr "Função transferência"
msgid "Input / Output"
msgstr "Entrada / Saída"
-#: ExponentialForm.cpp:39
+#: ExponentialForm.cpp:56
msgid "Value entered incorrectly in the field \"A value\"."
msgstr "Valor inserido incorretamente no campo \"Valor A\"."
-#: ExponentialForm.cpp:42
+#: ExponentialForm.cpp:59
msgid "Value entered incorrectly in the field \"B value\"."
msgstr "Valor inserido incorretamente no campo \"Valor B\"."
-#: Fault.cpp:14
+#: Fault.cpp:31
msgid "There is no buses in the system."
msgstr "Não há barramentos no sistema."
-#: Fault.cpp:28 Fault.cpp:390
+#: Fault.cpp:45 Fault.cpp:407
msgid "Fail to invert the positive sequence admittance matrix."
msgstr "Falha ao inverter a matriz admitância de sequência positiva."
-#: Fault.cpp:32
+#: Fault.cpp:49
msgid "Fail to invert the negative sequence admittance matrix."
msgstr "Falha ao inverter a matriz admitância de sequência negativa."
-#: Fault.cpp:36
+#: Fault.cpp:53
msgid "Fail to invert the zero sequence admittance matrix."
msgstr "Falha ao inverter a matriz admitância de sequência zero."
-#: Fault.cpp:62
+#: Fault.cpp:79
msgid "There is no fault in the system."
msgstr "Não há faltas no sistema."
-#: GainForm.cpp:24
+#: GainForm.cpp:41
msgid "Value entered incorrectly in the field \"Gain value\"."
msgstr "Valor inserido incorretamente no campo \"Valor do ganho\"."
-#: GeneralPropertiesForm.cpp:12
+#: GeneralPropertiesForm.cpp:29
msgid "English"
msgstr "English"
-#: GeneralPropertiesForm.cpp:13
+#: GeneralPropertiesForm.cpp:30
msgid "Portuguese"
msgstr "Português"
-#: GeneralPropertiesForm.cpp:15
+#: GeneralPropertiesForm.cpp:32
msgid "Light"
msgstr "Claro"
-#: GeneralPropertiesForm.cpp:16
+#: GeneralPropertiesForm.cpp:33
msgid "Dark"
msgstr "Escuro"
-#: GeneralPropertiesForm.cpp:56
+#: GeneralPropertiesForm.cpp:73
msgid ""
"It was not possible to access the init file.\n"
"The settings won't be applied."
@@ -1448,41 +1465,41 @@ msgstr ""
"Não foi possível acessar o arquivo de inicialização.\n"
"As configurações não serão aplicadas."
-#: GeneralPropertiesForm.cpp:95
+#: GeneralPropertiesForm.cpp:112
msgid "The application must be restarted to settings changes be applied."
msgstr "O programa deve ser reiniciado para as mudanças surtirem efeito."
-#: GeneratorStabForm.cpp:83
+#: GeneratorStabForm.cpp:105
msgid "Synchronous generator: Switching"
msgstr "Gerador síncrono: Chaveameto"
-#: GeneratorStabForm.cpp:96
+#: GeneratorStabForm.cpp:118
msgid "Value entered incorrectly in the field \"Inertia\"."
msgstr "Valor inserido incorretamente no campo \"Inércia\"."
-#: GeneratorStabForm.cpp:100
+#: GeneratorStabForm.cpp:122
msgid "Value entered incorrectly in the field \"Damping factor\"."
msgstr "Valor inserido incorretamente no campo \"Fator de amortecimento\"."
-#: GeneratorStabForm.cpp:107
+#: GeneratorStabForm.cpp:129
msgid "Value entered incorrectly in the field \"Armature resistance\"."
msgstr "Valor inserido incorretamente no campo \"Resistência de armadura\"."
-#: GeneratorStabForm.cpp:111
+#: GeneratorStabForm.cpp:133
msgid "Value entered incorrectly in the field \"Potier reactance\"."
msgstr "Valor inserido incorretamente no campo \"Reatância de Potier\"."
-#: GeneratorStabForm.cpp:115
+#: GeneratorStabForm.cpp:137
msgid "Value entered incorrectly in the field \"Saturation factor\"."
msgstr "Valor inserido incorretamente no campo \"Fator de aceleração\"."
-#: GeneratorStabForm.cpp:120
+#: GeneratorStabForm.cpp:142
msgid ""
"Value entered incorrectly in the field \"Synchronous direct-axis reactance\"."
msgstr ""
"Valor inserido incorretamente no campo \"Reatância síncrona de eixo direto\"."
-#: GeneratorStabForm.cpp:125
+#: GeneratorStabForm.cpp:147
msgid ""
"Value entered incorrectly in the field \"Synchronous quadrature-axis "
"reactance\"."
@@ -1490,14 +1507,14 @@ msgstr ""
"Valor inserido incorretamente no campo \"Reatância síncrona de eixo em "
"quadratura\"."
-#: GeneratorStabForm.cpp:130
+#: GeneratorStabForm.cpp:152
msgid ""
"Value entered incorrectly in the field \"Transitory direct-axis reactance\"."
msgstr ""
"Valor inserido incorretamente no campo \"Reatância transitória de eixo direto"
"\"."
-#: GeneratorStabForm.cpp:135
+#: GeneratorStabForm.cpp:157
msgid ""
"Value entered incorrectly in the field \"Transitory quadrature-axis reactance"
"\"."
@@ -1505,7 +1522,7 @@ msgstr ""
"Valor inserido incorretamente no campo \"Reatância transitória de eixo em "
"quadratura\"."
-#: GeneratorStabForm.cpp:140
+#: GeneratorStabForm.cpp:162
msgid ""
"Value entered incorrectly in the field \"Transitory direct-axis time constant"
"\"."
@@ -1513,7 +1530,7 @@ msgstr ""
"Valor inserido incorretamente no campo \"Constante de tempo transitória de "
"eixo direto\"."
-#: GeneratorStabForm.cpp:145
+#: GeneratorStabForm.cpp:167
msgid ""
"Value entered incorrectly in the field \"Transitory quadrature-axis time "
"constant\"."
@@ -1521,7 +1538,7 @@ msgstr ""
"Valor inserido incorretamente no campo \"Constante de tempo transitória de "
"eixo em quadratura\"."
-#: GeneratorStabForm.cpp:150
+#: GeneratorStabForm.cpp:172
msgid ""
"Value entered incorrectly in the field \"Subtransitory direct-axis reactance"
"\"."
@@ -1529,7 +1546,7 @@ msgstr ""
"Valor inserido incorretamente no campo \"Reatância subtransitória de eixo "
"direto\"."
-#: GeneratorStabForm.cpp:155
+#: GeneratorStabForm.cpp:177
msgid ""
"Value entered incorrectly in the field \"Subtransitory quadrature-axis "
"reactance\"."
@@ -1537,7 +1554,7 @@ msgstr ""
"Valor inserido incorretamente no campo \"Reatância subtransitória de eixo em "
"quadratura\"."
-#: GeneratorStabForm.cpp:160
+#: GeneratorStabForm.cpp:182
msgid ""
"Value entered incorrectly in the field \"Subtransitory direct-axis time "
"constant\"."
@@ -1545,7 +1562,7 @@ msgstr ""
"Valor inserido incorretamente no campo \"Constante de tempo subtransitória "
"de eixo direto\"."
-#: GeneratorStabForm.cpp:165
+#: GeneratorStabForm.cpp:187
msgid ""
"Value entered incorrectly in the field \"Subtransitory quadrature-axis time "
"constant\"."
@@ -1553,47 +1570,67 @@ msgstr ""
"Valor inserido incorretamente no campo \"Constante de tempo subtransitória "
"de eixo em quadratura\"."
-#: IOControl.cpp:142
+#: IOControl.cpp:161 IOControl.cpp:185
msgid "Vt"
msgstr "Vt"
-#: IOControl.cpp:150
-msgid "Pe"
-msgstr "Pe"
+#: IOControl.cpp:169 IOControl.cpp:201
+msgid "P"
+msgstr "P"
-#: IOControl.cpp:154
-msgid "Qe"
-msgstr "Qe"
+#: IOControl.cpp:173
+msgid "Q"
+msgstr "Q"
-#: IOControl.cpp:158
+#: IOControl.cpp:177
msgid "Vf"
msgstr "Vf"
-#: IOControl.cpp:162
+#: IOControl.cpp:181 IOControl.cpp:189
msgid "Pm"
msgstr "Pm"
-#: IOControlForm.cpp:15 SyncGenerator.cpp:225
+#: IOControlForm.cpp:32 SyncGenerator.cpp:242
msgid "Terminal voltage"
msgstr "Tensão terminal"
-#: IOControlForm.cpp:20
+#: IOControlForm.cpp:37
msgid "Velocity"
msgstr "Velocidade"
-#: IOControlForm.cpp:35 SyncGenerator.cpp:230
+#: IOControlForm.cpp:52 SyncGenerator.cpp:247
msgid "Field voltage"
msgstr "Tensão de campo"
-#: IOControlForm.cpp:40 SyncGenerator.cpp:228
+#: IOControlForm.cpp:57 SyncGenerator.cpp:245
msgid "Mechanical power"
msgstr "Potência mecânica"
-#: IndMotor.cpp:27
+#: IOControlForm.cpp:63
+msgid "Initial mechanical power"
+msgstr "Potência mecânica inicial"
+
+#: IOControlForm.cpp:69
+msgid "Initial terminal voltage"
+msgstr "Tensão terminal inicial"
+
+#: IOControlForm.cpp:76
+msgid "Initial velocity"
+msgstr "Velocidade Inicial"
+
+#: IOControlForm.cpp:82
+msgid "Velocity variation"
+msgstr "Variação de velocidade"
+
+#: IOControlForm.cpp:88
+msgid "Active power variation"
+msgstr "Variação de potência ativa"
+
+#: IndMotor.cpp:37
msgid "Edit induction motor"
msgstr "Editar motor de indução"
-#: IndMotor.cpp:96 Load.cpp:198 SyncGenerator.cpp:173 SyncMotor.cpp:121
+#: IndMotor.cpp:106 Load.cpp:215 SyncGenerator.cpp:190 SyncMotor.cpp:138
msgid ""
"\n"
"P = "
@@ -1601,42 +1638,42 @@ msgstr ""
"\n"
"P = "
-#: IndMotor.cpp:102 Load.cpp:204 SyncGenerator.cpp:179 SyncMotor.cpp:127
+#: IndMotor.cpp:112 Load.cpp:221 SyncGenerator.cpp:196 SyncMotor.cpp:144
msgid " W"
msgstr " W"
-#: IndMotor.cpp:105 Load.cpp:207 SyncGenerator.cpp:182 SyncMotor.cpp:130
+#: IndMotor.cpp:115 Load.cpp:224 SyncGenerator.cpp:199 SyncMotor.cpp:147
msgid " kW"
msgstr " kW"
-#: IndMotor.cpp:108 Load.cpp:210 SyncGenerator.cpp:185 SyncMotor.cpp:133
+#: IndMotor.cpp:118 Load.cpp:227 SyncGenerator.cpp:202 SyncMotor.cpp:150
msgid " MW"
msgstr " MW"
-#: IndMotorForm.cpp:69 LoadForm.cpp:84 SyncMachineForm.cpp:306
-#: SyncMachineForm.cpp:440
+#: IndMotorForm.cpp:86 LoadForm.cpp:101 SyncMachineForm.cpp:323
+#: SyncMachineForm.cpp:457
msgid "Value entered incorrectly in the field \"Active power\"."
msgstr "Valor inserido incorretamente no campo \"Potência ativa\"."
-#: IndMotorForm.cpp:87 LoadForm.cpp:102 ReactiveShuntElementForm.cpp:96
-#: ReactiveShuntElementForm.cpp:120 SyncMachineForm.cpp:324
-#: SyncMachineForm.cpp:458
+#: IndMotorForm.cpp:104 LoadForm.cpp:119 ReactiveShuntElementForm.cpp:113
+#: ReactiveShuntElementForm.cpp:137 SyncMachineForm.cpp:341
+#: SyncMachineForm.cpp:475
msgid "Value entered incorrectly in the field \"Reactive power\"."
msgstr "Valor inserido incorretamente no campo \"Potência reativa\"."
-#: Inductor.cpp:110
+#: Inductor.cpp:127
msgid "Edit Inductor"
msgstr "Editar indutor"
-#: LimiterForm.cpp:27 RateLimiterForm.cpp:22
+#: LimiterForm.cpp:44 RateLimiterForm.cpp:39
msgid "Value entered incorrectly in the field \"Upper limit\"."
msgstr "Valor inserido incorretamente no campo \"Limite superior\"."
-#: LimiterForm.cpp:30 RateLimiterForm.cpp:25
+#: LimiterForm.cpp:47 RateLimiterForm.cpp:42
msgid "Value entered incorrectly in the field \"Lower limit\"."
msgstr "Valor inserido incorretamente no campo \"Limite inferior\"."
-#: Line.cpp:149 Line.cpp:375
+#: Line.cpp:166 Line.cpp:395
msgid ""
"Unable to connect two buses with different nominal voltages.\n"
"Use a transformer or edit the bus properties."
@@ -1644,19 +1681,19 @@ msgstr ""
"Não é possível conectar duas barras com tensões nominais diferentes.\n"
"Utilize um transformador ou edite as propriedades do barramento."
-#: Line.cpp:274
+#: Line.cpp:294
msgid "Edit line"
msgstr "Editar linha"
-#: Line.cpp:276
+#: Line.cpp:296
msgid "Insert node"
msgstr "Inserir nó"
-#: Line.cpp:280
+#: Line.cpp:300
msgid "Remove node"
msgstr "Remover nó"
-#: Line.cpp:496 Line.cpp:500 Transformer.cpp:435 Transformer.cpp:439
+#: Line.cpp:516 Line.cpp:520 Transformer.cpp:452 Transformer.cpp:456
msgid ""
"\n"
"P"
@@ -1664,7 +1701,7 @@ msgstr ""
"\n"
"P"
-#: Line.cpp:498 Line.cpp:502 Transformer.cpp:437 Transformer.cpp:441
+#: Line.cpp:518 Line.cpp:522 Transformer.cpp:454 Transformer.cpp:458
msgid ""
"\n"
"Q"
@@ -1672,44 +1709,44 @@ msgstr ""
"\n"
"Q"
-#: LineForm.cpp:123
+#: LineForm.cpp:140
msgid "Line: Switching"
msgstr "Linha: Chaveamento"
-#: LineForm.cpp:143 SyncMachineForm.cpp:291 SyncMachineForm.cpp:425
-#: TransformerForm.cpp:137
+#: LineForm.cpp:160 SyncMachineForm.cpp:308 SyncMachineForm.cpp:442
+#: TransformerForm.cpp:154
msgid "Value entered incorrectly in the field \"Nominal power\"."
msgstr "Valor inserido incorretamente no campo \"Potência nominal\"."
-#: LineForm.cpp:158 TransformerForm.cpp:152
+#: LineForm.cpp:175 TransformerForm.cpp:169
msgid "Value entered incorrectly in the field \"Resistance\"."
msgstr "Valor inserido incorretamente no campo \"Resistência\"."
-#: LineForm.cpp:173
+#: LineForm.cpp:190
msgid "Value entered incorrectly in the field \"Indutive Reactance\"."
msgstr "Valor inserido incorretamente no campo \"Reatância indutiva\"."
-#: LineForm.cpp:188
+#: LineForm.cpp:205
msgid "Value entered incorrectly in the field \"Capacitive Susceptance\"."
msgstr "Valor inserido incorretamente no campo \"Susceptância capacitiva\"."
-#: LineForm.cpp:203
+#: LineForm.cpp:220
msgid "Value entered incorrectly in the field \"Line size\"."
msgstr "Valor inserido incorretamente no campo \"Comprimento da linha\"."
-#: LineForm.cpp:209
+#: LineForm.cpp:226
msgid "Value entered incorrectly in the field \"Zero-sequence resistance\"."
msgstr ""
"Valor inserido incorretamente no campo \"Resistência de sequência zero\"."
-#: LineForm.cpp:212
+#: LineForm.cpp:229
msgid ""
"Value entered incorrectly in the field \"Zero-sequence indutive reactance\"."
msgstr ""
"Valor inserido incorretamente no campo \"Reatância indutiva de sequência zero"
"\"."
-#: LineForm.cpp:215
+#: LineForm.cpp:232
msgid ""
"Value entered incorrectly in the field \"Zero-sequence capacitive susceptance"
"\"."
@@ -1717,177 +1754,177 @@ msgstr ""
"Valor inserido incorretamente no campo \"Susceptância capacitiva de "
"sequência zero\"."
-#: Load.cpp:119
+#: Load.cpp:136
msgid "Edit Load"
msgstr "Editar Carga"
-#: LoadForm.cpp:71
+#: LoadForm.cpp:88
msgid "Load: Switching"
msgstr "Carga: Chaveamento"
-#: MainFrame.cpp:92
+#: MainFrame.cpp:49 MainFrame.cpp:291
+msgid "Open project"
+msgstr "Abrir projeto"
+
+#: MainFrame.cpp:131
msgid "&Bus\tB"
msgstr "&Barramento\tB"
-#: MainFrame.cpp:92
+#: MainFrame.cpp:131
msgid "Adds a bus at the circuit"
msgstr "Adiciona um barramento no circuito"
-#: MainFrame.cpp:95
+#: MainFrame.cpp:134
msgid "&Line\tL"
msgstr "&Linha\tL"
-#: MainFrame.cpp:95
+#: MainFrame.cpp:134
msgid "Adds a power line at the circuit"
msgstr "Adiciona uma linha no circuito"
-#: MainFrame.cpp:96
+#: MainFrame.cpp:135
msgid "&Transformer\tT"
msgstr "&Transformador\tT"
-#: MainFrame.cpp:97
+#: MainFrame.cpp:136
msgid "Adds a transformer at the circuit"
msgstr "Adiciona um transformador no circuito"
-#: MainFrame.cpp:98
+#: MainFrame.cpp:137
msgid "&Generator\tG"
msgstr "&Gerador\tG"
-#: MainFrame.cpp:99
+#: MainFrame.cpp:138
msgid "Adds a generator at the circuit"
msgstr "Adiciona um gerador no circuito"
-#: MainFrame.cpp:100
+#: MainFrame.cpp:139
msgid "&Induction motor\tI"
msgstr "&Motor de indução\tI"
-#: MainFrame.cpp:101 MainFrame.cpp:104
+#: MainFrame.cpp:140 MainFrame.cpp:143
msgid "Adds an induction motor at the circuit"
msgstr "Adiciona um motor de indução no circuito"
-#: MainFrame.cpp:103
+#: MainFrame.cpp:142
msgid "&Synchronous compensator \tK"
msgstr "&Compensador síncrono \tK"
-#: MainFrame.cpp:106
+#: MainFrame.cpp:145
msgid "&Load\tShift-L"
msgstr "&Carga\tShift-L"
-#: MainFrame.cpp:106
+#: MainFrame.cpp:145
msgid "Adds a load at the circuit"
msgstr "Adiciona uma carga no circuito"
-#: MainFrame.cpp:107
+#: MainFrame.cpp:146
msgid "&Capacitor\tShift-C"
msgstr "&Capacitor\tShift-C"
-#: MainFrame.cpp:108
+#: MainFrame.cpp:147
msgid "Adds a shunt capacitor at the circuit"
msgstr "Adiciona um capacitor shunt no circuito"
-#: MainFrame.cpp:109
+#: MainFrame.cpp:148
msgid "&Inductor\tShift-I"
msgstr "&Inductor\tShift-I"
-#: MainFrame.cpp:110
+#: MainFrame.cpp:149
msgid "Adds a shunt inductor at the circuit"
msgstr "Adiciona um indutor shunt no circuito"
-#: MainFrame.cpp:130
+#: MainFrame.cpp:169
#, c-format
msgid "New project %d"
msgstr "Novo projeto %d"
-#: MainFrame.cpp:245
+#: MainFrame.cpp:284
msgid "Open PSP file"
msgstr "Abrir arquivo do PSP"
-#: MainFrame.cpp:252
-msgid "Open project"
-msgstr "Abrir projeto"
-
-#: MainFrame.cpp:310 MainFrame.cpp:331
+#: MainFrame.cpp:349 MainFrame.cpp:370
msgid "Save PSP file"
msgstr "Salvar arquivo do PSP"
-#: MainFrame.cpp:359 Workspace.cpp:701
+#: MainFrame.cpp:398 Workspace.cpp:718
#, c-format
msgid "Bus %d"
msgstr "Barra %d"
-#: MainFrame.cpp:362 Workspace.cpp:705
+#: MainFrame.cpp:401 Workspace.cpp:722
msgid "Insert Bus: Click to insert, ESC to cancel."
msgstr "Inserir Barramento: Clique para inserir, ESC para cancelar."
-#: MainFrame.cpp:366 Workspace.cpp:718
+#: MainFrame.cpp:405 Workspace.cpp:735
#, c-format
msgid "Line %d"
msgstr "Linha %d"
-#: MainFrame.cpp:369 Workspace.cpp:722
+#: MainFrame.cpp:408 Workspace.cpp:739
msgid "Insert Line: Click on two buses, ESC to cancel."
msgstr "Inserir Linha: Clique em duas barras, ESC para cancelar."
-#: MainFrame.cpp:374 Workspace.cpp:735
+#: MainFrame.cpp:413 Workspace.cpp:752
#, c-format
msgid "Transformer %d"
msgstr "Transformador %d"
-#: MainFrame.cpp:377 Workspace.cpp:739
+#: MainFrame.cpp:416 Workspace.cpp:756
msgid "Insert Transformer: Click on two buses, ESC to cancel."
msgstr "Inserir Transformador: Clique em duas barras, ESC para cancelar."
-#: MainFrame.cpp:382 Workspace.cpp:747
+#: MainFrame.cpp:421 Workspace.cpp:764
#, c-format
msgid "Generator %d"
msgstr "Gerador %d"
-#: MainFrame.cpp:385 Workspace.cpp:751
+#: MainFrame.cpp:424 Workspace.cpp:768
msgid "Insert Generator: Click on a buses, ESC to cancel."
msgstr "Inserir Gerador: Clique em uma barra, ESC para cancelar."
-#: MainFrame.cpp:389 Workspace.cpp:712
+#: MainFrame.cpp:428 Workspace.cpp:729
#, c-format
msgid "Load %d"
msgstr "Carga %d"
-#: MainFrame.cpp:392 Workspace.cpp:716
+#: MainFrame.cpp:431 Workspace.cpp:733
msgid "Insert Load: Click on a buses, ESC to cancel."
msgstr "Inserir Carga: Clique em uma barra, ESC para cancelar."
-#: MainFrame.cpp:397 Workspace.cpp:792
+#: MainFrame.cpp:436 Workspace.cpp:809
#, c-format
msgid "Capacitor %d"
msgstr "Capacitor %d"
-#: MainFrame.cpp:400 Workspace.cpp:796
+#: MainFrame.cpp:439 Workspace.cpp:813
msgid "Insert Capacitor: Click on a buses, ESC to cancel."
msgstr "Inserir Capacitor: Clique em uma barra, ESC para cancelar."
-#: MainFrame.cpp:405 Workspace.cpp:759
+#: MainFrame.cpp:444 Workspace.cpp:776
#, c-format
msgid "Inductor %d"
msgstr "Indutor %d"
-#: MainFrame.cpp:408 Workspace.cpp:763
+#: MainFrame.cpp:447 Workspace.cpp:780
msgid "Insert Inductor: Click on a buses, ESC to cancel."
msgstr "Inserir Indutor: Clique em uma barra, ESC para cancelar."
-#: MainFrame.cpp:413 Workspace.cpp:767
+#: MainFrame.cpp:452 Workspace.cpp:784
#, c-format
msgid "Induction motor %d"
msgstr "Motor de indução %d"
-#: MainFrame.cpp:416 Workspace.cpp:771
+#: MainFrame.cpp:455 Workspace.cpp:788
msgid "Insert Induction Motor: Click on a buses, ESC to cancel."
msgstr "Inserir Motor de indução: Clique em uma barra, ESC para cancelar."
-#: MainFrame.cpp:421 Workspace.cpp:780
+#: MainFrame.cpp:460 Workspace.cpp:797
#, c-format
msgid "Synchronous condenser %d"
msgstr "Compensador síncrono %d"
-#: MainFrame.cpp:424 Workspace.cpp:784
+#: MainFrame.cpp:463 Workspace.cpp:801
msgid "Insert Synchronous Condenser: Click on a buses, ESC to cancel."
msgstr "Inserir Compensador síncrono: Clique em uma barra, ESC para cancelar."
@@ -2154,19 +2191,19 @@ msgstr "Abre um formulário para definir as configurações de simulação"
msgid "PSP-UFU"
msgstr "PSP-UFU"
-#: PowerFlow.cpp:24
+#: PowerFlow.cpp:31
msgid "No buses found on the system."
msgstr "Não foram encontradas barras no sistema."
-#: PowerFlow.cpp:173
+#: PowerFlow.cpp:180
msgid "There is no slack bus on the system."
msgstr "Não há barra de referência no sistema."
-#: PowerFlow.cpp:177
+#: PowerFlow.cpp:184
msgid "The slack bus don't have generation."
msgstr "A barra de referência não tem geração."
-#: PowerFlow.cpp:192
+#: PowerFlow.cpp:199
msgid "The maximum number of iterations was reached."
msgstr "O número máximo de iterações foi alcançado."
@@ -2251,16 +2288,16 @@ msgid "Version:"
msgstr "Versão:"
#: PropertiesForm.cpp:535
-msgid "Alpha 2017w37a"
-msgstr "Alpha 2017w37a"
+msgid "Alpha 2017w41a"
+msgstr "Alpha 2017w41a"
#: PropertiesForm.cpp:539
msgid "Home page:"
msgstr "Página Inicial"
#: PropertiesForm.cpp:543
-msgid "http://www.ndse.ufu.br/pspufu"
-msgstr "http://www.ndse.ufu.br/pspufu"
+msgid "https://thales1330.github.io/PSP/"
+msgstr "https://thales1330.github.io/PSP/"
#: PropertiesForm.h:73
msgid "General settings"
@@ -2270,363 +2307,370 @@ msgstr "Opções gerais"
msgid "Simulation settings"
msgstr "Opções de simulação"
-#: ReactiveShuntElementForm.cpp:76
+#: ReactiveShuntElementForm.cpp:93
msgid "Capacitor: Switching"
msgstr "Capacitor: Chaveamento"
-#: ReactiveShuntElementForm.cpp:80
+#: ReactiveShuntElementForm.cpp:97
msgid "Inductor: Switching"
msgstr "Indutor: Chaveamento"
-#: SimulationsSettingsForm.cpp:63
+#: SimulationsSettingsForm.cpp:80
msgid "Value entered incorrectly in the field \"Base power\"."
msgstr "Valor inserido incorretamente no campo \"Potência base\"."
-#: SimulationsSettingsForm.cpp:87
+#: SimulationsSettingsForm.cpp:104
msgid "Value entered incorrectly in the field \"Acceleration factor\"."
msgstr "Valor inserido incorretamente no campo \"Fator de aceleração\"."
-#: SimulationsSettingsForm.cpp:90
+#: SimulationsSettingsForm.cpp:107
msgid "Value entered incorrectly in the field \"Tolerance (Power flow)\"."
msgstr ""
"Valor inserido incorretamente no campo \"Tolerância (Fluxo de carga)\"."
-#: SimulationsSettingsForm.cpp:93
+#: SimulationsSettingsForm.cpp:110
msgid ""
"Value entered incorrectly in the field \"Max. iterations (Power flow)\"."
msgstr ""
"Valor inserido incorretamente no campo \"Iterações máx (Fluxo de carga)\"."
-#: SimulationsSettingsForm.cpp:102
+#: SimulationsSettingsForm.cpp:119
msgid "Value entered incorrectly in the field \"System frequency\"."
msgstr "Valor inserido incorretamente no campo \"Frequência do sistema\"."
-#: SimulationsSettingsForm.cpp:105
+#: SimulationsSettingsForm.cpp:122
msgid "Value entered incorrectly in the field \"Tolerance (Stability)\"."
msgstr "Valor inserido incorretamente no campo \"Tolerância (estabilidade)\"."
-#: SimulationsSettingsForm.cpp:108
+#: SimulationsSettingsForm.cpp:125
msgid "Value entered incorrectly in the field \"Max. iterations (Stability)\"."
msgstr ""
"Valor inserido incorretamente no campo \"Iterações máx (Estabilidade)\"."
-#: SimulationsSettingsForm.cpp:111
+#: SimulationsSettingsForm.cpp:128
msgid "Value entered incorrectly in the field \"Controls step ratio\"."
msgstr ""
"Valor inserido incorretamente no campo \"Razão do passo dos controles\"."
-#: SimulationsSettingsForm.cpp:114
+#: SimulationsSettingsForm.cpp:131
msgid "Value entered incorrectly in the field \"Plot time\"."
msgstr "Valor inserido incorretamente no campo \"Tempo de impressão\"."
-#: SumForm.cpp:43
+#: SumForm.cpp:58
msgid "You must assign at least two signals."
msgstr "Você deve atribuir pelo menos dois sinais."
-#: SumForm.cpp:58
+#: SumForm.cpp:74
msgid "Value entered incorrectly in the field \"Signs\"."
msgstr "Valor inserido incorretamente no campo \"Sinais\"."
-#: SyncGenerator.cpp:41
+#: SyncGenerator.cpp:58
msgid "Edit Generator"
msgstr "Editar Gerador"
-#: SyncGenerator.cpp:229
+#: SyncGenerator.cpp:246
msgid "Frequency"
msgstr "Frequência"
-#: SyncGenerator.cpp:231
+#: SyncGenerator.cpp:248
msgid "Delta"
msgstr "Delta"
-#: SyncMachineForm.cpp:344 SyncMachineForm.cpp:478
+#: SyncMachineForm.cpp:361 SyncMachineForm.cpp:495
msgid "Value entered incorrectly in the field \"Max reactive power\"."
msgstr "Valor inserido incorretamente no campo \"Potência reativa máx\"."
-#: SyncMachineForm.cpp:365 SyncMachineForm.cpp:499
+#: SyncMachineForm.cpp:382 SyncMachineForm.cpp:516
msgid "Value entered incorrectly in the field \"Min reactive power\"."
msgstr "Valor inserido incorretamente no campo \"Potência reativa min\"."
-#: SyncMachineForm.cpp:386 SyncMachineForm.cpp:520
+#: SyncMachineForm.cpp:403 SyncMachineForm.cpp:537
msgid "Value entered incorrectly in the field \"Positive resistance\"."
msgstr "Valor inserido incorretamente no campo \"Resistência positiva\"."
-#: SyncMachineForm.cpp:390 SyncMachineForm.cpp:524
+#: SyncMachineForm.cpp:407 SyncMachineForm.cpp:541
msgid "Value entered incorrectly in the field \"Positive reactance\"."
msgstr "Valor inserido incorretamente no campo \"Reatância positiva\"."
-#: SyncMachineForm.cpp:394 SyncMachineForm.cpp:528
+#: SyncMachineForm.cpp:411 SyncMachineForm.cpp:545
msgid "Value entered incorrectly in the field \"Negative resistance\"."
msgstr "Valor inserido incorretamente no campo \"Resistência negativa\"."
-#: SyncMachineForm.cpp:398 SyncMachineForm.cpp:532
+#: SyncMachineForm.cpp:415 SyncMachineForm.cpp:549
msgid "Value entered incorrectly in the field \"Negative reactance\"."
msgstr "Valor inserido incorretamente no campo \"Reatância negativa\"."
-#: SyncMachineForm.cpp:402 SyncMachineForm.cpp:536
+#: SyncMachineForm.cpp:419 SyncMachineForm.cpp:553
msgid "Value entered incorrectly in the field \"Zero resistance\"."
msgstr "Valor inserido incorretamente no campo \"Resistência zero\"."
-#: SyncMachineForm.cpp:406 SyncMachineForm.cpp:540
+#: SyncMachineForm.cpp:423 SyncMachineForm.cpp:557
msgid "Value entered incorrectly in the field \"Zero reactance\"."
msgstr "Valor inserido incorretamente no campo \"Reatância zero\"."
-#: SyncMachineForm.cpp:410 SyncMachineForm.cpp:544
+#: SyncMachineForm.cpp:427 SyncMachineForm.cpp:561
msgid "Value entered incorrectly in the field \"Ground resistance\"."
msgstr "Valor inserido incorretamente no campo \"Resistência de aterramento\"."
-#: SyncMachineForm.cpp:414 SyncMachineForm.cpp:548
+#: SyncMachineForm.cpp:431 SyncMachineForm.cpp:565
msgid "Value entered incorrectly in the field \"Ground reactance\"."
msgstr "Valor inserido incorretamente no campo \"Reatância de aterramento\"."
-#: SyncMotor.cpp:10
+#: SyncMotor.cpp:27
msgid "Edit Synchronous Condenser"
msgstr "Editar Compensador Síncrono"
-#: SyncMotor.cpp:19
+#: SyncMotor.cpp:36
msgid "Synchronous Condenser"
msgstr "Compensador síncrono"
-#: TextForm.cpp:858 TextForm.cpp:869 TextForm.cpp:880 TextForm.cpp:891
+#: TextForm.cpp:875 TextForm.cpp:886 TextForm.cpp:897 TextForm.cpp:908
msgid "Fault current"
msgstr "Corrente de falta"
-#: TextForm.cpp:859
+#: TextForm.cpp:876
msgid "Fault voltage"
msgstr "Tensão de falta"
-#: TextForm.cpp:860
+#: TextForm.cpp:877
msgid "Short-circuit power"
msgstr "Nível de curto-circuito"
-#: TextForm.cpp:876 TextForm.cpp:887
+#: TextForm.cpp:893 TextForm.cpp:904
msgid "Active power flow"
msgstr "Fluxo de potência ativa"
-#: TextForm.cpp:877 TextForm.cpp:888
+#: TextForm.cpp:894 TextForm.cpp:905
msgid "Reactive power flow"
msgstr "Fluxo de potência reativa"
-#: TextForm.cpp:878 TextForm.cpp:889
+#: TextForm.cpp:895 TextForm.cpp:906
msgid "Losses"
msgstr "Perdas"
-#: TextForm.cpp:879 TextForm.cpp:890
+#: TextForm.cpp:896 TextForm.cpp:907
msgid "Current"
msgstr "Corrente"
-#: TextForm.cpp:963
+#: TextForm.cpp:980
msgid "Degrees"
msgstr "Graus"
-#: TextForm.cpp:964
+#: TextForm.cpp:981
msgid "Radians"
msgstr "Radianos"
-#: TextForm.cpp:969
+#: TextForm.cpp:986
msgid "A"
msgstr "A"
-#: TextForm.cpp:970
+#: TextForm.cpp:987
msgid "kA"
msgstr "kA"
-#: TextForm.cpp:974
+#: TextForm.cpp:991
msgid "VA"
msgstr "VA"
-#: TextForm.cpp:975
+#: TextForm.cpp:992
msgid "kVA"
msgstr "kVA"
-#: TextForm.cpp:976
+#: TextForm.cpp:993
msgid "MVA"
msgstr "MVA"
-#: TextForm.cpp:982
+#: TextForm.cpp:999
msgid "W"
msgstr "W"
-#: TextForm.cpp:983
+#: TextForm.cpp:1000
msgid "kW"
msgstr "kW"
-#: TextForm.cpp:984
+#: TextForm.cpp:1001
msgid "MW"
msgstr "MW"
-#: TextForm.cpp:990
+#: TextForm.cpp:1007
msgid "VAr"
msgstr "VAr"
-#: TextForm.cpp:991
+#: TextForm.cpp:1008
msgid "kVAr"
msgstr "kVAr"
-#: TextForm.cpp:992
+#: TextForm.cpp:1009
msgid "MVAr"
msgstr "MVAr"
-#: TextForm.cpp:1207
+#: TextForm.cpp:1224
msgid "There are blank fields."
msgstr "Existem campos em branco."
-#: TransferFunctionForm.cpp:57
+#: TransferFunctionForm.cpp:74
msgid "Value entered incorrectly in the field \"Numerator parameters\"."
msgstr "Valor inserido incorretamente no campo \"Parâmetros do numerador\"."
-#: TransferFunctionForm.cpp:70
+#: TransferFunctionForm.cpp:87
msgid "Value entered incorrectly in the field \"Denominator parameters\"."
msgstr "Valor inserido incorretamente no campo \"Parâmetros do denominador\"."
-#: Transformer.cpp:258
+#: Transformer.cpp:275
msgid "Edit tranformer"
msgstr "Editar Transformador"
-#: TransformerForm.cpp:11
+#: TransformerForm.cpp:28
msgid "Grounded Wye - Grounded Wye"
msgstr "Estrela aterrado - Estrela aterrado"
-#: TransformerForm.cpp:12
+#: TransformerForm.cpp:29
msgid "Wye - Grounded Wye"
msgstr "Estrela - Estrela aterrado"
-#: TransformerForm.cpp:13
+#: TransformerForm.cpp:30
msgid "Grounded Wye - Wye"
msgstr "Estrela aterrado - Estrela"
-#: TransformerForm.cpp:14
+#: TransformerForm.cpp:31
msgid "Wye - Wye"
msgstr "Estrela - Estrela"
-#: TransformerForm.cpp:15
+#: TransformerForm.cpp:32
msgid "Delta - Grounded Wye"
msgstr "Delta - Estrela aterrado"
-#: TransformerForm.cpp:16
+#: TransformerForm.cpp:33
msgid "Delta - Wye"
msgstr "Delta - Estrela"
-#: TransformerForm.cpp:17
+#: TransformerForm.cpp:34
msgid "Grounded Wye - Delta"
msgstr "Estrela aterrado - Delta"
-#: TransformerForm.cpp:18
+#: TransformerForm.cpp:35
msgid "Wye - Delta"
msgstr "Estrela - Delta"
-#: TransformerForm.cpp:19
+#: TransformerForm.cpp:36
msgid "Delta - Delta"
msgstr "Delta - Delta"
-#: TransformerForm.cpp:123
+#: TransformerForm.cpp:140
msgid "Transfomer: Switching"
msgstr "Transformador: Chaveamento"
-#: TransformerForm.cpp:164
+#: TransformerForm.cpp:181
msgid "Value entered incorrectly in the field \"Indutive reactance\"."
msgstr "Valor inserido incorretamente no campo \"Reatância indutiva\"."
-#: TransformerForm.cpp:206
+#: TransformerForm.cpp:223
msgid "Value entered incorrectly in the field \"Turns ratio\"."
msgstr "Valor inserido incorretamente no campo \"TAP\"."
-#: TransformerForm.cpp:210
+#: TransformerForm.cpp:227
msgid "Value entered incorrectly in the field \"Phase shift\"."
msgstr "Valor inserido incorretamente no campo \"Defasagem\"."
-#: TransformerForm.cpp:216
+#: TransformerForm.cpp:233
msgid "Value entered incorrectly in the field \"Zero sequence resistance\"."
msgstr ""
"Valor inserido incorretamente no campo \"Resistência de sequência zero\"."
-#: TransformerForm.cpp:221
+#: TransformerForm.cpp:238
msgid ""
"Value entered incorrectly in the field \"Zero sequence indutive reactance\"."
msgstr ""
"Valor inserido incorretamente no campo \"Reatância indutiva de sequência zero"
"\"."
-#: TransformerForm.cpp:225
+#: TransformerForm.cpp:242
msgid "Value entered incorrectly in the field \"Primary ground resistance\"."
msgstr ""
"Valor inserido incorretamente no campo \"Resistência de aterramento do "
"primário\"."
-#: TransformerForm.cpp:229
+#: TransformerForm.cpp:246
msgid "Value entered incorrectly in the field \"Primary ground reactance\"."
msgstr ""
"Valor inserido incorretamente no campo \"Reatância de aterramento do primário"
"\"."
-#: TransformerForm.cpp:233
+#: TransformerForm.cpp:250
msgid "Value entered incorrectly in the field \"Secondary ground resistance\"."
msgstr ""
"Valor inserido incorretamente no campo \"Resistência de aterramento do "
"secundário\"."
-#: TransformerForm.cpp:237
+#: TransformerForm.cpp:254
msgid "Value entered incorrectly in the field \"Secondary ground reactance\"."
msgstr ""
"Valor inserido incorretamente no campo \"Reatância de aterramento do "
"secundário\"."
-#: Workspace.cpp:283
+#: Workspace.cpp:300
msgid "Do you want to change the rated voltage of the path?"
msgstr "Você quer mudar a tensão nominal do trecho?"
-#: Workspace.cpp:284
+#: Workspace.cpp:301
msgid "Warning"
msgstr "Atenção"
-#: Workspace.cpp:684
+#: Workspace.cpp:701
msgid "Insert Text: Click to insert, ESC to cancel."
msgstr "Inserir Texto: Clique para inserir, ESC para cancelar."
-#: Workspace.cpp:823
+#: Workspace.cpp:840
msgid "MODE: DRAG"
msgstr "MODO: ARRASTAR"
-#: Workspace.cpp:828
+#: Workspace.cpp:845
msgid "MODE: PASTE"
msgstr "MODO: COLAR"
-#: Workspace.cpp:835
+#: Workspace.cpp:852
msgid "MODE: INSERT"
msgstr "MODO: INSERÇÃO"
-#: Workspace.cpp:844
+#: Workspace.cpp:861
msgid "MODE: EDIT"
msgstr "MODO: EDIÇÃO"
-#: Workspace.cpp:848
+#: Workspace.cpp:865
#, c-format
msgid "ZOOM: %d%%"
msgstr "ZOOM: %d%%"
-#: Workspace.cpp:1182 Workspace.cpp:1290
+#: Workspace.cpp:1199 Workspace.cpp:1307
msgid "It was not possible to paste from clipboard."
msgstr "Não foi possível colar da área de transferência."
-#: Workspace.cpp:1298
+#: Workspace.cpp:1315
msgid "Click to paste."
msgstr "Clique para colar."
-#: Workspace.cpp:1443
+#: Workspace.cpp:1460
msgid "Do you wish to open the stability graphics?"
msgstr "Você deseja abrir os gráficos do estudo de estabilidade"
-#: Workspace.cpp:1443
+#: Workspace.cpp:1460
msgid "Question"
msgstr "Pergunta"
-#: Workspace.cpp:1453
-msgid "Speed error"
-msgstr "Erro de velocidade"
+#~ msgid "Pe"
+#~ msgstr "Pe"
+
+#~ msgid "Qe"
+#~ msgstr "Qe"
+
+#~ msgid "http://www.ndse.ufu.br/pspufu"
+#~ msgstr "http://www.ndse.ufu.br/pspufu"
+
+#~ msgid "Speed error"
+#~ msgstr "Erro de velocidade"
-#: Workspace.cpp:1454
-msgid "Number iterations"
-msgstr "Número de iterações"
+#~ msgid "Number iterations"
+#~ msgstr "Número de iterações"
#~ msgid "Eq error"
#~ msgstr "Erro do Eq"