17 #include <QtCore/QVariant>
63 if (!pTask)
return false;
71 if (!pProblem)
return false;
91 if (mpBtnMaximize->isChecked() != pProblem->
maximize())
109 mChanged |= mpParameters->save(NULL, NULL);
110 mChanged |= mpConstraints->save(NULL, NULL);
128 if (!pTask)
return false;
136 if (!pProblem)
return false;
140 mpExpressionEMW->updateWidget();
142 mpBtnMaximize->setChecked(pProblem->
maximize());
143 mpBtnMinimize->setChecked(!pProblem->
maximize());
152 mpConstraints->load(
mpDataModel, pProblem->
getGroup(
"OptimizationConstraintList"), NULL, NULL);
163 mpExpressionEMW->updateWidget();
170 if (!pTask)
return false;
179 if (mpTabWidget->tabText(mpTabWidget->indexOf(currentPage)).contains(
"Parameters", Qt::CaseSensitive))
190 QString TabLabel =
"Parameters (" + QString::number(number) +
")";
191 mpTabWidget->setTabText(mpTabWidget->indexOf(mpParameters), TabLabel);
196 QString TabLabel =
"Constraints (" + QString::number(number) +
")";
197 mpTabWidget->setTabText(mpTabWidget->indexOf(mpConstraints), TabLabel);
202 std::string taskName =
"Optimization";
CCopasiTask::Type getSubtaskType() const
static const std::string TypeName[]
CCopasiProblem * getProblem()
CCopasiObject * get(const std::string &key)
static COptMethod * createMethod(CCopasiMethod::SubType subType=CCopasiMethod::RandomSearch)
const bool & getRandomizeStartValues() const
static const unsigned int ValidMethods[]
const bool & maximize() const
static CCopasiVector< CCopasiDataModel > * getDatamodelList()
static const unsigned int ValidSubtasks[]
void setRandomizeStartValues(const bool &randomize)
static CKeyFactory * getKeyFactory()
const std::string getObjectiveFunction()
const bool & getCalculateStatistics() const
bool setSubtaskType(const CCopasiTask::Type &subtaskType)
CCopasiParameterGroup * getGroup(const std::string &name)
void setMaximize(const bool &maximize)
void setCalculateStatistics(const bool &calculate)
bool setObjectiveFunction(const std::string &infix)