COPASI API
4.40.278
|
#include <CEFMTask.h>
Public Member Functions | |
CEFMTask (const CDataContainer *pParent, const CTaskEnum::Task &type=CTaskEnum::Task::fluxMode) | |
CEFMTask (const CEFMTask &src, const CDataContainer *pParent) | |
std::string | getFluxModeDescription (const CFluxMode &fluxMode) const |
const std::vector< CFluxMode > & | getFluxModes () const |
std::string | getInternalSpecies (const CFluxMode &fluxMode) const |
std::string | getNetReaction (const CFluxMode &fluxMode) const |
std::string | getReactionEquation (const std::map< size_t, C_FLOAT64 >::const_iterator &itReaction) const |
std::pair< C_FLOAT64, C_FLOAT64 > | getSpeciesChanges (const CFluxMode &fluxMode, const CMetab &metab) const |
virtual const CTaskEnum::Method * | getValidMethods () const |
virtual bool | initialize (const OutputFlag &of, COutputHandler *pOutputHandler, std::ostream *pOstream) |
virtual bool | process (const bool &useInitialValues) |
virtual bool | setCallBack (CProcessReportLevel callBack) |
virtual | ~CEFMTask () |
Public Member Functions inherited from CCopasiTask | |
virtual bool | applyData (const CData &data, CUndoData::CChangeSet &changes) |
CCopasiTask (const CCopasiTask &src, const CDataContainer *pParent) | |
CCopasiTask (const CDataContainer *pParent, const CTaskEnum::Task &taskType, const std::string &type="Task") | |
void | cleanup () |
virtual void | clearCallBack () |
virtual void | createUndoData (CUndoData &undoData, const CUndoData::Type &type, const CData &oldData=CData(), const CCore::Framework &framework=CCore::Framework::ParticleNumbers) const |
const CProcessReportLevel & | getCallBack () const |
const CDescription & | getDescription () const |
virtual const std::string & | getKey () const |
CMathContainer * | getMathContainer () const |
CCopasiMethod * | getMethod () |
const CCopasiMethod * | getMethod () const |
COutputHandler * | getOutputHandler () const |
const OutputFlag & | getOutputMode () const |
CCopasiProblem * | getProblem () |
const CCopasiProblem * | getProblem () const |
CReport & | getReport () |
const CReport & | getReport () const |
const CResult & | getResult () const |
CCopasiParameterGroup * | getSliders () |
CTaskEnum::Task | getType () const |
const bool & | isScheduled () const |
const bool & | isUpdateModel () const |
virtual void | output (const COutputInterface::Activity &activity) |
virtual bool | restore (const bool &updateModel=true) |
virtual void | separate (const COutputInterface::Activity &activity) |
void | setIgnoreProblemData (const bool &ignoreProblemData) |
void | setMathContainer (CMathContainer *pContainer) |
bool | setMethodType (const CTaskEnum::Method &type) |
void | setScheduled (const bool &scheduled) |
void | setType (const CTaskEnum::Task &type) |
virtual void | setUpdateModel (const bool &updateModel) |
virtual CData | toData () const |
virtual bool | updateMatrices () |
virtual | ~CCopasiTask () |
Public Member Functions inherited from CDataContainer | |
virtual bool | add (CDataObject *pObject, const bool &adopt=true) |
virtual bool | appendDeletedDependentData (CUndoData &undoData) const |
CDataContainer (const CDataContainer &src, const CDataContainer *pParent) | |
CDataContainer (const std::string &name, const CDataContainer *pParent=NO_PARENT, const std::string &type="CN", const CFlags< Flag > &flag=CFlags< Flag >::None) | |
virtual std::string | getChildObjectUnits (const CDataObject *pObject) const |
void | getDescendants (CDataObject::DataObjectSet &descendants, const bool &recursive=false) const |
virtual size_t | getIndex (const CDataObject *pObject) const |
virtual const CObjectInterface * | getObject (const CCommonName &cn) const override |
virtual objectMap & | getObjects () |
virtual const objectMap & | getObjects () const |
virtual const std::string | getUnits () const override |
virtual const CDataObject * | getValueObject () const override |
virtual CUndoObjectInterface * | insert (const CData &data) override |
void | objectRenamed (CDataObject *pObject, const std::string &oldName) |
virtual bool | remove (CDataObject *pObject) |
virtual | ~CDataContainer () |
Public Member Functions inherited from CDataObject | |
void | addIssue (const CIssue &issue) |
void | addReference (const CDataContainer *pReference) |
virtual void | calculateValue () override |
CDataObject (const CDataObject &src, const CDataContainer *pParent=NULL) | |
virtual void | destruct () override |
virtual CCommonName | getCN () const override |
virtual const CDataObject * | getDataObject () const override |
CDataContainer * | getObjectAncestor (const std::string &type) const |
CDataModel * | getObjectDataModel () const |
virtual std::string | getObjectDisplayName () const override |
const CObjectInterface * | getObjectFromCN (const CCommonName &cn) const |
const std::string & | getObjectName () const |
CDataContainer * | getObjectParent () const |
const std::string & | getObjectType () const |
virtual const CObjectInterface::ObjectSet & | getPrerequisites () const override |
virtual const CValidity & | getValidity () const override |
virtual void * | getValuePointer () const override |
bool | hasFlag (const Flag &flag) const |
virtual bool | isPrerequisiteForContext (const CObjectInterface *pObject, const CCore::SimulationContextFlag &context, const CObjectInterface::ObjectSet &changedObjects) const override |
bool | prerequisitsContains (const DataObjectSet &objects) const |
virtual void | print (std::ostream *ostream) const override |
void | removeIssue (const CIssue &issue) |
void | removeReference (const CDataContainer *pReference) |
bool | setObjectName (const std::string &name) |
virtual bool | setObjectParent (const CDataContainer *pParent) |
void | validityChanged (const CValidity &changedValidity) override |
void | validityRemoved (const CValidity &changedValidity) |
virtual | ~CDataObject () |
Public Member Functions inherited from CObjectInterface | |
CObjectInterface () | |
CObjectInterface (const CObjectInterface &src) | |
virtual | ~CObjectInterface () |
Public Member Functions inherited from CUndoObjectInterface | |
CUndoObjectInterface () | |
CUndoObjectInterface (const CUndoObjectInterface &src) | |
bool | generateUuid () |
const xg::Guid & | getUuid () const |
bool | setUuid (const std::string &uuid) |
bool | setUuid (const xg::Guid &uuid) |
virtual void | updateIndex (const size_t &index, const CUndoObjectInterface *pUndoObject) |
virtual | ~CUndoObjectInterface () |
Private Member Functions | |
CEFMTask () | |
std::map< const CMetab *, C_FLOAT64 > | getNetReactionData (const CFluxMode &fluxMode) const |
Additional Inherited Members | |
Public Types inherited from CCopasiTask | |
enum | eOutputFlagBase { INITIALIZE = 0x01 , STREAM = 0x02 , FINISH = 0x04 , REPORT = 0x10 , PLOT = 0x20 , TIME_SERIES = 0x40 } |
enum | OutputFlag { NO_OUTPUT = 0 , OUTPUT_BEFORE = INITIALIZE , OUTPUT_DURING = STREAM , OUTPUT_AFTER = FINISH , OUTPUT = REPORT | PLOT | STREAM , OUTPUT_SE = REPORT | PLOT | INITIALIZE | STREAM | FINISH , OUTPUT_UI = REPORT | PLOT | TIME_SERIES | INITIALIZE | STREAM | FINISH , ONLY_TIME_SERIES = TIME_SERIES | INITIALIZE | STREAM | FINISH } |
Public Types inherited from CDataContainer | |
typedef CDataObjectMap | objectMap |
Public Types inherited from CDataObject | |
typedef std::set< const CDataObject * > | DataObjectSet |
enum | Flag { Container , Vector , Matrix , NameVector , Reference , ValueBool , ValueInt , ValueInt64 , ValueDbl , NonUniqueName , StaticString , ValueString , Separator , DisplayName , ModelEntity , Array , DataModel , Root , Gui , __SIZE } |
Public Types inherited from CObjectInterface | |
typedef std::vector< const CDataContainer * > | ContainerList |
typedef std::set< const CObjectInterface * > | ObjectSet |
Static Public Member Functions inherited from CCopasiTask | |
static CCopasiTask * | fromData (const CData &data, CUndoObjectInterface *pParent) |
static bool | isValidMethod (const CTaskEnum::Method &method, const CTaskEnum::Method *validMethods) |
Static Public Member Functions inherited from CDataContainer | |
static CDataContainer * | fromData (const CData &data, CUndoObjectInterface *pParent) |
Static Public Member Functions inherited from CDataObject | |
static CDataObject * | fromData (const CData &data, CUndoObjectInterface *pParent) |
static void | sanitizeObjectName (std::string &name) |
Static Public Member Functions inherited from CObjectInterface | |
static const CDataObject * | DataObject (const CObjectInterface *pInterface) |
static CObjectInterface * | GetObjectFromCN (const ContainerList &listOfContainer, const CCommonName &objName) |
Static Public Member Functions inherited from CUndoObjectInterface | |
template<class CType > | |
static CType * | fromData (const CData &, CUndoObjectInterface *) |
Public Attributes inherited from CCopasiTask | |
std::string | Error |
std::string | Warning |
Static Public Attributes inherited from CDataContainer | |
static const CObjectInterface::ContainerList | EmptyList |
Protected Member Functions inherited from CCopasiTask | |
bool | isTaskValid () const |
virtual void | signalMathContainerChanged () |
virtual void | signalMethodChanged () |
Protected Member Functions inherited from CDataContainer | |
template<class CType > | |
CDataMatrixReference< CType > * | addMatrixReference (const std::string &name, CType &reference, const CFlags< Flag > &flag=CFlags< Flag >::None) |
template<class CType > | |
CDataObjectReference< CType > * | addObjectReference (const std::string &name, CType &reference, const CFlags< Flag > &flag=CFlags< Flag >::None) |
template<class CType > | |
CDataVectorReference< CType > * | addVectorReference (const std::string &name, CType &reference, const CFlags< Flag > &flag=CFlags< Flag >::None) |
CDataContainer (const CDataContainer &src) | |
void | initObjects () |
Protected Member Functions inherited from CDataObject | |
CDataObject () | |
CDataObject (const std::string &name, const CDataContainer *pParent=static_cast< CDataContainer * >((void *) 0), const std::string &type="CN", const CFlags< Flag > &flag=CFlags< Flag >::None) | |
Protected Attributes inherited from CCopasiTask | |
CDescription | mDescription |
OutputFlag | mDoOutput |
bool | mIgnoreProblemData |
CVector< C_FLOAT64 > | mInitialState |
std::string | mKey |
unsigned C_INT32 | mOutputCounter |
CMathContainer * | mpContainer |
CCopasiMethod * | mpMethod |
COutputHandler * | mpOutputHandler |
CCopasiProblem * | mpProblem |
CProcessReportLevel | mProcessReport |
CCopasiParameterGroup * | mpSliders |
CReport | mReport |
CResult | mResult |
bool | mScheduled |
CTaskEnum::Task | mType |
bool | mUpdateModel |
Protected Attributes inherited from CDataContainer | |
objectMap | mObjects |
Protected Attributes inherited from CDataObject | |
ObjectSet | mPrerequisits |
std::set< CDataContainer * > | mReferences |
Protected Attributes inherited from CObjectInterface | |
CValidity | mValidity |
|
private |
Default constructor
CEFMTask::CEFMTask | ( | const CDataContainer * | pParent, |
const CTaskEnum::Task & | type = CTaskEnum::Task::fluxMode |
||
) |
Specific constructor
const | CDataContainer * pParent |
CEFMTask class.
This class implements a optimization task which is comprised of a of a problem and a method.
References CMethodFactory::create(), CTaskEnum::EFMAlgorithm, CCopasiTask::getType(), and CCopasiTask::mpMethod.
CEFMTask::CEFMTask | ( | const CEFMTask & | src, |
const CDataContainer * | pParent | ||
) |
Copy constructor
const | COptTask & src |
|
virtual |
Destructor
std::string CEFMTask::getFluxModeDescription | ( | const CFluxMode & | fluxMode | ) | const |
Retrieve the description of the flux mode
const | CFluxMode & fluxMode |
References CFluxMode::begin(), C_INT32, CFluxMode::end(), CDataObject::getObjectName(), getReactionIndex(), CCopasiMethod::getSubType(), CSSAMethod::isReactionReversed(), CCopasiTask::mpMethod, and CCopasiTask::mpProblem.
Referenced by CEFMProblem::printResult().
const std::vector< CFluxMode > & CEFMTask::getFluxModes | ( | ) | const |
Retrieve the Flux Modes
References CCopasiTask::mpProblem.
Referenced by CEFMProblem::printResult().
std::string CEFMTask::getInternalSpecies | ( | const CFluxMode & | fluxMode | ) | const |
Retrieve the internal species for the given flux mode.
const | CFluxMode & fluxMode |
References CMetabNameInterface::getDisplayName(), CMathContainer::getModel(), getNetReactionData(), and CCopasiTask::mpContainer.
Referenced by CEFMProblem::printResult().
std::string CEFMTask::getNetReaction | ( | const CFluxMode & | fluxMode | ) | const |
Retrieve the net reaction for the given flux mode.
const | CFluxMode & fluxMode |
References CMetabNameInterface::getDisplayName(), CMathContainer::getModel(), getNetReactionData(), CFluxMode::isReversible(), and CCopasiTask::mpContainer.
Referenced by CEFMProblem::printResult().
|
private |
Retrieve the net reaction data for the given flux mode.
const | CFluxMode & fluxMode |
References CDataVector< CType >::begin(), CFluxMode::begin(), CDataVector< CType >::end(), CFluxMode::end(), CReaction::getChemEq(), CChemEq::getProducts(), getSpeciesChanges(), CChemEq::getSubstrates(), and CCopasiTask::mpProblem.
Referenced by getInternalSpecies(), and getNetReaction().
std::string CEFMTask::getReactionEquation | ( | const std::map< size_t, C_FLOAT64 >::const_iterator & | itReaction | ) | const |
Retrieve the reaction equation of the part of the flux mode pointed at by itReaction
const | std::map< size_t, C_FLOAT64 >::const_iterator & itReaction |
References CChemEqInterface::getChemEqString(), CEFMProblem::getReorderedReactions(), CCopasiMethod::getSubType(), CSSAMethod::isReactionReversed(), CReaction::isReversible(), CCopasiTask::mpMethod, and CCopasiTask::mpProblem.
Referenced by CEFMProblem::printResult().
std::pair< C_FLOAT64, C_FLOAT64 > CEFMTask::getSpeciesChanges | ( | const CFluxMode & | fluxMode, |
const CMetab & | metab | ||
) | const |
Retrieve the species changes for the given flux mode and species
References CDataVector< CType >::begin(), CFluxMode::begin(), C_FLOAT64, CDataVector< CType >::end(), CFluxMode::end(), CReaction::getChemEq(), CModelEntity::getKey(), CChemEq::getProducts(), CChemEq::getSubstrates(), and CCopasiTask::mpProblem.
Referenced by getNetReactionData(), and CEFMProblem::printResult().
|
virtual |
Retrieve the list of valid methods
Reimplemented from CCopasiTask.
References CTaskEnum::EFMAlgorithm, CTaskEnum::EFMBitPatternAlgorithm, CTaskEnum::EFMBitPatternTreeAlgorithm, and CTaskEnum::UnsetMethod.
|
virtual |
Initialize the task. If an ostream is given this ostream is used instead of the target specified in the report. This allows nested tasks to share the same output device.
const | OutputFlag & of |
COutputHandler | * pOutputHandler |
std::ostream | * pOstream (default: NULL) |
Reimplemented from CCopasiTask.
References CCopasiTask::initialize(), CCopasiMethod::isValidProblem(), CCopasiTask::mpMethod, and CCopasiTask::mpProblem.
|
virtual |
Process the task with or without initializing to the initial state.
const | bool & useInitialValues |
Reimplemented from CCopasiTask.
References COutputInterface::AFTER, COutputInterface::BEFORE, CCopasiTask::mpMethod, and CCopasiTask::output().
|
virtual |
Set the call back of the task
CProcessReport | * pCallBack |
Reimplemented from CCopasiTask.
References CCopasiTask::mpMethod, CCopasiTask::mpProblem, CCopasiTask::mProcessReport, CCopasiMethod::setCallBack(), CCopasiProblem::setCallBack(), and CCopasiTask::setCallBack().