Exemplo n.º 1
0
bool CCopasiTask::restore()
{
    setCallBack(NULL);

    if (mpContainer != NULL)
    {
        if (mUpdateModel &&
                mpContainer->isStateValid())
        {
            mpContainer->updateSimulatedValues(false);
            mpContainer->setInitialState(mpContainer->getState(false));
        }
        else
        {
            mpContainer->setInitialState(mInitialState);
        }

        mpContainer->updateInitialValues(CModelParameter::ParticleNumbers);
        mpContainer->pushInitialState();
    }

    mpProblem->restore(mUpdateModel);

    return true;
}
Exemplo n.º 2
0
bool CSteadyStateTask::restore()
{
  setCallBack(NULL);

  if (mpContainer != NULL)
    {
      if (mUpdateModel &&
          mResult != CSteadyStateMethod::notFound &&
          mpContainer->isStateValid())
        {
          mpContainer->setState(mSteadyState);
          mpContainer->updateSimulatedValues(true);
          mpContainer->setInitialState(mpContainer->getState(false));
        }
      else
        {
          mpContainer->setInitialState(mInitialState);
        }

      mpContainer->updateInitialValues(CModelParameter::ParticleNumbers);
      mpContainer->pushInitialState();
    }

  return true;
}
Exemplo n.º 3
0
bool CCopasiTask::restore()
{
  setCallBack(NULL);

  if (!mUpdateModel)
    {
      if (mpInitialState)
        {
          mpProblem->getModel()->setInitialState(*mpInitialState);
        }

      mpProblem->getModel()->updateInitialValues();
    }

  mpProblem->restore(mUpdateModel);

  return true;
}