COPASI API  4.16.103
Functions
COptProblem.cpp File Reference
#include <cmath>
#include "copasi.h"
#include "COptTask.h"
#include "COptProblem.h"
#include "COptItem.h"
#include "function/CFunctionDB.h"
#include "CopasiDataModel/CCopasiDataModel.h"
#include "report/CCopasiRootContainer.h"
#include "steadystate/CSteadyStateTask.h"
#include "trajectory/CTrajectoryTask.h"
#include "steadystate/CSteadyStateProblem.h"
#include "trajectory/CTrajectoryProblem.h"
#include "model/CModel.h"
#include "model/CCompartment.h"
#include "report/CCopasiObjectReference.h"
#include "report/CKeyFactory.h"
#include "utilities/CProcessReport.h"
#include "utilities/CCopasiException.h"
Include dependency graph for COptProblem.cpp:

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &os, const COptProblem &o)
 

Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const COptProblem o 
)

Output stream operator

Parameters
ostream& os
constCOptProblem & A
Returns
ostream & os

Definition at line 892 of file COptProblem.cpp.

References CCopasiTask::getDescription(), CExpression::getDisplayString(), COptProblem::mpConstraintItems, COptProblem::mpObjectiveExpression, COptProblem::mpOptItems, COptProblem::mpSubtask, and CCopasiTask::CDescription::print().

893 {
894  os << "Problem Description:" << std::endl;
895 
896  os << "Subtask: " << std::endl;
897 
898  if (o.mpSubtask)
899  o.mpSubtask->getDescription().print(&os);
900  else
901  os << "No Subtask specified.";
902 
903  os << std::endl;
904 
905  if (o.mpObjectiveExpression)
906  {
907  os << "Objective Function:" << std::endl;
908  os << " " << o.mpObjectiveExpression->getDisplayString() << std::endl;
909  os << std:: endl;
910  }
911 
912  os << "List of Optimization Items:" << std::endl;
913 
914  std::vector< COptItem * >::const_iterator itItem =
915  o.mpOptItems->begin();
916  std::vector< COptItem * >::const_iterator endItem =
917  o.mpOptItems->end();
918 
919  for (; itItem != endItem; ++itItem)
920  os << " " << **itItem << std::endl;
921 
922  itItem = o.mpConstraintItems->begin();
923  endItem = o.mpConstraintItems->end();
924 
925  for (; itItem != endItem; ++itItem)
926  os << " " << **itItem << std::endl;
927 
928  return os;
929 }
std::vector< COptItem * > * mpConstraintItems
Definition: COptProblem.h:436
const std::string & getDisplayString() const
const CDescription & getDescription() const
std::vector< COptItem * > * mpOptItems
Definition: COptProblem.h:431
CCopasiTask * mpSubtask
Definition: COptProblem.h:441
virtual void print(std::ostream *ostream) const
CExpression * mpObjectiveExpression
Definition: COptProblem.h:446