Diana
0.8.3
|
#include <DianaXmlDAESO.hpp>
Public Member Functions | |
DianaXmlDAESO (const Common::Types::CapeString &_strXmlDataFile, const Common::Types::CapeString &_name, Common::Types::CapeLong _nVars, Common::Types::CapeLong _nEqns, Common::Types::CapeLong _nRealParams, Common::Types::CapeLong _nStructureParams, Common::Types::CapeLong _nIntegerParams, Common::Types::CapeLong _nHelpVariables, Common::Types::CapeLong _nPhi=0, Common::Types::CapeLong _nPlaces=0) | |
DianaXmlDAESO (const DianaXmlDAESO &org) | |
void | Initialize () throw (Common::Error::ECapeUnknown, Common::Error::ECapeFailedInitialisation, Common::Error::ECapeOutOfResources, Common::Error::ECapeLicenceError, Common::Error::ECapeBadInvOrder) |
virtual const CapeString & | getLoadDirectory () |
virtual void | setLoadDirectory (const CapeString &_dir) |
virtual Common::Types::CapeBoolean | initializeData (void *input) throw (Common::Error::ECapeFailedInitialisation) |
virtual Common::Types::CapeBoolean | initializeData (const Common::Types::CapeString &fileName=Common::Types::CapeStringUNDEFINED) throw (Common::Error::ECapeFailedInitialisation) |
virtual Common::Types::CapeBoolean | initializeDataFromString (const Common::Types::CapeString &data) throw (Common::Error::ECapeFailedInitialisation) |
virtual void | addSpar (const Common::Types::CapeString &_name, const Common::Types::CapeString &descr=Common::Types::CapeStringUNDEFINED) |
virtual void | addIpar (const Common::Types::CapeString &_name, const Common::Types::CapeString &descr, const Common::Types::CapeArrayLong &idxLower, const Common::Types::CapeArrayLong &idxUpper) |
virtual void | addRpar (const Common::Types::CapeString &_name, const Common::Types::CapeString &descr, const Common::Types::CapeArrayLong &idxLower, const Common::Types::CapeArrayLong &idxUpper) |
virtual void | addHelp (const Common::Types::CapeString &_name, const Common::Types::CapeString &descr, const Common::Types::CapeArrayLong &idxLower, const Common::Types::CapeArrayLong &idxUpper) |
virtual void | addState (const Common::Types::CapeString &_name, const Common::Types::CapeString &descr, const Common::Types::CapeArrayLong &idxLower, const Common::Types::CapeArrayLong &idxUpper) |
virtual void | addPlace (const Common::Types::CapeString &_name, const Common::Types::CapeString &descr, const Common::Types::CapeArrayLong &idxLower, const Common::Types::CapeArrayLong &idxUpper, const Common::Types::CapeBoolean fork=false) |
virtual void | addDirectTransition (const Common::Types::CapeString &_name, const Common::Types::CapeString &descr, const Common::Types::CapeArrayLong &idxLower, const Common::Types::CapeArrayLong &idxUpper) |
virtual void | addExplicitTransition (const Common::Types::CapeString &_name, const Common::Types::CapeString &descr, const Common::Types::CapeArrayLong &idxLower, const Common::Types::CapeArrayLong &idxUpper) |
virtual void | addImplicitTransition (const Common::Types::CapeString &_name, const Common::Types::CapeString &descr, const Common::Types::CapeArrayLong &idxLower, const Common::Types::CapeArrayLong &idxUpper) |
virtual void | initParameter (const Common::Types::CapeString &name, const Common::Types::CapeArrayLong &value, const Common::Types::CapeArrayLong &minValue, const Common::Types::CapeArrayLong &maxValue) |
virtual void | initPlace (const Common::Types::CapeString &name, const Common::Types::CapeArrayBoolean &value) |
virtual void | initParameter (const Common::Types::CapeString &name, const Common::Types::CapeArrayDouble &value, const Common::Types::CapeArrayDouble &minValue, const Common::Types::CapeArrayDouble &maxValue) |
virtual void | initState (const Common::Types::CapeString &name, const Common::Types::CapeArrayDouble &dblValue, const Common::Types::CapeArrayDouble &minValue, const Common::Types::CapeArrayDouble &maxValue, const Common::Types::CapeArrayDouble &absError) |
virtual void | connectTransitionFrom (CapeLong transIndex, CapeLong placeIndex) |
virtual void | connectTransitionTo (CapeLong transIndex, CapeLong placeIndex) |
virtual void | addEquation (const Common::Types::CapeString &name, const Common::Types::CapeString &descr, const Common::Types::CapeLong startRow) |
virtual void | addDiffPattern (Common::Types::CapeLong rowIndex, Common::Types::CapeLong colIndex) |
virtual void | addJacPattern (Common::Types::CapeLong rowIndex, Common::Types::CapeLong colIndex) |
virtual void | finishPatterns () |
Protected Attributes | |
CapeString | loadDirectory |
Common::Types::CapeString | strXmlDataFile |
default XML file name with a model data | |
Private Attributes | |
Common::Types::CapeBoolean | bInitialized |
Common::Types::CapeLong | curSpar |
current position in the structure parameters vector (used in addSpar) | |
Common::Types::CapeLong | curIpar |
current position in the integer parameters vector (used in addIpar) | |
Common::Types::CapeLong | curRpar |
current position in the real parameters vector (used in addRpar) | |
Common::Types::CapeLong | curHelp |
current position in the help variables vector (used in addHelp) | |
Common::Types::CapeLong | curState |
current position in the state variables vector (used in addState) | |
Common::Types::CapeLong | curPlace |
current position in the places vector (used in addPlace) | |
Common::Types::CapeLong | curExplicitTransition |
current position in the explicit transitions vector (used in addExplicitTransition) | |
Common::Types::CapeLong | curImplicitTransition |
current position in the implicit transitions vector (used in addImplicitTransition) | |
Common::Types::CapeArrayLong | iJRow |
array of the row indices in the RHS pattern (used in addJacPattern) | |
Common::Types::CapeArrayLong | iJCol |
array of the column indices in the RHS pattern (used in addJacPattern) | |
Common::Types::CapeArrayLong | iDRow |
array of the row indices in the LHS pattern (used in addDiffPattern) | |
Common::Types::CapeArrayLong | iDCol |
array of the column indices in the LHS pattern (used in addDiffPattern) |
This Class realizes the structure of storage for parameters and dynamic variables as well as the loading and storing to XML. it implements GetParameters from ICapeUtilities and a similar method for dynamic vars.
DianaXmlDAESO | ( | const Common::Types::CapeString & | _strXmlDataFile, |
const Common::Types::CapeString & | _name, | ||
Common::Types::CapeLong | _nVars, | ||
Common::Types::CapeLong | _nEqns, | ||
Common::Types::CapeLong | _nRealParams, | ||
Common::Types::CapeLong | _nStructureParams, | ||
Common::Types::CapeLong | _nIntegerParams, | ||
Common::Types::CapeLong | _nHelpVariables, | ||
Common::Types::CapeLong | _nPhi = 0 , |
||
Common::Types::CapeLong | _nPlaces = 0 |
||
) |
Main constructor.
DianaXmlDAESO | ( | const DianaXmlDAESO & | org | ) |
Copy constructor, performs deep copy
virtual void addDiffPattern | ( | Common::Types::CapeLong | rowIndex, |
Common::Types::CapeLong | colIndex | ||
) | [virtual] |
Add an entry to the pattern of the LHS.
virtual void addEquation | ( | const Common::Types::CapeString & | name, |
const Common::Types::CapeString & | descr, | ||
const Common::Types::CapeLong | startRow | ||
) | [virtual] |
Add a named Equation with the respective (starting) row index.
virtual void addHelp | ( | const Common::Types::CapeString & | _name, |
const Common::Types::CapeString & | descr, | ||
const Common::Types::CapeArrayLong & | idxLower, | ||
const Common::Types::CapeArrayLong & | idxUpper | ||
) | [virtual] |
Add help variable to collParameters.
virtual void addIpar | ( | const Common::Types::CapeString & | _name, |
const Common::Types::CapeString & | descr, | ||
const Common::Types::CapeArrayLong & | idxLower, | ||
const Common::Types::CapeArrayLong & | idxUpper | ||
) | [virtual] |
Add integer parameter to collParameters .
virtual void addJacPattern | ( | Common::Types::CapeLong | rowIndex, |
Common::Types::CapeLong | colIndex | ||
) | [virtual] |
Add an entry to the pattern of the RHS.
virtual void addRpar | ( | const Common::Types::CapeString & | _name, |
const Common::Types::CapeString & | descr, | ||
const Common::Types::CapeArrayLong & | idxLower, | ||
const Common::Types::CapeArrayLong & | idxUpper | ||
) | [virtual] |
Add real parameter to collParameters and collRealParameters.
virtual void addSpar | ( | const Common::Types::CapeString & | _name, |
const Common::Types::CapeString & | descr = Common::Types::CapeStringUNDEFINED |
||
) | [virtual] |
Add structure parameter to collParameters .
virtual void addState | ( | const Common::Types::CapeString & | _name, |
const Common::Types::CapeString & | descr, | ||
const Common::Types::CapeArrayLong & | idxLower, | ||
const Common::Types::CapeArrayLong & | idxUpper | ||
) | [virtual] |
Add state variable to collStateVariables.
virtual void connectTransitionFrom | ( | CapeLong | transIndex, |
CapeLong | placeIndex | ||
) | [virtual] |
Add a :from link to the transition
virtual void connectTransitionTo | ( | CapeLong | transIndex, |
CapeLong | placeIndex | ||
) | [virtual] |
Add a :to link to the transition
virtual void finishPatterns | ( | ) | [virtual] |
Finish LHS and RHS pattern initialization.
virtual const CapeString& getLoadDirectory | ( | ) | [virtual] |
Get the Directory, which is searched for the XML data file
Virtual method, that initializes ESO with data from the XML file.
Reimplemented from DianaDAESO.
virtual Common::Types::CapeBoolean initializeData | ( | void * | input | ) | throw (Common::Error::ECapeFailedInitialisation) [virtual] |
Main method to initialize data storage of the model, this contains the call to the xml-reader, which reads names as well as values and pattern.
This can throw ECapeFailedInitialization on failed XML-Reading and File Errors.
virtual Common::Types::CapeBoolean initializeData | ( | const Common::Types::CapeString & | fileName = Common::Types::CapeStringUNDEFINED | ) | throw (Common::Error::ECapeFailedInitialisation) [virtual] |
Initialize the data from a file with the given filename.
virtual Common::Types::CapeBoolean initializeDataFromString | ( | const Common::Types::CapeString & | data | ) | throw (Common::Error::ECapeFailedInitialisation) [virtual] |
Take the XML data from the string instead of XML file.
virtual void initParameter | ( | const Common::Types::CapeString & | name, |
const Common::Types::CapeArrayLong & | value, | ||
const Common::Types::CapeArrayLong & | minValue, | ||
const Common::Types::CapeArrayLong & | maxValue | ||
) | [virtual] |
Initialise the numeric values for a parameter with double values(real-parameter, explicit-transitions).
virtual void initParameter | ( | const Common::Types::CapeString & | name, |
const Common::Types::CapeArrayDouble & | value, | ||
const Common::Types::CapeArrayDouble & | minValue, | ||
const Common::Types::CapeArrayDouble & | maxValue | ||
) | [virtual] |
Initialise the numeric values for a parameter with long values (structure-parameter, integer-parameter, place).
virtual void initPlace | ( | const Common::Types::CapeString & | name, |
const Common::Types::CapeArrayBoolean & | value | ||
) | [virtual] |
Initialise the mark values for a place
virtual void initState | ( | const Common::Types::CapeString & | name, |
const Common::Types::CapeArrayDouble & | dblValue, | ||
const Common::Types::CapeArrayDouble & | minValue, | ||
const Common::Types::CapeArrayDouble & | maxValue, | ||
const Common::Types::CapeArrayDouble & | absError | ||
) | [virtual] |
Initialise the numeric values for states.
virtual void setLoadDirectory | ( | const CapeString & | _dir | ) | [virtual] |
Set the Directory, which is searched for the XML data file. This is used in the ModelManager.