16 #include "Fit/Adapter/GSLLevenbergMarquardtMinimizer.h"
17 #include "Fit/Adapter/GSLMultiMinimizer.h"
18 #include "Fit/Adapter/GeneticMinimizer.h"
19 #include "Fit/Adapter/Minuit2Minimizer.h"
20 #include "Fit/Adapter/SimAnMinimizer.h"
22 #include "Sim/Fitting/ObjectiveMetric.h"
23 #include "Sim/Fitting/ObjectiveMetricUtils.h"
52 static const GroupInfo minimizerLibraryGroup = createMinimizerLibraryGroup();
56 for (
auto&
item : ObjectiveMetricUtils::metricNames())
57 metric_combo << QString::fromStdString(
item);
58 metric_combo.
setValue(QString::fromStdString(ObjectiveMetricUtils::defaultMetricName()));
60 ->
setToolTip(
"Objective metric to use for estimating distance between simulated and "
61 "experimental data.");
64 for (
auto&
item : ObjectiveMetricUtils::normNames())
65 norm_combo << QString::fromStdString(
item);
66 norm_combo.
setValue(QString::fromStdString(ObjectiveMetricUtils::defaultNormName()));
68 ->
setToolTip(
"Normalization to use for estimating distance between simulated and "
69 "experimental data.");
89 return groupItem<MinimizerItem>(
P_MINIMIZERS).createMinimizer();
96 return ObjectiveMetricUtils::createMetric(metric.toStdString(), norm.toStdString());
107 ->
setToolTip(
"Minimization strategy (0-low, 1-medium, 2-high quality)");
110 ->
setToolTip(
"Error definition factor for parameter error calculation");
126 auto* domainMinimizer =
new Minuit2Minimizer(algorithmName.toStdString());
133 return std::unique_ptr<IMinimizer>(domainMinimizer);
161 auto* domainMinimizer =
new GSLMultiMinimizer(algorithmName.toStdString());
163 return std::unique_ptr<IMinimizer>(domainMinimizer);
187 auto* domainMinimizer =
new GeneticMinimizer();
192 return std::unique_ptr<IMinimizer>(domainMinimizer);
221 auto* domainMinimizer =
new SimAnMinimizer();
229 return std::unique_ptr<IMinimizer>(domainMinimizer);
256 auto* domainMinimizer =
new GSLLevenbergMarquardtMinimizer();
259 return std::unique_ptr<IMinimizer>(domainMinimizer);
Defines MinimizerItemCatalog class.
Defines MinimizerItem class.
QList< std::variant< DoubleDescriptor, UIntDescriptor, SelectionDescriptor< QString > >> ValueDescriptors
Custom property to define list of string values with multiple selections. Intended for QVariant.
QVariant variant() const
Constructs variant enclosing given ComboProperty.
void setValue(const QString &name)
Describes properties of a double value which are necessary to allow GUI representation,...
std::unique_ptr< IMinimizer > createMinimizer() const override
static constexpr auto P_TOLERANCE
ValueDescriptors valueDescriptorsForUI() const override
static constexpr auto P_MAXITERATIONS
static constexpr auto M_TYPE
std::unique_ptr< IMinimizer > createMinimizer() const override
static constexpr auto M_TYPE
static constexpr auto P_ALGORITHMS
static constexpr auto P_MAXITERATIONS
ValueDescriptors valueDescriptorsForUI() const override
static constexpr auto P_RANDOMSEED
static constexpr auto M_TYPE
std::unique_ptr< IMinimizer > createMinimizer() const override
ValueDescriptors valueDescriptorsForUI() const override
static constexpr auto P_TOLERANCE
static constexpr auto P_MAXITERATIONS
static constexpr auto P_POPULATIONSIZE
Defines info for GroupProperty, i.e. collection of model types, their labels and the name of default ...
void add(const QString &itemType, const QString &itemLabel)
void setDefaultType(const QString &modelType)
SelectionDescriptor< QString > objectiveMetric() const
static constexpr auto P_METRIC
static constexpr auto P_NORM
static constexpr auto P_MINIMIZERS
SelectionDescriptor< MinimizerItem * > minimizers() const
std::unique_ptr< IMinimizer > createMinimizer() const override
std::unique_ptr< ObjectiveMetric > createMetric() const
SelectionDescriptor< QString > normFunction() const
static ComboProperty algorithmCombo(const QString &minimizerType)
Returns ComboProperty representing list of algorithms defined for given minimizerType.
The MinimizerItem class is the base item to hold minimizer settings.
MinimizerItem(const QString &model_type)
static constexpr auto M_TYPE
static constexpr auto P_TOLERANCE
static constexpr auto P_MAXFUNCTIONCALLS
static constexpr auto P_PRECISION
static constexpr auto P_ALGORITHMS
std::unique_ptr< IMinimizer > createMinimizer() const override
ValueDescriptors valueDescriptorsForUI() const override
static constexpr auto P_STRATEGY
static constexpr auto P_ERRORDEF
Describes a selection (various possibilities and the current one).
Base class for a GUI data item.
SessionItem * addProperty(const QString &name, const QVariant &variant)
Add new property item and register new tag. name is the tag name and the display name....
QVariant getItemValue(const QString &tag) const
Directly access value of item under given tag.
T * item(const QString &tag) const
SessionItem * addGroupProperty(const QString &groupTag, const GroupInfo &groupInfo)
SessionItem & setToolTip(const QString &tooltip)
QString modelType() const
Get model type.
SessionItem * getItem(const QString &tag="", int row=0) const
Returns item in given row of given tag.
static constexpr auto P_BOLTZMANN_TINIT
ValueDescriptors valueDescriptorsForUI() const override
static constexpr auto P_BOLTZMANN_MU
static constexpr auto M_TYPE
static constexpr auto P_ITERATIONSTEMP
static constexpr auto P_BOLTZMANN_TMIN
std::unique_ptr< IMinimizer > createMinimizer() const override
static constexpr auto P_BOLTZMANN_K
static constexpr auto P_MAXITERATIONS
static constexpr auto P_STEPSIZE
Describes properties of a uint value which are necessary to allow GUI representation,...