Skip to content

Commit

Permalink
Mods for 1.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
rklasky committed Sep 21, 2022
1 parent 93961f4 commit b2478e9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions MSSPM_GuiEstimation/nmfEstimationTab01.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1094,9 +1094,11 @@ nmfEstimation_Tab1::isOkSpeciesDataSupplemental(bool showPopup)
SpeName = index.data().toString().remove(",");
index = m_SpeciesModel->index(i,7);
GrowthRateCovarCoeff = index.data().toString().remove(",");
if (GrowthRateCovarCoeff.trimmed().isEmpty()) {GrowthRateCovarCoeff = "0";} // unused table field, may remove later
cmd += "GrowthRateCovarCoeff=" + GrowthRateCovarCoeff + ",";
index = m_SpeciesModel->index(i,11);
SpeciesKCovarCoeff = index.data().toString().remove(",");
if (SpeciesKCovarCoeff.trimmed().isEmpty()) {SpeciesKCovarCoeff = "0";} // unused table field, may remove later
cmd += "SpeciesKCovarCoeff=" + SpeciesKCovarCoeff + ",";
index = m_SpeciesModel->index(i,12);
SurveyQ = index.data().toString().remove(",");
Expand Down Expand Up @@ -1280,13 +1282,13 @@ nmfEstimation_Tab1::savePopulationParameters(const bool& showPopup)
cmd += "GrowthRate=" + m_SpeciesModel->index(i, 4).data().toString().remove(",") + ",";
cmd += "GrowthRateMin=" + m_SpeciesModel->index(i, 5).data().toString().remove(",") + ",";
cmd += "GrowthRateMax=" + m_SpeciesModel->index(i, 6).data().toString().remove(",") + ",";
cmd += "GrowthRateCovarCoeff=" + m_SpeciesModel->index(i, 7).data().toString().remove(",") + ",";
cmd += "GrowthRateCovarCoeff=" + QString("0,"); // this is unused currently // m_SpeciesModel->index(i, 7).data().toString().remove(",") + ",";
cmd += "SpeciesK=" + m_SpeciesModel->index(i, 8).data().toString().remove(",") + ",";
cmd += "SpeciesKMin=" + m_SpeciesModel->index(i, 9).data().toString().remove(",") + ",";
//cmd += "SpeciesKMin=" + QString::number(SpeciesKMin.toDouble(),'f',6) + ",";
cmd += "SpeciesKMax=" + m_SpeciesModel->index(i,10).data().toString().remove(",") + ",";
//cmd += "SpeciesKMax=" + QString::number(SpeciesKMax.toDouble(),'f',6);
cmd += "SpeciesKCovarCoeff=" + m_SpeciesModel->index(i,11).data().toString().remove(",") + ",";
cmd += "SpeciesKCovarCoeff=" + QString("0,"); // this is unused currently // m_SpeciesModel->index(i,11).data().toString().remove(",") + ",";
cmd += "SurveyQ=" + m_SpeciesModel->index(i,12).data().toString().remove(",") + ",";
cmd += "SurveyQMin=" + m_SpeciesModel->index(i,13).data().toString().remove(",") + ",";
cmd += "SurveyQMax=" + m_SpeciesModel->index(i,14).data().toString().remove(",") + ",";
Expand Down
2 changes: 1 addition & 1 deletion MSSPM_GuiEstimation/nmfEstimationTab02.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ nmfEstimation_Tab2::loadTable(QTableView* tableView,
for (int i=0; i<=RunLength; ++i) {
if ((m < NumRecords) && (SpeciesList[j].toStdString() == dataMap["SpeName"][m])) {
valueWithComma = nmfUtilsQt::checkAndCalculateWithSignificantDigits(
std::stod(dataMap["Value"][m++]),m_NumSignificantDigits,2);
std::stod(dataMap["Value"][m++]),m_NumSignificantDigits,6);
item = new QStandardItem(valueWithComma);
} else {
item = new QStandardItem(QString(""));
Expand Down
2 changes: 2 additions & 0 deletions MSSPM_GuiSetup/nmfSetupTab03.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1169,12 +1169,14 @@ nmfSetup_Tab3::callback_ImportPB()
QString speciesFilename = "";
QStringList guildsList = {};

QMessageBox::information(Setup_Tabs,"Import","\nSelect Guild CSV file to import first.\n",QMessageBox::Ok);
importOK = importGuilds(guildsList,guildsFilename);
if (importOK) {
emit LoadGuildSupplemental(nmfConstantsMSSPM::Dont_Query_User_For_Filename,
guildsFilename);
}

QMessageBox::information(Setup_Tabs,"Import","\nSelect Species CSV file to import next.\n",QMessageBox::Ok);
importOK = importSpecies(guildsList,speciesFilename);
if (importOK) {
emit LoadSpeciesSupplemental(nmfConstantsMSSPM::DontUpdateSetup,
Expand Down
4 changes: 2 additions & 2 deletions MSSPM_ParameterEstimationNLoptAlgorithm/NLopt_Estimator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -938,8 +938,8 @@ std::cout << "*** NumEstParam: " << NumEstParameters << std::endl;
}

// Initialize the optimizer with the appropriate algorithm
std::cout << "LOADING: " << NLoptStruct.MinimizerAlgorithm
<< " with " << m_MinimizerToEnum[NLoptStruct.MinimizerAlgorithm] << std::endl;
//std::cout << "LOADING: " << NLoptStruct.MinimizerAlgorithm
// << " with " << m_MinimizerToEnum[NLoptStruct.MinimizerAlgorithm] << std::endl;
m_Optimizer = nlopt::opt(m_MinimizerToEnum[NLoptStruct.MinimizerAlgorithm],NumEstParameters);
setAdditionalParameters(NLoptStruct);

Expand Down

0 comments on commit b2478e9

Please sign in to comment.