COPASI API  4.16.103
CSensMethod.cpp
Go to the documentation of this file.
1 // Copyright (C) 2010 - 2013 by Pedro Mendes, Virginia Tech Intellectual
2 // Properties, Inc., University of Heidelberg, and The University
3 // of Manchester.
4 // All rights reserved.
5 
6 // Copyright (C) 2008 - 2009 by Pedro Mendes, Virginia Tech Intellectual
7 // Properties, Inc., EML Research, gGmbH, University of Heidelberg,
8 // and The University of Manchester.
9 // All rights reserved.
10 
11 // Copyright (C) 2005 - 2007 by Pedro Mendes, Virginia Tech Intellectual
12 // Properties, Inc. and EML Research, gGmbH.
13 // All rights reserved.
14 
15 /**
16  * CSensMethod class.
17  */
18 
19 #include <sstream>
20 
21 #include "copasi.h"
22 
23 //#include "utilities/CCopasiVector.h"
26 #include "CSensMethod.h"
27 #include "CSensProblem.h"
28 
29 #include "model/CModel.h"
30 #include "model/CState.h"
32 
35 {
36  CSensMethod * pMethod = NULL;
37 
38  switch (subType)
39  {
40  case unset:
41  case sensMethod:
42  pMethod = new CSensMethod(subType);
43  break;
44 
45  default:
46  fatalError();
47  }
48 
49  return pMethod;
50 }
51 
52 /**
53  * Default constructor.
54  */
56  const CCopasiContainer * pParent):
57  CCopasiMethod(CCopasiTask::sens, subType, pParent),
58  mpProblem(NULL),
59  mLocalData(),
60  mTargetfunctionPointers(),
61  mpSubTask(NULL),
62  mInitialRefreshes(),
63  mpDeltaFactor(NULL),
64  mpMinDelta(NULL),
65  mStoreSubtasktUpdateFlag(false),
66  mProgressHandler(C_INVALID_INDEX),
67  mProgress(0),
68  mCounter(0),
69  mFailedCounter(0)
70 {
71  addParameter("Delta factor",
73  mpDeltaFactor = (C_FLOAT64*)getValue("Delta factor").pUDOUBLE;
74 
75  addParameter("Delta minimum",
77  mpMinDelta = (C_FLOAT64*)getValue("Delta minimum").pUDOUBLE;
78 
80 }
81 
82 /**
83  * Copy constructor.
84  * @param "const CSensMethod &" src
85  */
87  const CCopasiContainer * pParent):
88  CCopasiMethod(src, pParent),
89  mpProblem(src.mpProblem),
90  mLocalData(),
91  mTargetfunctionPointers(),
92  mpSubTask(NULL),
93  mInitialRefreshes(),
94  mpDeltaFactor(NULL),
95  mpMinDelta(NULL),
96  mStoreSubtasktUpdateFlag(false),
97  mProgressHandler(C_INVALID_INDEX),
98  mProgress(0),
99  mCounter(0),
100  mFailedCounter(0)
102 
103 /**
104  * Destructor.
105  */
108 
109 //***********************************************************************************
110 
111 bool CSensMethod::do_target_calculation(CCopasiArray & result, bool /* first */)
112 {
113  bool success = false;
114 
115  //perform the necessary updates
116  std::vector< Refresh * >::iterator it = mInitialRefreshes.begin();
117  std::vector< Refresh * >::iterator end = mInitialRefreshes.end();
118 
119  while (it != end)
120  (**it++)();
121 
122  //****** do subtask ******************
123  if (mpSubTask != NULL)
124  {
125  success = mpSubTask->process(/*first*/true);
126  mCounter++;
127  }
128  else
129  {
130  success = true; // doing nothing should never fail.
131  }
132 
135 
136  //****** retrieve results ************
137 
138  //resize results array
139  CCopasiArray::index_type resultindex;
140  size_t i, imax = mTargetfunctionPointers.size();
141 
142  if (imax > 1)
143  resultindex.push_back(imax);
144 
145  result.resize(resultindex);
146 
147  //copy result
148  if (success)
149  {
150  for (i = 0; i < imax; ++i)
151  {
152  if (imax > 1)
153  resultindex[0] = i;
154 
155  result[resultindex] = *(C_FLOAT64 *)mTargetfunctionPointers[i]->getValuePointer();
156  }
157  }
158  else
159  {
160  mFailedCounter++;
161 
162  for (i = 0; i < imax; ++i)
163  {
164  if (imax > 1)
165  resultindex[0] = i;
166 
167  result[resultindex] = std::numeric_limits< C_FLOAT64 >::quiet_NaN();
168  }
169  }
170 
171  //progress bar
172  ++mProgress;
173 
174  if (mpCallBack)
175  {
177  return tmp;
178  }
179 
180  return success;
181 }
182 
184 {
185  C_FLOAT64 value;
186  value = *(C_FLOAT64*)variable->getValuePointer();
187  C_FLOAT64 delta;
188  delta = fabs(value) * *mpDeltaFactor;
189 
190  if (delta < *mpMinDelta) delta = *mpMinDelta;
191 
192  setValue(variable, delta + value);
193 
194  return delta;
195 }
196 
198 {
199  variable->setObjectValue(value);
200 
201  if (variable->getObjectName() == "Concentration")
202  {
203  CMetab* pMetab = dynamic_cast<CMetab*>(variable->getObjectAncestor("Metabolite"));
204 
205  if (pMetab)
206  {
207  pMetab->setConcentration(value);
208  pMetab->refreshNumber();
209  }
210  }
211 }
212 
213 void CSensMethod::calculate_difference(size_t level, const C_FLOAT64 & delta,
214  CCopasiArray & result, CCopasiArray::index_type & resultindex)
215 {
216  assert(delta != 0.0);
217  assert(mLocalData[level].tmp1.size() == mLocalData[level].tmp2.size());
218  size_t dim = mLocalData[level].tmp1.dimensionality();
219  assert(resultindex.size() >= dim);
220 
221  CCopasiArray::index_type indexmax = mLocalData[level].tmp1.size();
222 
223  //init index with zero
224  CCopasiArray::index_type indexit; indexit.resize(dim);
225  size_t i;
226 
227  for (i = 0; i < dim; ++i)
228  indexit[i] = 0;
229 
230  //handle scalars separately
231  if (dim == 0)
232  {
233  result[resultindex] = (mLocalData[level].tmp2[indexit] - mLocalData[level].tmp1[indexit]) / delta;
234  return;
235  }
236 
237  //now for all higher dimensionalities
238  for (;;)
239  {
240  //do difference calculation
241  for (i = 0; i < dim; ++i)
242  resultindex[i] = indexit[i]; //TODO: use stl algorithm
243 
244  result[resultindex] = (mLocalData[level].tmp2[indexit] - mLocalData[level].tmp1[indexit]) / delta;
245 
246  //increase index
247  ++indexit[dim - 1];
248 
249  //check overflow
250  size_t j;
251 
252  for (j = dim - 1; j != C_INVALID_INDEX; --j)
253  {
254  if (indexit[j] >= indexmax[j])
255  {
256  indexit[j] = 0;
257 
258  if (j > 0)
259  ++indexit[j - 1];
260  else
261  return;
262  }
263  else
264  break;
265  }
266  }
267 }
268 
269 bool CSensMethod::calculate_one_level(size_t level, CCopasiArray & result)
270 {
271  //do first calculation
272  if (level == 0)
273  {
274  if (!do_target_calculation(mLocalData[level].tmp1, true)) return false;
275  }
276  else
277  {
278  if (!calculate_one_level(level - 1, mLocalData[level].tmp1)) return false;
279  }
280 
281  //resize results array
282  CCopasiArray::index_type resultindex; resultindex = mLocalData[level].tmp1.size();
283 
284  if (mLocalData[level].variables.size() > 1)
285  resultindex.push_back(mLocalData[level].variables.size());
286 
287  result.resize(resultindex);
288 
289  //loop over all variables
290  size_t i, imax = mLocalData[level].variables.size();
291 
292  for (i = 0; i < imax; ++i)
293  {
294  //store variable value
295  C_FLOAT64 store = *(C_FLOAT64 *)mLocalData[level].variables[i]->getValuePointer();
296 
297  //change variable
298  C_FLOAT64 delta = do_variation(mLocalData[level].variables[i]);
299 
300  //do second calculation
301  if (level == 0)
302  {
303  if (!do_target_calculation(mLocalData[level].tmp2, false)) return false;
304  }
305  else
306  {
307  if (!calculate_one_level(level - 1, mLocalData[level].tmp2)) return false;
308  }
309 
310  //restore variable
311  //mLocalData[level].variables[i]->setObjectValue(store);
312  setValue(mLocalData[level].variables[i], store);
313 
314  //calculate derivative
315  if (imax > 1)
316  resultindex[resultindex.size() - 1] = i;
317 
318  calculate_difference(level, delta, result, resultindex);
319  }
320 
321  return true;
322 }
323 
324 //********** SCALING *************************************************************
325 
327  CCopasiArray::index_type & resultindex)
328 {
329  size_t dim = mLocalData[0].tmp1.dimensionality();
330  assert(resultindex.size() >= dim);
331 
332  CCopasiArray::index_type indexmax = mLocalData[0].tmp1.size();
333  //init index with zero
334  CCopasiArray::index_type indexit; indexit.resize(dim);
335  size_t i;
336 
337  for (i = 0; i < dim; ++i)
338  indexit[i] = 0;
339 
340  //handle scalars separately
341  if (dim == 0)
342  {
343  mpProblem->getScaledResult()[resultindex] = mpProblem->getResult()[resultindex] * factor / mLocalData[0].tmp1[indexit];
344  return;
345  }
346 
347  //now for all higher dimensionalities
348  for (;;)
349  {
350  for (i = 0; i < dim; ++i)
351  resultindex[i] = indexit[i]; //TODO: use stl algorithm
352 
353  mpProblem->getScaledResult()[resultindex] = mpProblem->getResult()[resultindex] * factor / mLocalData[0].tmp1[indexit];
354 
355  //increase index
356  ++indexit[dim - 1];
357 
358  //check overflow
359  size_t j;
360 
361  for (j = dim - 1; j != C_INVALID_INDEX; --j)
362  {
363  if (indexit[j] >= indexmax[j])
364  {
365  indexit[j] = 0;
366 
367  if (j > 0)
368  ++indexit[j - 1];
369  else
370  return;
371  }
372  else
373  break;
374  }
375  }
376 }
377 
378 void CSensMethod::scaling_variables(size_t level, const C_FLOAT64 & factor,
379  CCopasiArray::index_type & resultindex)
380 {
381  //loop over all variables
382  size_t i, imax = mLocalData[level].variables.size();
383 
384  for (i = 0; i < imax; ++i)
385  {
386  //get Value
387  C_FLOAT64 value = *(C_FLOAT64 *)mLocalData[level].variables[i]->getValuePointer() * factor;
388 
389  //do recursive calculation
390  if (imax > 1)
391  resultindex[mLocalData[level].index] = i;
392 
393  if (level == 0)
394  {
395  scaling_targetfunction(value, resultindex);
396  }
397  else
398  {
399  scaling_variables(level - 1, value, resultindex);
400  }
401  }
402 }
403 
405 {
407  index.resize(mpProblem->getResult().dimensionality());
408  scaling_variables(mLocalData.size() - 1, 1.0, index);
409 }
410 
411 //****************************************************************************
412 
414 {
415  //fullindex[0]=0;
416  //return mpProblem->getScaledResult()[fullindex];
417 
418  //assumes the sum is to be taken over the first dim of the scaled result array
419  C_FLOAT64 tmpFloat, tmpSum = 0;
420  size_t i, imax = mpProblem->getScaledResult().size()[0];
421 
422  for (i = 0; i < imax; ++i)
423  {
424  fullindex[0] = i;
425  tmpFloat = mpProblem->getScaledResult()[fullindex];
426 
427  if (tmpFloat != tmpFloat) continue;
428 
429  if (fabs(tmpFloat) >= std::numeric_limits< C_FLOAT64 >::max()) continue;
430 
431  tmpSum += tmpFloat * tmpFloat;
432  }
433 
434  return sqrt(tmpSum);
435 }
436 
438 {
440  {
442  CCopasiArray::index_type collapsedresultindex = mpProblem->getCollapsedResult().size();
443 
444  size_t shift = fullresultindex.size() - collapsedresultindex.size();
445 
446  if (shift != 1) return; //only supported if target functions list is 1D
447 
448  //***** skalar ********
449  if (collapsedresultindex.size() == 0)
450  {
451  mpProblem->getCollapsedResult()[collapsedresultindex] =
452  do_collapsing_innerloop(fullresultindex);
453  return;
454  }
455 
456  //***** higher dimensions *********
457  size_t i, dim = collapsedresultindex.size();
459 
460  //set index to zero
461  for (i = 0; i < dim; ++i) collapsedresultindex[i] = 0;
462 
463  for (;;)
464  {
465  fullresultindex[0] = 0;
466 
467  for (i = 0; i < dim; ++i)
468  fullresultindex[i + shift] = collapsedresultindex[i];
469 
470  mpProblem->getCollapsedResult()[collapsedresultindex] =
471  do_collapsing_innerloop(fullresultindex);
472 
473  //increase index
474  ++collapsedresultindex[dim - 1];
475 
476  //check overflow
477  size_t j;
478 
479  for (j = dim - 1; j != C_INVALID_INDEX; --j)
480  {
481  if (collapsedresultindex[j] >= indexmax[j])
482  {
483  collapsedresultindex[j] = 0;
484 
485  if (j > 0)
486  ++collapsedresultindex[j - 1];
487  else
488  return;
489  }
490  else
491  break;
492  }
493  }
494  }
495  else
496  {}
497 }
498 
499 //****************************************************************************
500 
502 {
503  bool success = true;
504 
505  mpProblem = problem;
506  assert(mpProblem);
507 
508  //initialize the target calculation
509  mpSubTask = NULL;
510  CCopasiDataModel* pDataModel = getObjectDataModel();
511  assert(pDataModel != NULL);
512 
513  switch (mpProblem->getSubTaskType())
514  {
516  mpSubTask = NULL;
517  break;
518 
520  mpSubTask = dynamic_cast<CCopasiTask*>
521  ((*pDataModel->getTaskList())["Steady-State"]);
522  break;
523 
525  mpSubTask = dynamic_cast<CCopasiTask*>
526  ((*pDataModel->getTaskList())["Time-Course"]);
527  break;
528 
529  /* case CSensProblem::LyapunovExp:
530  mpSubTask = dynamic_cast<CCopasiTask*>
531  ((*pDataModel->getTaskList())["Lyapunov Exponents"]);
532  break;*/
533 
535  mpSubTask = dynamic_cast<CCopasiTask*>
536  ((*pDataModel->getTaskList())["Parameter Estimation"]);
537  break;
538 
540  mpSubTask = dynamic_cast<CCopasiTask*>
541  ((*pDataModel->getTaskList())["Optimization"]);
542  break;
543 
545  mpSubTask = dynamic_cast<CCopasiTask*>
546  ((*pDataModel->getTaskList())["Cross Section"]);
547  break;
548  }
549 
550  if (mpSubTask)
551  {
552  //the subtask should not change the initial state of the model
554  mpSubTask->setUpdateModel(false);
555 
557  mpSubTask->setCallBack(NULL);
558  success &= mpSubTask->initialize(CCopasiTask::NO_OUTPUT, NULL, NULL);
559  }
560 
561  //initialize the variables pointers
562  std::set< const CCopasiObject * > ObjectSet;
563  size_t i, imax = mpProblem->getNumberOfVariables();
564  mLocalData.resize(imax);
565 
566  for (i = 0; i < imax; ++i)
567  {
568  mLocalData[i].variables = mpProblem->getVariables(i).getVariablesPointerList(pDataModel);
569 
570  ObjectSet.insert(mLocalData[i].variables.begin(), mLocalData[i].variables.end());
571  }
572 
573  //determine which refreshes need to be called when the variables are changed
574  ObjectSet.erase(NULL);
575  mInitialRefreshes.clear();
577 
578  //initialize the target function pointers
580 
581  //****** initialize result annotations ****************
582 
583  //determine dimensions of result
585  CCopasiArray::index_type sc; //size of collapsed result
586 
587  if (mTargetfunctionPointers.size() > 1)
588  {
589  s.push_back(mTargetfunctionPointers.size());
590  }
591 
592  for (i = 0; i < imax; ++i)
593  {
594  if (mLocalData[i].variables.size() > 1)
595  {
596  mLocalData[i].index = s.size();
597  s.push_back(mLocalData[i].variables.size());
598  sc.push_back(mLocalData[i].variables.size());
599  }
600  else
601  mLocalData[i].index = C_INVALID_INDEX;
602  }
603 
604  //resize result & annotations
605  mpProblem->getResult().resize(s);
607  //mpProblem->getResultAnnotated()->setMode(CArrayAnnotation::OBJECTS);
608 
611  //mpProblem->getScaledResultAnnotated()->setMode(CArrayAnnotation::OBJECTS);
612 
614  {
617  //mpProblem->getCollapsedResultAnnotated()->setMode(CArrayAnnotation::OBJECTS);
618  }
619 
620  size_t dim = 0;
621  size_t j;
622 
623  //target function annotations //TODO: only implemented for scalar and vector
624  if (mTargetfunctionPointers.size() > 1)
625  {
626  std::ostringstream tmp;
627  tmp << "Target functions, " << mpProblem->getTargetFunctions().getListTypeDisplayName();
630 
631  for (j = 0; j < mTargetfunctionPointers.size(); ++j)
632  {
635  }
636 
637  ++dim;
638  }
639 
640  //variables annotiation
641  size_t dim2 = 0; //for collapsed result
642 
643  for (i = 0; i < imax; ++i)
644  {
645  if (mLocalData[i].variables.size() > 1)
646  {
647  std::ostringstream tmp;
648  tmp << "Variables " << i + 1 << ", " << mpProblem->getVariables(i).getListTypeDisplayName();
651 
654 
655  for (j = 0; j < mLocalData[i].variables.size(); ++j)
656  {
657  mpProblem->getResultAnnotated()->setAnnotationCN(dim, j, mLocalData[i].variables[j]->getCN());
658  mpProblem->getScaledResultAnnotated()->setAnnotationCN(dim, j, mLocalData[i].variables[j]->getCN());
659 
661  mpProblem->getCollapsedResultAnnotated()->setAnnotationCN(dim2, j, mLocalData[i].variables[j]->getCN());
662  }
663 
664  ++dim;
665  ++dim2;
666  }
667  }
668 
669  return success;
670 }
671 
672 bool CSensMethod::restore(const bool & /* updateModel */)
673 {
674  bool success = true;
675 
676  if (mpSubTask != NULL)
677  {
678  success &= mpSubTask->restore();
679 
680  //restore the update model flag
682  }
683  return success;
684 }
685 
687 {
688  size_t ret = 1;
689  size_t i;
690 
691  for (i = 0; i < mLocalData.size(); ++i)
692  {
693  ret *= mLocalData[i].variables.size() + 1;
694  }
695 
696  return ret;
697 }
698 
700 {
701  // Reset the evaluation counter
702  mCounter = 0;
703  mFailedCounter = 0;
704 
705  if (!mLocalData.size()) return false;
706 
707  //initialize progress bar
708  mpCallBack = handler;
709 
710  if (mpCallBack)
711  {
712  mpCallBack->setName("performing sensitivities calculation...");
713  unsigned C_INT32 max = (unsigned C_INT32) getNumberOfSubtaskCalculations();
714  mProgress = 0;
715  mProgressHandler = mpCallBack->addItem("Completion",
716  mProgress,
717  &max);
718 
719  if (mpSubTask)
721  }
722 
723  if (!calculate_one_level(mLocalData.size() - 1, mpProblem->getResult())) return false;
724 
725  do_scaling();
726 
727  do_collapsing();
728 
730 
731  if (mFailedCounter * 20 > mCounter) // > 5% failure rate
733 
734  return true;
735 }
736 
737 //virtual
739 {
740  if (!CCopasiMethod::isValidProblem(pProblem)) return false;
741 
742  const CSensProblem * pP = dynamic_cast<const CSensProblem *>(pProblem);
743 
744  if (!pP)
745  {
746  CCopasiMessage(CCopasiMessage::EXCEPTION, "Problem is not a sensitivities problem.");
747  return false;
748  }
749 
750  return true;
751 
752  //all sizes at least one
753 
754  //dimension of variables 0 or 1
755 
756  //if target is scan make sure the scan subtask is not sens.
757 }
CCopasiDataModel * getObjectDataModel()
CCopasiContainer * getObjectAncestor(const std::string &type) const
virtual bool setCallBack(CProcessReport *pCallBack)
void calculate_difference(size_t level, const C_FLOAT64 &delta, CCopasiArray &result, CCopasiArray::index_type &resultindex)
void do_scaling()
std::string getListTypeDisplayName() const
void resize(const index_type &sizes)
bool collapsRequested() const
C_FLOAT64 * mpDeltaFactor
Definition: CSensMethod.h:178
size_t getNumberOfVariables() const
void scaling_targetfunction(const C_FLOAT64 &factor, CCopasiArray::index_type &resultindex)
void setObjectValue(const C_FLOAT64 &value)
CCopasiProblem * getProblem()
const std::string & getObjectName() const
CSensItem getVariables(size_t index) const
std::vector< CCopasiObject * > mTargetfunctionPointers
Definition: CSensMethod.h:172
virtual bool initialize(const OutputFlag &of, COutputHandler *pOutputHandler, std::ostream *pOstream)
const bool & isUpdateModel() const
void updateNonSimulatedValues(void)
Definition: CModel.cpp:1892
virtual bool setName(const std::string &name)
void updateSimulatedValues(const bool &updateMoieties)
Definition: CModel.cpp:1851
#define fatalError()
bool restore(const bool &updateModel)
void setAnnotationCN(size_t d, size_t i, const std::string cn)
std::vector< CSensMethodLocalData > mLocalData
Definition: CSensMethod.h:170
CSensProblem::SubTaskType getSubTaskType() const
virtual void * getValuePointer() const
CArrayAnnotation * getCollapsedResultAnnotated()
#define C_INVALID_INDEX
Definition: copasi.h:222
std::vector< size_t > index_type
Definition: CCopasiArray.h:34
#define C_INT32
Definition: copasi.h:90
void scaling_variables(size_t level, const C_FLOAT64 &factor, CCopasiArray::index_type &resultindex)
Definition: CMetab.h:178
std::vector< CCopasiObject * > getVariablesPointerList(CCopasiDataModel *pDataModel)
CArrayAnnotation * getScaledResultAnnotated()
virtual bool progressItem(const size_t &handle)
C_FLOAT64 do_variation(CCopasiObject *variable)
virtual bool isValidProblem(const CCopasiProblem *pProblem)
CCopasiArray & getResult()
virtual bool setModel(CModel *pModel)
virtual bool isValidProblem(const CCopasiProblem *pProblem)
size_t mFailedCounter
Definition: CSensMethod.h:189
#define MCCopasiTask
#define DESTRUCTOR_TRACE
Definition: copasi.h:206
CSensItem getTargetFunctions() const
size_t mProgressHandler
Definition: CSensMethod.h:185
bool process(CProcessReport *handler)
void do_collapsing()
static CSensMethod * createMethod(CCopasiMethod::SubType subType=CCopasiMethod::sensMethod)
Definition: CSensMethod.cpp:34
CSensProblem * mpProblem
Definition: CSensMethod.h:168
bool do_target_calculation(CCopasiArray &result, bool first)
size_t addItem(const std::string &name, const std::string &value, const std::string *pEndValue=NULL)
CArrayAnnotation * getResultAnnotated()
CCopasiArray & getCollapsedResult()
const Value & getValue() const
CCopasiVectorN< CCopasiTask > * getTaskList()
CCopasiArray & getScaledResult()
C_FLOAT64 do_collapsing_innerloop(CCopasiArray::index_type &fullindex)
void refreshNumber()
Definition: CMetab.cpp:286
virtual bool finishItem(const size_t &handle)
size_t dimensionality() const
Definition: CCopasiArray.h:79
void setConcentration(const C_FLOAT64 concentration)
Definition: CMetab.cpp:250
size_t getNumberOfSubtaskCalculations()
void setValue(CCopasiObject *variable, C_FLOAT64 value)
std::set< const CObjectInterface * > ObjectSet
void setDimensionDescription(size_t d, const std::string &s)
virtual bool process(const bool &useInitialValues)
virtual CCopasiObjectName getCN() const
std::vector< Refresh * > mInitialRefreshes
Definition: CSensMethod.h:176
bool initialize(CSensProblem *problem)
#define C_FLOAT64
Definition: copasi.h:92
C_FLOAT64 * mpMinDelta
Definition: CSensMethod.h:179
bool mStoreSubtasktUpdateFlag
stores the update model flag of the subtask
Definition: CSensMethod.h:182
bool addParameter(const CCopasiParameter &parameter)
virtual void * getValuePointer() const
const index_type & size() const
Definition: CCopasiArray.h:76
virtual bool restore()
size_t mCounter
Definition: CSensMethod.h:188
std::vector< Refresh * > buildInitialRefreshSequence(std::set< const CCopasiObject * > &changedObjects)
Definition: CModel.cpp:4164
void setUpdateModel(const bool &updateModel)
CProcessReport * mpCallBack
CModel * getModel() const
CCopasiTask * mpSubTask
Definition: CSensMethod.h:174
unsigned C_INT32 mProgress
Definition: CSensMethod.h:186
#define CONSTRUCTOR_TRACE
Definition: copasi.h:202
bool calculate_one_level(size_t level, CCopasiArray &result)
#define max(a, b)
Definition: f2c.h:176