|
|
|
|
@ -817,14 +817,15 @@ void nmWxAutomaticFitting::setupControlPanel()
|
|
|
|
|
m_algorithmCombo->setMaximumWidth(160);
|
|
|
|
|
m_algorithmCombo->setMinimumWidth(160);
|
|
|
|
|
|
|
|
|
|
QLabel* surrogateLabel = new QLabel(tr("PSO acceleration:"));
|
|
|
|
|
m_surrogateLabel = new QLabel(tr("PSO acceleration:"));
|
|
|
|
|
m_surrogateCombo = new QComboBox();
|
|
|
|
|
//m_surrogateCombo->setEnabled(false);// 暂时不可编辑
|
|
|
|
|
m_surrogateCombo->addItem(tr("Off"));
|
|
|
|
|
m_surrogateCombo->addItem(tr("On"));
|
|
|
|
|
m_surrogateCombo->setCurrentIndex(automaticFittingData.getSurrogateScreeningEnabled() ? 1 : 0);
|
|
|
|
|
m_surrogateCombo->setMaximumWidth(160);
|
|
|
|
|
m_surrogateCombo->setMinimumWidth(160);
|
|
|
|
|
connect(m_algorithmCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(onAlgorithmChanged(int)));
|
|
|
|
|
onAlgorithmChanged(m_algorithmCombo->currentIndex());
|
|
|
|
|
|
|
|
|
|
// 迭代次数
|
|
|
|
|
QLabel* iterationLabel = new QLabel(tr("Number of iterations:"));
|
|
|
|
|
@ -876,7 +877,7 @@ void nmWxAutomaticFitting::setupControlPanel()
|
|
|
|
|
m_controlLayout->addWidget(m_algorithmCombo);
|
|
|
|
|
m_controlLayout->addSpacing(15);
|
|
|
|
|
|
|
|
|
|
m_controlLayout->addWidget(surrogateLabel);
|
|
|
|
|
m_controlLayout->addWidget(m_surrogateLabel);
|
|
|
|
|
m_controlLayout->addWidget(m_surrogateCombo);
|
|
|
|
|
m_controlLayout->addSpacing(15);
|
|
|
|
|
|
|
|
|
|
@ -895,6 +896,14 @@ void nmWxAutomaticFitting::setupControlPanel()
|
|
|
|
|
m_controlLayout->addStretch(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void nmWxAutomaticFitting::onAlgorithmChanged(int index)
|
|
|
|
|
{
|
|
|
|
|
// LM 不使用 PSO 加速;只切换可用状态,保留切回 PSO 时的原选择。
|
|
|
|
|
const bool usePSO = (index == 0);
|
|
|
|
|
m_surrogateLabel->setEnabled(usePSO);
|
|
|
|
|
m_surrogateCombo->setEnabled(usePSO);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void nmWxAutomaticFitting::setupButtons()
|
|
|
|
|
{
|
|
|
|
|
QHBoxLayout* buttonLayout = new QHBoxLayout();
|
|
|
|
|
|