From c38b5ce87edef3eed9b6388427e6a47b5181f3ad Mon Sep 17 00:00:00 2001 From: Ron Date: Mon, 9 May 2022 11:58:55 -0400 Subject: [PATCH] Re-did bug fix in NLopt loadSurveyQParameterRanges --- MSSPM_Main/nmfMainWindow.cpp | 85 +------------------ MSSPM_Main/nmfMainWindow.h | 13 --- .../NLopt_Estimator.cpp | 4 +- 3 files changed, 3 insertions(+), 99 deletions(-) diff --git a/MSSPM_Main/nmfMainWindow.cpp b/MSSPM_Main/nmfMainWindow.cpp index a386e46..3c26c4a 100755 --- a/MSSPM_Main/nmfMainWindow.cpp +++ b/MSSPM_Main/nmfMainWindow.cpp @@ -1959,7 +1959,7 @@ void nmfMainWindow::menu_about() { QString name = "Multi-Species Surplus Production Model"; - QString version = "MSSPM v1.1.0"; + QString version = "MSSPM v1.1.1"; QString specialAcknowledgement = ""; QString cppVersion = "C++??"; QString mysqlVersion = "?"; @@ -3995,7 +3995,6 @@ nmfMainWindow::menu_saveCurrentRun() OutputSurveyQTable,OutputSurveyQCovariateCoeffsTable, OutputBiomassTable); if (m_DatabasePtr->isARelativeBiomassModel(m_ProjectName,m_ModelName)) { - // RSK ??? check this for covariate coefficient logic updateObservedBiomassAndEstSurveyQTable(SpeciesList,RunLength+1, EstSurveyQ,EstSurveyQCovariateCoeffs); } @@ -4062,7 +4061,6 @@ nmfMainWindow::menu_saveCurrentRun() OutputSurveyQTable,OutputSurveyQCovariateCoeffsTable, OutputBiomassTable); if (m_DatabasePtr->isARelativeBiomassModel(m_ProjectName,m_ModelName)) { - // RSK ??? check this for covariate coefficient logic updateObservedBiomassAndEstSurveyQTable(SpeciesList,RunLength+1, EstSurveyQ,EstSurveyQCovariateCoeffs); } @@ -8897,87 +8895,6 @@ nmfMainWindow::getLegendCode(bool isAveraged, return code; } - - -/* - * RSK remove this...it's not being used - */ -void -nmfMainWindow::showObservedBiomassScatter( - const std::string &ChartTitle, - const int &StartYearForecast, - const int &NumSpecies, - const QString &OutputSpecies, - const int &SpeciesNum, - const int NumYears, - boost::numeric::ublas::matrix &ObservedBiomass, - QString &ScaleStr, - double &ScaleVal, - double &YMinSliderVal, - const bool& clearChart, - QStringList ColumnLabelsForLegend) - -{ - // - // Draw the line chart - // - bool ShowLegend = false; - QStringList RowLabelsForBars; - boost::numeric::ublas::matrix ChartScatterData; - ChartScatterData.resize(NumYears,1); - ChartScatterData.clear(); - RowLabelsForBars.clear(); - std::string value; - std::string LineStyle = "SolidLine"; - QStringList SpeciesNames; - QStringList Years; - std::string legendCode = ""; - std::string ChartType; - std::string MainTitle; - std::string XLabel; - std::string YLabel; - int Theme = 0; // Replace with checkbox values - std::vector GridLines = {true,true}; // Replace with checkbox values - QStringList HoverLabels; - - ChartType = "Line"; - MainTitle = ChartTitle + " for: " + OutputSpecies.toStdString(); - XLabel = "Year"; - YLabel = ChartTitle + " (" + ScaleStr.toStdString() + "metric tons)"; - - if (clearChart) { - m_ChartWidget->removeAllSeries(); - } - - // First show scatter - for (int species=0; speciespopulateChart(m_ChartWidget, - chartType, - nmfConstantsMSSPM::ShowFirstPoint, - ChartScatterData, - QColor(100,100,255), - {}, {}, - MainTitle, - XLabel, - YLabel, - GridLines, - 0); - - -} - - - void nmfMainWindow::showChartBiomassVsTime( const int &NumSpecies, diff --git a/MSSPM_Main/nmfMainWindow.h b/MSSPM_Main/nmfMainWindow.h index 68ab32c..c52621e 100755 --- a/MSSPM_Main/nmfMainWindow.h +++ b/MSSPM_Main/nmfMainWindow.h @@ -809,19 +809,6 @@ class nmfMainWindow : public QMainWindow void setupOutputViewerWidget(); void setOutputControlsWidth(); void setupProgressChart(); - void showObservedBiomassScatter( - const std::string &ChartTitle, - const int &StartForecastYear, - const int &NumSpecies, - const QString &OutputSpecies, - const int &SpeciesNum, - const int NumYears, - boost::numeric::ublas::matrix &ObservedBiomass, - QString &ScaleStr, - double &ScaleVal, - double &YMinSliderVal, - const bool& clearChart, - QStringList ColumnLabelsForLegend); void showChartBiomassVsTime( const int &NumSpecies, const QString &OutputSpecies, diff --git a/MSSPM_ParameterEstimationNLoptAlgorithm/NLopt_Estimator.cpp b/MSSPM_ParameterEstimationNLoptAlgorithm/NLopt_Estimator.cpp index b585273..bf867d1 100755 --- a/MSSPM_ParameterEstimationNLoptAlgorithm/NLopt_Estimator.cpp +++ b/MSSPM_ParameterEstimationNLoptAlgorithm/NLopt_Estimator.cpp @@ -251,7 +251,7 @@ NLopt_Estimator::extractParameters(const nmfStructsQt::ModelDataStruct& NLoptDat for (int i=0; i