From db3fadbcc9f396ca22c4578101bbcd0a7e81609e Mon Sep 17 00:00:00 2001 From: Thales Lima Oliveira Date: Wed, 16 Jan 2019 09:35:35 -0200 Subject: Stability and site updates --- Project/Electromechanical.cpp | 9 +- Project/icons.svg | 4153 +++++++++++++++++++++++++++++++++++++++++ Project/main.cpp | 7 +- 3 files changed, 4160 insertions(+), 9 deletions(-) create mode 100644 Project/icons.svg (limited to 'Project') diff --git a/Project/Electromechanical.cpp b/Project/Electromechanical.cpp index de30184..50ce4e5 100644 --- a/Project/Electromechanical.cpp +++ b/Project/Electromechanical.cpp @@ -235,11 +235,8 @@ void Electromechanical::SetEvent(double currentTime) Bus* parentBus = static_cast(load->GetParentList()[0]); int n = parentBus->GetElectricalData().number; std::complex v = parentBus->GetElectricalData().voltage; -<<<<<<< HEAD - m_yBus[n][n] -= std::complex(data.activePower, -data.reactivePower) / (abs(v) * abs(v)); -======= m_yBus[n][n] -= std::complex(data.activePower, -data.reactivePower) / (std::abs(v) * std::abs(v)); ->>>>>>> aad89bf4d16d45c0790bd2fc010d9ec06cc35430 + } // Insert load (only disconnected load) @@ -249,11 +246,7 @@ void Electromechanical::SetEvent(double currentTime) Bus* parentBus = static_cast(load->GetParentList()[0]); int n = parentBus->GetElectricalData().number; std::complex v = parentBus->GetElectricalData().voltage; -<<<<<<< HEAD - m_yBus[n][n] += std::complex(data.activePower, -data.reactivePower) / (abs(v) * abs(v)); -======= m_yBus[n][n] += std::complex(data.activePower, -data.reactivePower) / (std::abs(v) * std::abs(v)); ->>>>>>> aad89bf4d16d45c0790bd2fc010d9ec06cc35430 } } } diff --git a/Project/icons.svg b/Project/icons.svg new file mode 100644 index 0000000..41fa813 --- /dev/null +++ b/Project/icons.svg @@ -0,0 +1,4153 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 100 MVA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Project/main.cpp b/Project/main.cpp index 61b7fc2..718dd06 100644 --- a/Project/main.cpp +++ b/Project/main.cpp @@ -17,6 +17,8 @@ class MainApp : public wxApp virtual ~MainApp() {} bool LoadInitFile(PropertiesData* propertiesData) { + // Load configuration file, if don't exists create it. + // Find the executable location path. wxFileName fn(wxStandardPaths::Get().GetExecutablePath()); wxTextFile file(fn.GetPath() + wxFileName::GetPathSeparator() + "config.ini"); auto data = propertiesData->GetGeneralPropertiesData(); @@ -77,6 +79,7 @@ class MainApp : public wxApp void LoadCatalogs(wxLocale* locale, PropertiesData* propertiesData) { + // Load language catalogs according the propertiesData attribute. if(!locale->Init(propertiesData->GetGeneralPropertiesData().language, wxLOCALE_DONT_LOAD_DEFAULT)) { wxMessageDialog msgDialog(NULL, _("This language is not supported by the system."), _("Error"), wxOK | wxCENTRE | wxICON_ERROR); @@ -109,7 +112,8 @@ class MainApp : public wxApp LoadCatalogs(locale, propertiesData); wxString openFilePath = ""; - + + // Load command line attributes. This is used to directly open saved files (.psp). wxCmdLineParser cmdLineParser(wxApp::argc, wxApp::argv); cmdLineParser.AddParam("", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL); if(cmdLineParser.Parse() == 0) { @@ -120,6 +124,7 @@ class MainApp : public wxApp } MainFrame* mainFrame = new MainFrame(NULL, locale, propertiesData, openFilePath); #ifdef __WXMSW__ + //Set application icon for windows mainFrame->SetIcon(wxICON(aaaaprogicon)); #endif SetTopWindow(mainFrame); -- cgit