COPASI API  4.16.103
Static Public Member Functions | Private Types | Static Private Member Functions | Static Private Attributes | List of all members
COutputAssistant Class Reference

#include <COutputAssistant.h>

Collaboration diagram for COutputAssistant:
Collaboration graph
[legend]

Static Public Member Functions

static CCopasiObjectcreateDefaultOutput (C_INT32 id, CCopasiTask *task, CCopasiDataModel *pDataModel, bool activate=true)
 
static C_INT32 getDefaultPlotIndex (const CCopasiProblem *problem)
 
static C_INT32 getDefaultReportIndex (const CCopasiProblem *problem)
 
static const
CDefaultOutputDescription
getItem (C_INT32 id)
 
static const std::string & getItemName (C_INT32 id)
 
static std::vector< C_INT32getListOfDefaultOutputDescriptions (const CCopasiTask *task=NULL)
 

Private Types

typedef std::map< C_INT32,
CDefaultOutputDescription
Map
 

Static Private Member Functions

static CPlotSpecificationcreatePlot (const std::string &name, const CCopasiObject *x, bool logX, const std::vector< const CCopasiObject * > &y, bool logY, const CCopasiTask::Type &taskType, CCopasiDataModel *pDataModel, CCopasiTask *task=NULL)
 
static CReportDefinitioncreateTable (const std::string &name, const std::vector< const CCopasiObject * > &d, const std::string &comment, const CCopasiTask::Type &taskType, CCopasiDataModel *pDataModel)
 
static bool initialize ()
 

Static Private Attributes

static const
CDefaultOutputDescription 
emptyItem
 
static const std::string emptyString
 
static Map mMap
 

Detailed Description

Definition at line 50 of file COutputAssistant.h.

Member Typedef Documentation

Definition at line 101 of file COutputAssistant.h.

Member Function Documentation

CCopasiObject * COutputAssistant::createDefaultOutput ( C_INT32  id,
CCopasiTask task,
CCopasiDataModel pDataModel,
bool  activate = true 
)
static

create a plot or report from template with index id. returns a pointer to the plot or report definition (or NULL) if activate==true and the ouput is a report the report is set as the current report for the task (possibly replacing an already set report)

Definition at line 580 of file COutputAssistant.cpp.

References CPlotItem::addChannel(), COutputInterface::AFTER, CCopasiVector< T >::begin(), C_INT32, CPlotSpecification::createItem(), createPlot(), COutputDefinitionVector::createPlotSpec(), CPlotItem::curve2d, COutputInterface::DURING, CCopasiVector< T >::end(), CCopasiObject::getCN(), CPlotColors::getCopasiColorStr(), CFitProblem::getExperiementSet(), CExperimentSet::getExperiment(), CExperimentSet::getExperimentCount(), CExperiment::getExperimentType(), CExperiment::getFittingPoints(), getItem(), getItemName(), CPlotSpecification::getItems(), CCopasiProblem::getModel(), CCopasiContainer::getObject(), CCopasiParameterGroup::getObject(), CCopasiObject::getObjectDisplayName(), CCopasiObject::getObjectName(), CCopasiDataModel::getPlotDefinitionList(), CCopasiTask::getProblem(), CCopasiDataModel::getTaskList(), CDefaultOutputDescription::mTaskType, CPlotItem::plot2d, pTask, CPlotItem::setActivity(), CPlotSpecification::setLogY(), CCopasiParameterGroup::setValue(), CCopasiVector< T >::size(), and CCopasiTask::timeCourse.

Referenced by Arguments::prepareModel(), and DefaultPlotDialog::slotCreate().

581 {
582  if (task == NULL)
583  {
584  return NULL;
585  }
586 
587  if (task->getProblem() == NULL)
588  {
589  return NULL;
590  }
591 
592  CModel* pModel = task->getProblem()->getModel();
593 
594  if (pModel == NULL)
595  {
596  return NULL;
597  }
598 
599  std::vector<const CCopasiObject*> data1, tmpdata;
600  const CCopasiObject* data2 = NULL;
601 
602  //first handle the special cases (those not that are not numbered according to the systematic scheme)
603  switch (id)
604  {
605  case 910: // :TODO: Implement me!
606  {
607  CPlotSpecification * pPlotSpecification = NULL;
608  CCopasiTask * pTask = (*pDataModel->getTaskList())["Parameter Estimation"];
609 
610  if (pTask == NULL) return NULL;
611 
612  CFitProblem * pFitProblem = dynamic_cast< CFitProblem * >(pTask->getProblem());
613 
614  if (pFitProblem == NULL) return NULL;
615 
616  const CExperimentSet & ExperimentSet = pFitProblem->getExperiementSet();
617  size_t i, imax = ExperimentSet.getExperimentCount();
618 
619  std::vector< std::string > ChannelX;
620  std::vector< std::string > Names;
621  std::vector< unsigned C_INT32 > LineTypes;
622  std::vector< unsigned C_INT32 > SymbolSubTypes;
623  std::vector< unsigned C_INT32 > LineSubTypes;
624  std::vector< std::string > Colors;
625 
626  unsigned C_INT32 colorcounter = 0;
627 
628  for (i = 0; i < imax; i++)
629  {
630  const CExperiment * pExperiment = ExperimentSet.getExperiment(i);
631  const CCopasiVector< CFittingPoint > & FittingPoints = pExperiment->getFittingPoints();
632 
635 
636  if (it == end) continue;
637 
638  data2 =
639  static_cast< const CCopasiObject * >((*it)->getObject(CCopasiObjectName("Reference=Independent Value")));
640 
641  for (; it != end; ++it)
642  {
643  std::string Name = (*it)->getModelObjectCN();
644  const CCopasiObject * pObject =
645  dynamic_cast< const CCopasiObject * >(pDataModel->getObject(Name));
646 
647  if (pObject != NULL)
648  Name = pObject->getObjectDisplayName();
649 
650  Name = pExperiment->getObjectName() + "," + Name;
651 
652  //1
653  data1.push_back(static_cast< const CCopasiObject * >((*it)->getObject(CCopasiObjectName("Reference=Measured Value"))));
654  ChannelX.push_back(data2->getCN());
655  Names.push_back(Name + "(Measured Value)");
656  LineTypes.push_back(3); //symbols & lines
657  SymbolSubTypes.push_back(1); //fat cross
658  LineSubTypes.push_back(1); //dotted
659  Colors.push_back(CPlotColors::getCopasiColorStr(colorcounter));
660 
661  //2
662  data1.push_back(static_cast< const CCopasiObject * >((*it)->getObject(CCopasiObjectName("Reference=Fitted Value"))));
663  ChannelX.push_back(data2->getCN());
664  Names.push_back(Name + "(Fitted Value)");
665 
666  if (pExperiment->getExperimentType() == CCopasiTask::timeCourse)
667  {
668  LineTypes.push_back(0); //curve
669  SymbolSubTypes.push_back(0); //default, this value is not used
670  }
671  else
672  {
673  LineTypes.push_back(2); //symbols
674  SymbolSubTypes.push_back(1); //TODO
675  }
676 
677  LineSubTypes.push_back(0); //default, solid
678  Colors.push_back(CPlotColors::getCopasiColorStr(colorcounter));
679 
680  //3
681  data1.push_back(static_cast< const CCopasiObject * >((*it)->getObject(CCopasiObjectName("Reference=Weighted Error"))));
682  ChannelX.push_back(data2->getCN());
683  Names.push_back(Name + "(Weighted Error)");
684  LineTypes.push_back(2); //symbols
685  SymbolSubTypes.push_back(2); //circles
686  LineSubTypes.push_back(0); //default, this value is not used
687  Colors.push_back(CPlotColors::getCopasiColorStr(colorcounter));
688 
689  ++colorcounter;
690  }
691  }
692 
693  pPlotSpecification =
694  createPlot(getItemName(id), data2, false, data1, false, getItem(id).mTaskType, pDataModel);
695 
696  if (pPlotSpecification != NULL)
697  {
698  CCopasiVector< CPlotItem > & Items = pPlotSpecification->getItems();
701  std::vector< std::string >::const_iterator itChannelX = ChannelX.begin();
702  std::vector< std::string >::const_iterator itName = Names.begin();
703  std::vector< unsigned C_INT32 >::const_iterator itLineType = LineTypes.begin();
704  std::vector< unsigned C_INT32 >::const_iterator itSymbolSubType = SymbolSubTypes.begin();
705  std::vector< unsigned C_INT32 >::const_iterator itLineSubType = LineSubTypes.begin();
706  std::vector<std::string>::const_iterator itColor = Colors.begin();
707 
708  while (itItem != endItem)
709  {
710  (*itItem)->getChannels()[0] = CPlotDataChannelSpec(*itChannelX++);
711  (*itItem)->setTitle(*itName++);
712  (*itItem)->setActivity(COutputInterface::AFTER);
713  (*itItem)->setValue("Line type", *itLineType++);
714  (*itItem)->setValue("Symbol subtype", *itSymbolSubType++);
715  (*itItem)->setValue("Line subtype", *itLineSubType++);
716  (*itItem++)->setValue("Color", *itColor++);
717  }
718  }
719 
720  return pPlotSpecification;
721  }
722  break;
723 
724  case 911:
725  {
726  CPlotSpecification * pPlotSpecification = NULL;
727  CCopasiTask * pTask = (*pDataModel->getTaskList())["Parameter Estimation"];
728 
729  if (pTask == NULL) return NULL;
730 
731  CFitProblem * pFitProblem = dynamic_cast< CFitProblem * >(pTask->getProblem());
732 
733  if (pFitProblem == NULL) return NULL;
734 
735  const CExperimentSet & ExperimentSet = pFitProblem->getExperiementSet();
736  size_t i, imax = ExperimentSet.getExperimentCount();
737 
738  for (i = 0; i < imax; i++)
739  {
740  const CExperiment * pExperiment = ExperimentSet.getExperiment(i);
741  const CCopasiVector< CFittingPoint > & FittingPoints = pExperiment->getFittingPoints();
742 
745 
746  if (it == end) continue;
747 
748  data2 = static_cast< const CCopasiObject * >((*it)->getObject(CCopasiObjectName("Reference=Independent Value")));
749  data1.clear();
750 
751  for (; it != end; ++it)
752  {
753  data1.push_back(static_cast< const CCopasiObject * >((*it)->getObject(CCopasiObjectName("Reference=Measured Value"))));
754  data1.push_back(static_cast< const CCopasiObject * >((*it)->getObject(CCopasiObjectName("Reference=Fitted Value"))));
755  data1.push_back(static_cast< const CCopasiObject * >((*it)->getObject(CCopasiObjectName("Reference=Weighted Error"))));
756  }
757 
758  pPlotSpecification =
759  createPlot(pExperiment->getObjectName(), data2, false, data1, false, getItem(id).mTaskType, pDataModel);
760 
761  if (pPlotSpecification != NULL)
762  {
763  CCopasiVector< CPlotItem > & Items = pPlotSpecification->getItems();
766  it = FittingPoints.begin();
767 
768  unsigned C_INT32 LineType;
769 
770  if (pExperiment->getExperimentType() == CCopasiTask::timeCourse)
771  LineType = 0;
772  else
773  LineType = 2;
774 
775  unsigned C_INT32 colorcounter = 0;
776 
777  while (itItem != endItem)
778  {
779  std::string Name = (*it++)->getModelObjectCN();
780  const CCopasiObject * pObject =
781  dynamic_cast< const CCopasiObject * >(pDataModel->getObject(Name));
782 
783  if (pObject != NULL)
784  Name = pObject->getObjectDisplayName();
785 
786  (*itItem)->setTitle(Name + "(Measured Value)");
787  (*itItem)->setActivity(COutputInterface::AFTER);
788  (*itItem)->setValue("Line type", (unsigned C_INT32) 3); //symbols and lines
789  (*itItem)->setValue("Symbol subtype", (unsigned C_INT32) 1); //fat cross
790  (*itItem)->setValue("Line subtype", (unsigned C_INT32) 1); //dotted
791  (*itItem++)->setValue("Color", CPlotColors::getCopasiColorStr(colorcounter));
792 
793  (*itItem)->setTitle(Name + "(Fitted Value)");
794  (*itItem)->setActivity(COutputInterface::AFTER);
795  (*itItem)->setValue("Line type", (unsigned C_INT32) LineType);
796  (*itItem)->setValue("Symbol subtype", (unsigned C_INT32) 0);
797  (*itItem++)->setValue("Color", CPlotColors::getCopasiColorStr(colorcounter));
798 
799  (*itItem)->setTitle(Name + "(Weighted Error)");
800  (*itItem)->setActivity(COutputInterface::AFTER);
801  (*itItem)->setValue("Line type", (unsigned C_INT32) 2);
802  (*itItem)->setValue("Symbol subtype", (unsigned C_INT32) 2);
803  (*itItem++)->setValue("Color", CPlotColors::getCopasiColorStr(colorcounter));
804 
805  ++colorcounter;
806  }
807  }
808  }
809 
810  return pPlotSpecification;
811  }
812  break;
813 
814  case 912:
815  {
816  CPlotSpecification * pPlotSpecification = NULL;
817  CCopasiTask * pTask = (*pDataModel->getTaskList())["Parameter Estimation"];
818 
819  if (pTask == NULL) return NULL;
820 
821  CFitProblem * pFitProblem = dynamic_cast< CFitProblem * >(pTask->getProblem());
822 
823  if (pFitProblem == NULL) return NULL;
824 
825  const CExperimentSet & ExperimentSet = pFitProblem->getExperiementSet();
826  size_t i, imax = ExperimentSet.getExperimentCount();
827 
828  std::map< const CCopasiObject *, CPlotSpecification * > PlotSpecMap;
829  std::map< const CCopasiObject *, CPlotSpecification * >::iterator Found;
830 
831  for (i = 0; i < imax; i++)
832  {
833  const CExperiment * pExperiment = ExperimentSet.getExperiment(i);
834  const CCopasiVector< CFittingPoint > & FittingPoints = pExperiment->getFittingPoints();
835 
838 
839  if (it == end) continue;
840 
841  std::string Name = pExperiment->getObjectName();
842  CPlotDataChannelSpec ChannelX =
843  (*it)->getObject(CCopasiObjectName("Reference=Independent Value"))->getCN();
844  unsigned C_INT32 LineType;
845 
846  if (pExperiment->getExperimentType() == CCopasiTask::timeCourse)
847  LineType = 0;
848  else
849  LineType = 2;
850 
851  for (; it != end; ++it)
852  {
853  const CCopasiObject * pObject =
854  dynamic_cast< const CCopasiObject * >(pDataModel->getObject((*it)->getModelObjectCN()));
855 
856  if (pObject == NULL) continue;
857 
858  if ((Found = PlotSpecMap.find(pObject)) != PlotSpecMap.end())
859  pPlotSpecification = Found->second;
860  else
861  {
862  unsigned C_INT32 i = 0;
863  std::ostringstream sname;
864  sname << pObject->getObjectDisplayName();
865 
866  while (!(pPlotSpecification =
867  pDataModel->getPlotDefinitionList()->createPlotSpec(sname.str(),
869  {
870  i++;
871  sname.str("");
872  sname << pObject->getObjectDisplayName() << "_" << i;
873  }
874 
875  PlotSpecMap[pObject] = pPlotSpecification;
876  }
877 
878  if (pPlotSpecification != NULL)
879  {
880  //first determine color for the current curves
881  unsigned C_INT32 colorindex = (pPlotSpecification->getItems().size() / 3);
882 
883  CPlotItem * pItem =
884  pPlotSpecification->createItem(Name + "(Measured Value)", CPlotItem::curve2d);
886  pItem->setValue("Line type", (unsigned C_INT32) 3); //symbols and lines
887  pItem->setValue("Line subtype", (unsigned C_INT32) 1); //dotted
888  pItem->setValue("Symbol subtype", (unsigned C_INT32) 1); //fat cross
889  pItem->setValue("Color", CPlotColors::getCopasiColorStr(colorindex));
890  pItem->addChannel(ChannelX);
891  pItem->addChannel((*it)->getObject(CCopasiObjectName("Reference=Measured Value"))->getCN());
892 
893  pItem =
894  pPlotSpecification->createItem(Name + "(Fitted Value)", CPlotItem::curve2d);
896  pItem->setValue("Line type", LineType);
897  pItem->setValue("Symbol subtype", (unsigned C_INT32) 0);
898  pItem->setValue("Color", CPlotColors::getCopasiColorStr(colorindex));
899  pItem->addChannel(ChannelX);
900  pItem->addChannel((*it)->getObject(CCopasiObjectName("Reference=Fitted Value"))->getCN());
901 
902  pItem =
903  pPlotSpecification->createItem(Name + "(Weighted Error)", CPlotItem::curve2d);
905  pItem->setValue("Line type", (unsigned C_INT32) 2);
906  pItem->setValue("Symbol subtype", (unsigned C_INT32) 2);
907  pItem->setValue("Color", CPlotColors::getCopasiColorStr(colorindex));
908  pItem->addChannel(ChannelX);
909  pItem->addChannel((*it)->getObject(CCopasiObjectName("Reference=Weighted Error"))->getCN());
910  }
911  }
912  }
913 
914  return pPlotSpecification;
915  }
916  break;
917 
918  case 913:
919  {
920  CPlotSpecification * pPlotSpecification = NULL;
921  CCopasiTask * pTask = (*pDataModel->getTaskList())["Parameter Estimation"];
922 
923  if (pTask == NULL) return NULL;
924 
925  CFitProblem * pFitProblem = dynamic_cast< CFitProblem * >(pTask->getProblem());
926 
927  if (pFitProblem == NULL) return NULL;
928 
929  // const C_FLOAT64 & SolutionValue = pFitProblem->getSolutionValue();
930 
931  data2 = static_cast< const CCopasiObject * >(pFitProblem->getObject(CCopasiObjectName("Reference=Function Evaluations")));
932  data1.clear();
933  data1.push_back(static_cast< const CCopasiObject * >(pFitProblem->getObject(CCopasiObjectName("Reference=Best Value"))));
934 
935  pPlotSpecification =
936  createPlot("Progress of Fit" , data2, false, data1, false, getItem(id).mTaskType, pDataModel);
937 
938  if (pPlotSpecification != NULL)
939  {
940  pPlotSpecification->setLogY(true);
941  CCopasiVector< CPlotItem > & Items = pPlotSpecification->getItems();
944 
945  while (itItem != endItem)
946  {
947  (*itItem)->setTitle("sum of squares");
948  (*itItem)->setActivity(COutputInterface::DURING);
949  (*itItem++)->setValue("Line type", (unsigned C_INT32) 0);
950  }
951  }
952 
953  return pPlotSpecification;
954  }
955  break;
956 
957  case 914:
958  {
959  CPlotSpecification * pPlotSpecification = NULL;
960  CCopasiTask * pTask = (*pDataModel->getTaskList())["Optimization"];
961 
962  if (pTask == NULL) return NULL;
963 
964  COptProblem * pOptProblem = dynamic_cast< COptProblem * >(pTask->getProblem());
965 
966  if (pOptProblem == NULL) return NULL;
967 
968  // const C_FLOAT64 & SolutionValue = pFitProblem->getSolutionValue();
969 
970  data2 = static_cast< const CCopasiObject * >(pOptProblem->getObject(CCopasiObjectName("Reference=Function Evaluations")));
971 
972  data1.clear();
973  data1.push_back(static_cast< const CCopasiObject * >(pOptProblem->getObject(CCopasiObjectName("Reference=Best Value"))));
974 
975  pPlotSpecification =
976  createPlot("Progress of Optimization" , data2, false, data1, false, getItem(id).mTaskType, pDataModel);
977 
978  if (pPlotSpecification != NULL)
979  {
980  pPlotSpecification->setLogY(true);
981  CCopasiVector< CPlotItem > & Items = pPlotSpecification->getItems();
984 
985  while (itItem != endItem)
986  {
987  (*itItem)->setTitle("target function");
988  (*itItem)->setActivity(COutputInterface::DURING);
989  (*itItem++)->setValue("Line type", (unsigned C_INT32) 0);
990  }
991  }
992 
993  return pPlotSpecification;
994  }
995  break;
996  }
997 
998  //now deal with the systematically numbered cases
999  bool isReport = (id >= 1000);
1000  C_INT32 idMod = id % 200;
1001  bool logY = false; //this is onyl used for plots; it indicates whether the y axis is plotted logarithmically
1002 
1003  const CCopasiObject* pTime = static_cast< const CCopasiObject * >(pModel->getObject(CCopasiObjectName("Reference=Time")));
1004 
1005  switch (idMod)
1006  {
1007  case 0:
1008  data1 =
1010  tmpdata =
1012  data1.insert(data1.end(), tmpdata.begin(), tmpdata.end());
1013  tmpdata =
1015  data1.insert(data1.end(), tmpdata.begin(), tmpdata.end());
1016  break;
1017 
1018  case 1:
1019  data1 =
1021  tmpdata =
1023  data1.insert(data1.end(), tmpdata.begin(), tmpdata.end());
1024  tmpdata =
1026  data1.insert(data1.end(), tmpdata.begin(), tmpdata.end());
1027  break;
1028 
1029  case 2:
1030  data1 =
1032  tmpdata =
1034  data1.insert(data1.end(), tmpdata.begin(), tmpdata.end());
1035  tmpdata =
1037  data1.insert(data1.end(), tmpdata.begin(), tmpdata.end());
1038  break;
1039 
1040  case 3:
1041  data1 =
1043  tmpdata =
1045  data1.insert(data1.end(), tmpdata.begin(), tmpdata.end());
1046  tmpdata =
1048  data1.insert(data1.end(), tmpdata.begin(), tmpdata.end());
1049  break;
1050 
1051  case 4:
1052  data1 =
1054  tmpdata =
1056  data1.insert(data1.end(), tmpdata.begin(), tmpdata.end());
1057  tmpdata =
1059  data1.insert(data1.end(), tmpdata.begin(), tmpdata.end());
1060  break;
1061 
1062  case 5:
1063  data1 =
1065  tmpdata =
1067  data1.insert(data1.end(), tmpdata.begin(), tmpdata.end());
1068  tmpdata =
1070  data1.insert(data1.end(), tmpdata.begin(), tmpdata.end());
1071  break;
1072 
1073  case 6:
1074  data1 =
1076  break;
1077 
1078  case 7:
1079  data1 =
1081  break;
1082 
1083  case 8:
1084  data1 =
1086  tmpdata =
1088  data1.insert(data1.end(), tmpdata.begin(), tmpdata.end());
1089  tmpdata =
1091  data1.insert(data1.end(), tmpdata.begin(), tmpdata.end());
1092  tmpdata =
1094  data1.insert(data1.end(), tmpdata.begin(), tmpdata.end());
1095  tmpdata =
1097  data1.insert(data1.end(), tmpdata.begin(), tmpdata.end());
1098  tmpdata =
1100  data1.insert(data1.end(), tmpdata.begin(), tmpdata.end());
1101  tmpdata =
1103  data1.insert(data1.end(), tmpdata.begin(), tmpdata.end());
1104  tmpdata =
1106  data1.insert(data1.end(), tmpdata.begin(), tmpdata.end());
1107  break;
1108 
1109  case 9:
1110  data1 =
1112  tmpdata =
1114  data1.insert(data1.end(), tmpdata.begin(), tmpdata.end());
1115  tmpdata =
1117  data1.insert(data1.end(), tmpdata.begin(), tmpdata.end());
1118  tmpdata =
1120  data1.insert(data1.end(), tmpdata.begin(), tmpdata.end());
1121  tmpdata =
1123  data1.insert(data1.end(), tmpdata.begin(), tmpdata.end());
1124  tmpdata =
1126  data1.insert(data1.end(), tmpdata.begin(), tmpdata.end());
1127  tmpdata =
1129  data1.insert(data1.end(), tmpdata.begin(), tmpdata.end());
1130  tmpdata =
1132  data1.insert(data1.end(), tmpdata.begin(), tmpdata.end());
1133  break;
1134 
1135  case 50:
1136  data1 =
1138  tmpdata =
1140  data1.insert(data1.end(), tmpdata.begin(), tmpdata.end());
1141  break;
1142 
1143  case 51: //parameter estimation target function
1144  {
1145  CCopasiTask * pTask = (*pDataModel->getTaskList())["Parameter Estimation"];
1146 
1147  if (pTask == NULL) break;
1148 
1149  CFitProblem * pFitProblem = dynamic_cast< CFitProblem * >(pTask->getProblem());
1150 
1151  if (pFitProblem == NULL) break;
1152 
1153  data1.push_back(static_cast< const CCopasiObject * >(pFitProblem->getObject(CCopasiObjectName("Reference=Best Value"))));
1154  logY = true;
1155  }
1156  break;
1157 
1158  case 52: //optimization target function
1159  {
1160  CCopasiTask * pTask = (*pDataModel->getTaskList())["Optimization"];
1161 
1162  if (pTask == NULL) break;
1163 
1164  COptProblem * pOptProblem = dynamic_cast< COptProblem * >(pTask->getProblem());
1165 
1166  if (pOptProblem == NULL) break;
1167 
1168  data1.push_back(static_cast< const CCopasiObject * >(pOptProblem->getObject(CCopasiObjectName("Reference=Best Value"))));
1169  }
1170  break;
1171  }
1172 
1173  if (isReport)
1174  {
1175  data1.insert(data1.begin(), pTime); //in any case, add time to the report
1176 
1177  if (1200 <= id && id < 1300) //we need to add the scan parameters
1178  {
1179  tmpdata.clear();
1180  CScanProblem* pSP = dynamic_cast<CScanProblem*>(task->getProblem());
1181 
1182  if (pSP) //we really have a scan problem
1183  {
1184  size_t num_scanitems = pSP->getNumberOfScanItems();
1185  size_t i;
1186 
1187  for (i = 0; i < num_scanitems; ++i)
1188  {
1189  std::string tmpString = * pSP->getScanItem(i)->getValue("Object").pCN;
1190 
1191  if (tmpString.size()) //the scan item references an object, this is the scan parameter
1192  {
1193  CCopasiDataModel* pDataModel = pSP->getObjectDataModel();
1194  assert(pDataModel != NULL);
1195  const CCopasiObject * tmpObject = pDataModel->getDataObject(tmpString);
1196 
1197  if (tmpObject)
1198  tmpdata.push_back(tmpObject);
1199  }
1200  }
1201 
1202  data1.insert(data1.begin(), tmpdata.begin(), tmpdata.end());
1203  }
1204  }
1205 
1206  CReportDefinition* pReportDef = createTable(getItemName(id), data1, getItem(id).description, getItem(id).mTaskType, pDataModel);
1207 
1208  if (activate && pReportDef)
1209  {
1210  task->getReport().setReportDefinition(pReportDef);
1211  //TODO: also set a default filename?
1212  }
1213 
1214  return pReportDef;
1215  }
1216  else //plot
1217  {
1218  bool logX = false;
1219 
1220  if (200 <= id && id < 300) //we need to find the inner scan item for the x-axis
1221  {
1222  data2 = NULL;
1223  CScanProblem* pSP = dynamic_cast<CScanProblem*>(task->getProblem());
1224 
1225  if (pSP) //we really have a scan problem
1226  {
1227  size_t num_scanitems = pSP->getNumberOfScanItems();
1228  size_t i;
1229 
1230  for (i = 0; i < num_scanitems; ++i)
1231  {
1232  std::string tmpString = * pSP->getScanItem(i)->getValue("Object").pCN;
1233 
1234  if (tmpString.size()) //the scan item references an object, this is the scan parameter
1235  {
1236  CCopasiDataModel* pDataModel = pSP->getObjectDataModel();
1237  assert(pDataModel != NULL);
1238  const CCopasiObject * tmpObject = pDataModel->getDataObject(tmpString);
1239 
1240  if (tmpObject)
1241  {
1242  data2 = tmpObject; //we only keep the last scan parameter we find, this is the innermost loop.
1243  logX = *(pSP->getScanItem(i)->getValue("log").pBOOL);
1244  }
1245  }
1246  }
1247  }
1248  }
1249  else //time is on the x-axis
1250  {
1251  data2 = pTime;
1252  }
1253 
1254  return createPlot(getItemName(id), data2, logX, data1, logY, getItem(id).mTaskType, pDataModel, task);
1255  }
1256 
1257  return NULL;
1258 }
CCopasiDataModel * getObjectDataModel()
CCopasiObject * getDataObject(const CCopasiObjectName &CN) const
virtual std::string getObjectDisplayName(bool regular=true, bool richtext=false) const
static std::vector< const CCopasiObject * > getListOfConstObjects(ListType t, const CModel *model)
CCopasiProblem * getProblem()
virtual CCopasiObjectName getCN() const
const std::string & getObjectName() const
static std::string getCopasiColorStr(size_t index)
Definition: CPlotColors.cpp:17
static CReportDefinition * createTable(const std::string &name, const std::vector< const CCopasiObject * > &d, const std::string &comment, const CCopasiTask::Type &taskType, CCopasiDataModel *pDataModel)
virtual size_t size() const
iterator begin()
static CPlotSpecification * createPlot(const std::string &name, const CCopasiObject *x, bool logX, const std::vector< const CCopasiObject * > &y, bool logY, const CCopasiTask::Type &taskType, CCopasiDataModel *pDataModel, CCopasiTask *task=NULL)
void addChannel(const CPlotDataChannelSpec &channel)
Definition: CPlotItem.cpp:223
static const std::string & getItemName(C_INT32 id)
const CExperimentSet & getExperiementSet() const
void setActivity(const COutputInterface::Activity &activity)
Definition: CPlotItem.cpp:161
CExperiment * getExperiment(const size_t &index)
size_t getNumberOfScanItems() const
#define C_INT32
Definition: copasi.h:90
CPlotItem * createItem(const std::string &name, CPlotItem::Type type)
CRegisteredObjectName * pCN
const CCopasiVector< CFittingPoint > & getFittingPoints() const
CTSSATask * pTask
iterator end()
CCopasiVectorN< CCopasiTask > * getTaskList()
bool setValue(const std::string &name, const CType &value)
CPlotSpecification * createPlotSpec(const std::string &name, CPlotItem::Type type=CPlotItem::plot2d)
const CCopasiTask::Type & getExperimentType() const
const COutputDefinitionVector * getPlotDefinitionList() const
CReport & getReport()
const CCopasiVector< CPlotItem > & getItems() const
CCopasiTask::Type mTaskType
static const CDefaultOutputDescription & getItem(C_INT32 id)
const CCopasiParameter::Value & getValue(const std::string &name) const
virtual const CObjectInterface * getObject(const CCopasiObjectName &cn) const
const CCopasiParameterGroup * getScanItem(size_t index) const
Definition: CModel.h:50
virtual const CObjectInterface * getObject(const CCopasiObjectName &cn) const
void setReportDefinition(CReportDefinition *reportDef)
Definition: CReport.cpp:86
CModel * getModel() const
size_t getExperimentCount() const
CPlotSpecification * COutputAssistant::createPlot ( const std::string &  name,
const CCopasiObject x,
bool  logX,
const std::vector< const CCopasiObject * > &  y,
bool  logY,
const CCopasiTask::Type taskType,
CCopasiDataModel pDataModel,
CCopasiTask task = NULL 
)
staticprivate

Definition at line 1263 of file COutputAssistant.cpp.

References CPlotItem::addChannel(), C_INT32, CPlotSpecification::createItem(), COutputDefinitionVector::createPlotSpec(), CCopasiTask::crosssection, CPlotItem::curve2d, CCopasiObject::getCN(), CCopasiObject::getObjectDisplayName(), CCopasiDataModel::getPlotDefinitionList(), CCopasiTask::getProblem(), CScanProblem::getSubtask(), CCopasiTask::getType(), CPlotItem::plot2d, CPlotSpecification::setLogX(), CPlotSpecification::setLogY(), and CCopasiParameterGroup::setValue().

Referenced by createDefaultOutput().

1271 {
1272  if (!x) return NULL;
1273 
1274  std::vector<const CCopasiObject *>::const_iterator it, itEnd = y.end();
1275 
1276  //create plot with unique name
1277  unsigned C_INT32 i = 0;
1278  CPlotSpecification* pPl;
1279  std::ostringstream sname;
1280  sname << name;
1281  assert(pDataModel != NULL);
1282 
1283  while (!(pPl = pDataModel->getPlotDefinitionList()->createPlotSpec(sname.str(),
1285  {
1286  i++;
1287  sname.str("");
1288  sname << name << "_" << i;
1289  }
1290 
1291  // Set the task type
1292  // :TODO: This is currently not implemented for plots.
1293 
1294  //create curves
1295 
1296  CPlotDataChannelSpec name1 = x->getCN();
1297  CPlotDataChannelSpec name2;
1298  std::string itemTitle;
1299  CPlotItem * plItem;
1300 
1301  CScanProblem* problem = task != NULL ? dynamic_cast<CScanProblem*>(task->getProblem()) : NULL;
1302  bool isCrossSection = (problem != NULL && problem->getSubtask() == CCopasiTask::crosssection) ||
1303  (task != NULL && task->getType() == CCopasiTask::crosssection);
1304 
1305  for (it = y.begin(); it != itEnd; ++it)
1306  {
1307  if (!(*it)) continue;
1308 
1309  name2 = (*it)->getCN();
1310  itemTitle = static_cast< const CCopasiObject *>(*it)->getObjectDisplayName();
1311 
1312  plItem = pPl->createItem(itemTitle, CPlotItem::curve2d);
1313  plItem->addChannel(name1);
1314  plItem->addChannel(name2);
1315 
1316  if (isCrossSection)
1317  {
1318  // disable line
1319  plItem->setValue("Line type", (unsigned int) 2); // use symbols
1320  plItem->setValue("Symbol subtype", (unsigned int)2); // use symbols
1321  }
1322  }
1323 
1324  pPl->setLogX(logX);
1325  pPl->setLogY(logY);
1326  return pPl;
1327 }
virtual std::string getObjectDisplayName(bool regular=true, bool richtext=false) const
CCopasiProblem * getProblem()
virtual CCopasiObjectName getCN() const
void addChannel(const CPlotDataChannelSpec &channel)
Definition: CPlotItem.cpp:223
#define C_INT32
Definition: copasi.h:90
CPlotItem * createItem(const std::string &name, CPlotItem::Type type)
bool setValue(const std::string &name, const CType &value)
CPlotSpecification * createPlotSpec(const std::string &name, CPlotItem::Type type=CPlotItem::plot2d)
const COutputDefinitionVector * getPlotDefinitionList() const
Type getType() const
CCopasiTask::Type getSubtask() const
CReportDefinition * COutputAssistant::createTable ( const std::string &  name,
const std::vector< const CCopasiObject * > &  d,
const std::string &  comment,
const CCopasiTask::Type taskType,
CCopasiDataModel pDataModel 
)
staticprivate

Definition at line 1330 of file COutputAssistant.cpp.

References C_INT32, CReportDefinitionVector::createReportDefinition(), CCopasiDataModel::getReportDefinitionList(), CReportDefinition::getTableAddr(), CReportDefinition::setIsTable(), CReportDefinition::setSeparator(), and CReportDefinition::setTaskType().

1335 {
1336  std::vector<const CCopasiObject * >::const_iterator it, itEnd = d.end();
1337 
1338  //create plot with unique name
1339  unsigned C_INT32 i = 0;
1340  CReportDefinition * pReport = NULL;
1341  std::ostringstream sname;
1342  sname << name;
1343  assert(pDataModel != NULL);
1344 
1345  while (!(pReport = pDataModel->getReportDefinitionList()->createReportDefinition(sname.str(), comment)))
1346  {
1347  i++;
1348  sname.str("");
1349  sname << name << "_" << i;
1350  }
1351 
1352  // Set the task type
1353  pReport->setTaskType(taskType);
1354 
1355  pReport->setIsTable(true);
1356  pReport->setSeparator(CCopasiReportSeparator("\t"));
1357 
1358  for (it = d.begin(); it != itEnd; ++it)
1359  {
1360  if (!(*it)) continue;
1361 
1362  pReport->getTableAddr()->push_back((*it)->getCN());
1363  }
1364 
1365  return pReport;
1366 }
bool setTaskType(const CCopasiTask::Type &taskType)
void setSeparator(const CCopasiReportSeparator &Separator)
#define C_INT32
Definition: copasi.h:90
void setIsTable(bool table)
const CReportDefinitionVector * getReportDefinitionList() const
std::vector< CRegisteredObjectName > * getTableAddr()
CReportDefinition * createReportDefinition(const std::string &name, const std::string &comment)
C_INT32 COutputAssistant::getDefaultPlotIndex ( const CCopasiProblem problem)
static

get an index of a default plot that is recommended for the given problem. If no such plot exists, -1 is returned

Definition at line 114 of file COutputAssistant.cpp.

References CCopasiProblem::getType(), CCopasiTask::steadyState, and CCopasiTask::timeCourse.

115 {
116  if (!problem) return - 1;
117 
118  switch (problem->getType())
119  {
121  return 0;
122 
124  return 0;
125 
126  default:
127  return - 1;
128  }
129 }
const CCopasiTask::Type & getType() const
C_INT32 COutputAssistant::getDefaultReportIndex ( const CCopasiProblem problem)
static

get an index of a default output report that is recommended for the given problem. If no such report exists, -1 is returned

Definition at line 79 of file COutputAssistant.cpp.

References CCopasiProblem::getType(), CCopasiTask::steadyState, and CCopasiTask::timeCourse.

80 {
81  if (!problem) return - 1;
82 
83  switch (problem->getType())
84  {
86  return 1000;
87 
89  return 1000;
90 
91  default:
92  return - 1;
93  }
94 }
const CCopasiTask::Type & getType() const
const CDefaultOutputDescription & COutputAssistant::getItem ( C_INT32  id)
static

get complete description of output definition with index id.

Definition at line 143 of file COutputAssistant.cpp.

References emptyItem, and mMap.

Referenced by createDefaultOutput(), and DefaultPlotDialog::slotSelect().

144 {
145  Map::const_iterator it = mMap.find(id);
146 
147  if (it == mMap.end())
148  return emptyItem;
149  else
150  return it->second;
151 }
static const CDefaultOutputDescription emptyItem
const std::string & COutputAssistant::getItemName ( C_INT32  id)
static

get title of output definition with index id.

Definition at line 132 of file COutputAssistant.cpp.

References emptyString, and mMap.

Referenced by createDefaultOutput(), DefaultPlotDialog::fillList(), and DefaultPlotDialog::slotSelect().

133 {
134  Map::const_iterator it = mMap.find(id);
135 
136  if (it == mMap.end())
137  return emptyString;
138  else
139  return it->second.name;
140 }
static const std::string emptyString
std::vector< C_INT32 > COutputAssistant::getListOfDefaultOutputDescriptions ( const CCopasiTask task = NULL)
static

get a list of indices of output definitions that are suitable for the problem. If problem=NULL (default) all indices in the map are returned.

Definition at line 45 of file COutputAssistant.cpp.

References CCopasiTask::crosssection, CCopasiTask::getType(), initialize(), mMap, CCopasiTask::timeCourse, and CCopasiTask::unset.

Referenced by DefaultPlotDialog::fillList(), and Arguments::prepareModel().

46 {
47  //initializes the map on first call only
48  initialize();
49 
50  std::vector<C_INT32> ret;
51 
52  //problem = NULL; //DEBUG only!!!
53 
54  //if (!problem) //generate full list
55  // {
56 
57  Map::const_iterator it, itEnd = mMap.end();
58 
59  for (it = mMap.begin(); it != itEnd; ++it)
60  {
61  if (!task) //if no task is specified add all descriptions
62  {
63  ret.push_back(it->first);
64  }
65  else if (task->getType() == it->second.mTaskType || it->second.mTaskType == CCopasiTask::unset ||
66  (task->getType() == CCopasiTask::crosssection && it->second.mTaskType == CCopasiTask::timeCourse)
67  )
68  //add descriptions with matching task type
69  {
70  //if (secondaryTask matches) TODO
71  ret.push_back(it->first);
72  }
73  }
74 
75  return ret;
76 }
static bool initialize()
Type getType() const
bool COutputAssistant::initialize ( )
staticprivate

numbering scheme:

0-99: time course plots 200-299: plots with scan parameter on x-axis

above 1000: reports

1000-1099: reports with time and some other variables 1200-1299: reports with scan parameters and some other variables

the meaning of the last two digits should be the same in all those cases.

Special plots, e.g. for parameter estimation, use numbers 900-998.

Definition at line 170 of file COutputAssistant.cpp.

References mMap, CCopasiTask::optimization, CCopasiTask::parameterFitting, CCopasiTask::scan, CCopasiTask::steadyState, CCopasiTask::timeCourse, and CCopasiTask::unset.

Referenced by getListOfDefaultOutputDescriptions().

171 {
172  //if map is already constructed do nothing
173  if (mMap.size()) return true;
174 
175  std::pair<C_INT32, CDefaultOutputDescription> tmp;
176 
177  //first the plots
178  tmp.first = -1;
179  tmp.second.name = "-- Plots";
180  tmp.second.description = "";
181  tmp.second.isPlot = true;
182  tmp.second.mTaskType = CCopasiTask::unset;
183  mMap.insert(tmp);
184 
185  //concentrations plot
186  tmp.first = 0;
187  tmp.second.name = "Concentrations, Volumes, and Global Quantity Values";
188  tmp.second.description = "A plot of the variable species concentrations, variable compartment volumes, and variable global quantity values vs. time.";
189  tmp.second.isPlot = true;
190  tmp.second.mTaskType = CCopasiTask::timeCourse;
191  mMap.insert(tmp);
192 
193  //particle numbers plot
194  tmp.first = 1;
195  tmp.second.name = "Particle Numbers, Volumes, and Global Quantity Values";
196  tmp.second.description = "A plot of the variable species particle numbers, variable compartment volumes, and variable global quantity values vs. time.";
197  tmp.second.isPlot = true;
198  tmp.second.mTaskType = CCopasiTask::timeCourse;
199  mMap.insert(tmp);
200 
201  //complete concentrations plot
202  tmp.first = 2;
203  tmp.second.name = "Complete Concentrations, Volumes, and Global Quantity Values";
204  tmp.second.description = "A plot of all the species concentrations, compartment volumes, and all global quantity values vs. time (includes fixed ones).";
205  tmp.second.isPlot = true;
206  tmp.second.mTaskType = CCopasiTask::timeCourse;
207  mMap.insert(tmp);
208 
209  //complete particle numbers plot
210  tmp.first = 3;
211  tmp.second.name = "Complete Particle Numbers, Volumes, and Global Quantity Values";
212  tmp.second.description = "A plot of all the species particle numbers, compartment volumes, and global quantity values vs. time (includes fixed ones).";
213  tmp.second.isPlot = true;
214  tmp.second.mTaskType = CCopasiTask::timeCourse;
215  mMap.insert(tmp);
216 
217  //concentration rate plot
218  tmp.first = 4;
219  tmp.second.name = "Concentration Rates, Volume Rates, and Global Quantity Rates";
220  tmp.second.description = "A plot of the rate of change of concentrations of species, compartment volume, and global quantities, which are determined by ODEs or reactions vs. time.";
221  tmp.second.isPlot = true;
222  tmp.second.mTaskType = CCopasiTask::timeCourse;
223  mMap.insert(tmp);
224 
225  //particle rate plot
226  tmp.first = 5;
227  tmp.second.name = "Particle Number Rates, Volume Rates, and Global Quantity Rates";
228  tmp.second.description = "A plot of the rate of change of particle numbers of all species, compartment volume, and global quantities, which are determined by ODEs or reactions vs. time.";
229  tmp.second.isPlot = true;
230  tmp.second.mTaskType = CCopasiTask::timeCourse;
231  mMap.insert(tmp);
232 
233  //reaction particle flux
234  tmp.first = 6;
235  tmp.second.name = "Reaction Fluxes";
236  tmp.second.description = "A plot of the fluxes of all reactions vs. time, in concentration/time unit.";
237  tmp.second.isPlot = true;
238  tmp.second.mTaskType = CCopasiTask::timeCourse;
239  mMap.insert(tmp);
240 
241  //reaction particle flux
242  tmp.first = 7;
243  tmp.second.name = "Reaction Event Fluxes";
244  tmp.second.description = "A plot of the fluxes of all reactions vs. time, in reaction events/time unit.";
245  tmp.second.isPlot = true;
246  tmp.second.mTaskType = CCopasiTask::timeCourse;
247  mMap.insert(tmp);
248 
249  //fitting result plots
250  tmp.first = 910;
251  tmp.second.name = "Parameter Estimation Result";
252  tmp.second.description = "Curves of all dependent values of all experiments are created in one plot. For each dependent value the experimental data, the fitted curve, and the weighted error are shown.";
253  tmp.second.isPlot = true;
254  tmp.second.mTaskType = CCopasiTask::parameterFitting;
255  mMap.insert(tmp);
256 
257  //fitting result plots
258  tmp.first = 911;
259  tmp.second.name = "Plots of Parameter Estimation Results per Experiment";
260  tmp.second.description = "For each experiment of the parameter estimation a plot is created. Each plot contains the experimental data, the fitted curve, and the weighted error for each dependent value.";
261  tmp.second.isPlot = true;
262  tmp.second.mTaskType = CCopasiTask::parameterFitting;
263  mMap.insert(tmp);
264 
265  //fitting result plots
266  tmp.first = 912;
267  tmp.second.name = "Plots of Parameter Estimation Results per Dependent Value";
268  tmp.second.description = "For each dependent value of the parameter estimation a plot is created. Each plot contains the experimental data, the fitted curves, and the weighted errors for each experiment a dependent value occurs.";
269  tmp.second.isPlot = true;
270  tmp.second.mTaskType = CCopasiTask::parameterFitting;
271  mMap.insert(tmp);
272 
273  //fitting result plots
274  tmp.first = 913;
275  tmp.second.name = "Progress of Fit";
276  tmp.second.description = "Plot of the sum of squares of residuals vs. number of function evaluations (for parameter estimation).";
277  tmp.second.isPlot = true;
278  tmp.second.mTaskType = CCopasiTask::parameterFitting;
279  mMap.insert(tmp);
280 
281  //opt result plots
282  tmp.first = 914;
283  tmp.second.name = "Progress of Optimization";
284  tmp.second.description = "Plot of the target function vs. number of function evaluations (for optimization).";
285  tmp.second.isPlot = true;
286  tmp.second.mTaskType = CCopasiTask::optimization;
287  mMap.insert(tmp);
288 
289  //empty plot
290  tmp.first = 998;
291  tmp.second.name = "Create New";
292  tmp.second.description = "A plot with nothing in it.";
293  tmp.second.isPlot = true;
294  tmp.second.mTaskType = CCopasiTask::unset;
295  mMap.insert(tmp);
296 
297  // *****************************************************************
298 
299  //concentrations plot
300  tmp.first = 200;
301  tmp.second.name = "Scan of Concentrations, Volumes, and Global Quantity Values";
302  tmp.second.description = "A plot of the variable species concentrations, variable compartment volumes, and variable global quantity values vs. innermost scan parameter.";
303  tmp.second.isPlot = true;
304  tmp.second.mTaskType = CCopasiTask::scan;
305  mMap.insert(tmp);
306 
307  //particle numbers plot
308  tmp.first = 201;
309  tmp.second.name = "Scan of Particle Numbers, Volumes, and Global Quantity Values";
310  tmp.second.description = "A plot of the variable species particle numbers, variable compartment volumes, and variable global quantity values vs. innermost scan parameter.";
311  tmp.second.isPlot = true;
312  tmp.second.mTaskType = CCopasiTask::scan;
313  mMap.insert(tmp);
314 
315  //complete concentrations plot
316  tmp.first = 202;
317  tmp.second.name = "Scan of Complete Concentrations, Volumes, and Global Quantity Values";
318  tmp.second.description = "A plot of all the species concentrations, compartment volumes, and all global quantity values vs. innermost scan parameter (includes fixed ones).";
319  tmp.second.isPlot = true;
320  tmp.second.mTaskType = CCopasiTask::scan;
321  mMap.insert(tmp);
322 
323  //complete particle numbers plot
324  tmp.first = 203;
325  tmp.second.name = "Scan of Complete Particle Numbers, Volumes, and Global Quantity Values";
326  tmp.second.description = "A plot of all the species particle numbers, compartment volumes, and global quantity values vs. innermost scan parameter (includes fixed ones).";
327  tmp.second.isPlot = true;
328  tmp.second.mTaskType = CCopasiTask::scan;
329  mMap.insert(tmp);
330 
331  //concentration rate plot
332  tmp.first = 204;
333  tmp.second.name = "Scan of Concentration Rates, Volume Rates, and Global Quantity Rates";
334  tmp.second.description = "A plot of the rate of change of concentrations of species, compartment volume, and global quantities, which are determined by ODEs or reactions vs. innermost scan parameter.";
335  tmp.second.isPlot = true;
336  tmp.second.mTaskType = CCopasiTask::scan;
337  mMap.insert(tmp);
338 
339  //particle rate plot
340  tmp.first = 205;
341  tmp.second.name = "Scan of Particle Number Rates, Volume Rates, and Global Quantity Rates";
342  tmp.second.description = "A plot of the rate of change of particle numbers of all species, compartment volume, and global quantities, which are determined by ODEs or reactions vs. innermost scan parameter.";
343  tmp.second.isPlot = true;
344  tmp.second.mTaskType = CCopasiTask::scan;
345  mMap.insert(tmp);
346 
347  //reaction particle flux
348  tmp.first = 206;
349  tmp.second.name = "Scan of Reaction Fluxes";
350  tmp.second.description = "A plot of the fluxes of all reactions vs. innermost scan parameter, in concentration/time unit.";
351  tmp.second.isPlot = true;
352  tmp.second.mTaskType = CCopasiTask::scan;
353  mMap.insert(tmp);
354 
355  //reaction particle flux
356  tmp.first = 207;
357  tmp.second.name = "Scan of Reaction Event Fluxes";
358  tmp.second.description = "A plot of the fluxes of all reactions vs. innermost scan parameter, in reaction events/time unit.";
359  tmp.second.isPlot = true;
360  tmp.second.mTaskType = CCopasiTask::scan;
361  mMap.insert(tmp);
362 
363  //eigenvalues plot
364  tmp.first = 250;
365  tmp.second.name = "Eigenvalues vs. scan parameter";
366  tmp.second.description = "A plot of the real and imaginary parts of the eigenvalues of the Jacobian as a function of the innermost scan parameter.";
367  tmp.second.isPlot = true;
368  tmp.second.mTaskType = CCopasiTask::scan;
369  tmp.second.mSecondaryTask = CCopasiTask::steadyState;
370  mMap.insert(tmp);
371 
372  //parameter estimation residuals plot
373  tmp.first = 251;
374  tmp.second.name = "Parameter estimation target function vs. scan parameter";
375  tmp.second.description = "A plot of the target function of parameter estimation as a function of the innermost scan parameter.";
376  tmp.second.isPlot = true;
377  tmp.second.mTaskType = CCopasiTask::scan;
378  tmp.second.mSecondaryTask = CCopasiTask::parameterFitting;
379  mMap.insert(tmp);
380 
381  //optimization residuals plot
382  tmp.first = 252;
383  tmp.second.name = "Optimization target function vs. scan parameter";
384  tmp.second.description = "A plot of the target function of optimization as a function of the innermost scan parameter.";
385  tmp.second.isPlot = true;
386  tmp.second.mTaskType = CCopasiTask::scan;
387  tmp.second.mSecondaryTask = CCopasiTask::optimization;
388  mMap.insert(tmp);
389 
390  // *****************************************************************
391 
392  //now the reports
393  tmp.first = 999;
394  tmp.second.name = "-- Reports";
395  tmp.second.description = "";
396  tmp.second.isPlot = true;
397  tmp.second.mTaskType = CCopasiTask::unset;
398  mMap.insert(tmp);
399 
400  //concentrations report
401  tmp.first = 1000;
402  tmp.second.name = "Time, Concentrations, Volumes, and Global Quantity Values";
403  tmp.second.description = "A table of time, variable species concentrations, variable compartment volumes, and variable global quantity values.";
404  tmp.second.isPlot = false; //report
405  tmp.second.mTaskType = CCopasiTask::timeCourse;
406  mMap.insert(tmp);
407 
408  tmp.first = 1001;
409  tmp.second.name = "Time, Particle Numbers, Volumes, and Global Quantity Values";
410  tmp.second.description = "A table of time, variable species particle numbers, variable compartment volumes, and variable global quantity values.";
411  tmp.second.isPlot = false; //report
412  tmp.second.mTaskType = CCopasiTask::timeCourse;
413  mMap.insert(tmp);
414 
415  tmp.first = 1002;
416  tmp.second.name = "Complete Time, Concentrations, Volumes, and Global Quantity Values";
417  tmp.second.description = "A table of time, all species concentrations, all compartment volumes, and all global quantity values (includes fixed ones).";
418  tmp.second.isPlot = false; //report
419  tmp.second.mTaskType = CCopasiTask::timeCourse;
420  mMap.insert(tmp);
421 
422  tmp.first = 1003;
423  tmp.second.name = "Complete Time, Particle Numbers, Volumes, and Global Quantity Values";
424  tmp.second.description = "A table of time, all species particle numbers, all compartment volumes, and all global quantity values (includes fixed ones).";
425  tmp.second.isPlot = false; //report
426  tmp.second.mTaskType = CCopasiTask::timeCourse;
427  mMap.insert(tmp);
428 
429  tmp.first = 1004;
430  tmp.second.name = "Time, Concentration Rates, Volume Rates, and Global Quantity Rates";
431  tmp.second.description = "A table of time and the rate of change of concentrations of species, compartment volumes, and global quantities which are determined by reactions or ODEs.";
432  tmp.second.isPlot = false; //report
433  tmp.second.mTaskType = CCopasiTask::timeCourse;
434  mMap.insert(tmp); //not possible at the moment
435 
436  tmp.first = 1005;
437  tmp.second.name = "Time, Particle Numbers Rates, Volume Rates, and Global Quantity Rates";
438  tmp.second.description = "A table of time and the rate of change of particle numbers of species, compartment volumes, and global quantities which are determined by reactions or ODEs.";
439  tmp.second.isPlot = false; //report
440  tmp.second.mTaskType = CCopasiTask::timeCourse;
441  mMap.insert(tmp);
442 
443  tmp.first = 1006;
444  tmp.second.name = "Time and Reaction Fluxes";
445  tmp.second.description = "A table of the fluxes of all reactions and time, in concentration/time unit.";
446  tmp.second.isPlot = false; //report
447  tmp.second.mTaskType = CCopasiTask::timeCourse;
448  mMap.insert(tmp);
449 
450  tmp.first = 1007;
451  tmp.second.name = "Time and Reaction Event Fluxes";
452  tmp.second.description = "A table of the fluxes of all reactions and time, in reaction events/time unit.";
453  tmp.second.isPlot = false; //report
454  tmp.second.mTaskType = CCopasiTask::timeCourse;
455  mMap.insert(tmp);
456 
457  tmp.first = 1008;
458  tmp.second.name = "Time and all Variable Values (Concentration Units)";
459  tmp.second.description = "This table includes all values which change over a time course. Species are measured in concentration unit and fluxes are in concentration/time unit.";
460  tmp.second.isPlot = false; //report
461  tmp.second.mTaskType = CCopasiTask::timeCourse;
462  mMap.insert(tmp);
463 
464  tmp.first = 1009;
465  tmp.second.name = "Time and all Variable Values (Particle Number Units)";
466  tmp.second.description = "This table includes all values which change over a time course. Species are measured in particle numbers and fluxes are in events/time unit.";
467  tmp.second.isPlot = false; //report
468  tmp.second.mTaskType = CCopasiTask::timeCourse;
469  mMap.insert(tmp);
470 
471  //concentrations report
472  tmp.first = 1200;
473  tmp.second.name = "Scan Parameters, Time, Concentrations, Volumes, and Global Quantity Values";
474  tmp.second.description = "A table of scan parameters, time, variable species concentrations, variable compartment volumes, and variable global quantity values.";
475  tmp.second.isPlot = false; //report
476  tmp.second.mTaskType = CCopasiTask::scan;
477  mMap.insert(tmp);
478 
479  tmp.first = 1201;
480  tmp.second.name = "Scan Parameters, Time, Particle Numbers, Volumes, and Global Quantity Values";
481  tmp.second.description = "A table of scan parameters, time, variable species particle numbers, variable compartment volumes, and variable global quantity values.";
482  tmp.second.isPlot = false; //report
483  tmp.second.mTaskType = CCopasiTask::scan;
484  mMap.insert(tmp);
485 
486  tmp.first = 1202;
487  tmp.second.name = "Scan Parameters, Time, Complete Concentrations, Volumes, and Global Quantity Values";
488  tmp.second.description = "A table of scan parameters, time, all species concentrations, all compartment volumes, and all global quantity values (includes fixed ones).";
489  tmp.second.isPlot = false; //report
490  tmp.second.mTaskType = CCopasiTask::scan;
491  mMap.insert(tmp);
492 
493  tmp.first = 1203;
494  tmp.second.name = "Scan Parameters, Time, Complete Particle Numbers, Volumes, and Global Quantity Values";
495  tmp.second.description = "A table of scan parameters, time, all species particle numbers, all compartment volumes, and all global quantity values (includes fixed ones).";
496  tmp.second.isPlot = false; //report
497  tmp.second.mTaskType = CCopasiTask::scan;
498  mMap.insert(tmp);
499 
500  tmp.first = 1204;
501  tmp.second.name = "Scan Parameters, Time, Concentration Rates, Volume Rates, and Global Quantity Rates";
502  tmp.second.description = "A table of scan parameters, time and the rate of change of concentrations of species, compartment volumes, and global quantities which are determined by reactions or ODEs.";
503  tmp.second.isPlot = false; //report
504  tmp.second.mTaskType = CCopasiTask::scan;
505  mMap.insert(tmp); //not possible at the moment
506 
507  tmp.first = 1205;
508  tmp.second.name = "Scan Parameters, Time, Particle Numbers Rates, Volume Rates, and Global Quantity Rates";
509  tmp.second.description = "A table of scan parameters, time and the rate of change of particle numbers of species, compartment volumes, and global quantities which are determined by reactions or ODEs.";
510  tmp.second.isPlot = false; //report
511  tmp.second.mTaskType = CCopasiTask::scan;
512  mMap.insert(tmp);
513 
514  tmp.first = 1206;
515  tmp.second.name = "Scan Parameters, Time and Reaction Fluxes";
516  tmp.second.description = "A table of scan parameters and the fluxes of all reactions and time, in concentration/time unit.";
517  tmp.second.isPlot = false; //report
518  tmp.second.mTaskType = CCopasiTask::scan;
519  mMap.insert(tmp);
520 
521  tmp.first = 1207;
522  tmp.second.name = "Scan Parameters, Time and Reaction Event Fluxes";
523  tmp.second.description = "A table of scan parameters and the fluxes of all reactions and time, in reaction events/time unit.";
524  tmp.second.isPlot = false; //report
525  tmp.second.mTaskType = CCopasiTask::scan;
526  mMap.insert(tmp);
527 
528  tmp.first = 1208;
529  tmp.second.name = "Scan Parameters, Time and all Variable Values (Concentration Units)";
530  tmp.second.description = "This table includes scan parameters and all values which change over a time course. Species are measured in concentration unit and fluxes are in concentration/time unit.";
531  tmp.second.isPlot = false; //report
532  tmp.second.mTaskType = CCopasiTask::scan;
533  mMap.insert(tmp);
534 
535  tmp.first = 1209;
536  tmp.second.name = "Scan Parameters, Time and all Variable Values (Particle Number Units)";
537  tmp.second.description = "This table includes scan parameters and all values which change over a time course. Species are measured in particle numbers and fluxes are in events/time unit.";
538  tmp.second.isPlot = false; //report
539  tmp.second.mTaskType = CCopasiTask::scan;
540  mMap.insert(tmp);
541 
542  //eigenvalues report
543  tmp.first = 1250;
544  tmp.second.name = "Scan Parameters and Eigenvalues";
545  tmp.second.description = "This table includes scan parameters and the real and imaginary parts of the eigenvalues of the reduced system's Jacobian.";
546  tmp.second.isPlot = false;
547  tmp.second.mTaskType = CCopasiTask::scan;
548  tmp.second.mSecondaryTask = CCopasiTask::steadyState;
549  mMap.insert(tmp);
550 
551  //parameter estimation target function report
552  tmp.first = 1251;
553  tmp.second.name = "Scan Parameters and Target function of parameter estimation";
554  tmp.second.description = "This table includes scan parameters and the target function of the parameter estimation.";
555  tmp.second.isPlot = false;
556  tmp.second.mTaskType = CCopasiTask::scan;
557  tmp.second.mSecondaryTask = CCopasiTask::parameterFitting;
558  mMap.insert(tmp);
559 
560  //optimization target function report
561  tmp.first = 1252;
562  tmp.second.name = "Scan Parameters and Target function of optimization";
563  tmp.second.description = "This table includes scan parameters and the target function of the optimization.";
564  tmp.second.isPlot = false;
565  tmp.second.mTaskType = CCopasiTask::scan;
566  tmp.second.mSecondaryTask = CCopasiTask::optimization;
567  mMap.insert(tmp);
568 
569  tmp.first = 1999;
570  tmp.second.name = "Create New";
571  tmp.second.description = "A table with nothing in it.";
572  tmp.second.isPlot = false; //report
573  tmp.second.mTaskType = CCopasiTask::unset;
574  mMap.insert(tmp);
575 
576  return true;
577 }

Member Data Documentation

const CDefaultOutputDescription COutputAssistant::emptyItem
staticprivate

Definition at line 128 of file COutputAssistant.h.

Referenced by getItem().

const std::string COutputAssistant::emptyString
staticprivate

Definition at line 127 of file COutputAssistant.h.

Referenced by getItemName().

COutputAssistant::Map COutputAssistant::mMap
staticprivate

The documentation for this class was generated from the following files: