7.1. Module pyCore

7.1.1. Key modelling concepts

7.1.1.1. Classes

daeVariableType
daeDomain
daeParameter
daeVariable
daeModel Base model class.
daeEquation
daeEquationExecutionInfo
daeSTN
daeIF
daeState
daePort
daeEventPort
daePortConnection
daeScalarExternalFunction
daeVectorExternalFunction
daeDomainIndex
daeIndexRange
daeArrayRange
daeDEDI
daeAction
daeOnConditionActions
daeOnEventActions
daeOptimizationVariable
daeObjectiveFunction
daeOptimizationConstraint
daeMeasuredVariable
class daeVariableType

Bases: Boost.Python.instance

__init__((object)self, (str)name, (unit)units, (float)lowerBound, (float)upperBound, (float)initialGuess, (float)absTolerance[, (daeeVariableValueConstraint)valueConstraint=pyCore.daeeVariableValueConstraint.eNoConstraint]) → None
AbsoluteTolerance
InitialGuess
LowerBound
Name
Units
UpperBound
ValueConstraint
class daeObject

Bases: Boost.Python.instance

CanonicalName
Description
GetNameRelativeToParentModel((daeObject)self) → str
GetStrippedName((daeObject)self) → str
GetStrippedNameRelativeToParentModel((daeObject)self) → str
ID
Library
Model
Name
Version
class daeDomain

Bases: pyCore.daeObject

__init__((object)self, (str)name, (daeModel)parentModel, (unit)units[, (str)description='']) → None

__init__( (object)self, (str)name, (daePort)parentPort, (unit)units [, (str)description=’‘]) -> None

__getitem__((daeDomain)self, (int)index) → adouble
__call__((daeDomain)self, (int)index) → adouble
Coordinates
CreateArray((daeDomain)self, (int)noPoints) → None
CreateStructuredGrid((daeDomain)self, (int)numberOfIntervals, (quantity)qlowerBound, (quantity)qupperBound) → None

CreateStructuredGrid( (daeDomain)self, (int)numberOfIntervals, (float)lowerBound, (float)upperBound) -> None

CreateUnstructuredGrid((daeDomain)self, (list)coordinates) → None
LowerBound
NumberOfIntervals
NumberOfPoints
Points
Type
Units
UpperBound
array((daeDomain)self, (object)indexes) → adouble_array
class daeParameter

Bases: pyCore.daeObject

__init__((object)arg1, (str)name, (unit)units, (daeModel)parentModel[, (str)description=''[, (list)domains=[]]]) → object

__init__( (object)arg1, (str)name, (unit)units, (daePort)parentPort [, (str)description=’’ [, (list)domains=[]]]) -> object

GetValue((daeParameter)self[, (int)index1[, ...[, (int)index8]]]) → float

Gets the value of the parameter at the specified domain indexes. How many arguments index1, ..., index8 are used depends on the number of domains that the parameter is distributed on.

GetQuantity((daeParameter)self[, (int)index1[, ...[, (int)index8]]]) → quantity

Gets the value of the parameter at the specified domain indexes as the quantity object (with value and units). How many arguments index1, ..., index8 are used depends on the number of domains that the parameter is distributed on.

SetValue((daeParameter)self, [(int)index1, [..., [(int)index8, ]]](float)value) → None

Sets the value of the parameter at the specified domain indexes. How many arguments index1, ..., index8 are used depends on the number of domains that the parameter is distributed on.

SetValue((daeParameter)self, [(int)index1, [..., [(int)index8, ]]](quantity)value) → None

Sets the value of the parameter at the specified domain indexes. How many arguments index1, ..., index8 are used depends on the number of domains that the parameter is distributed on.

SetValues((daeParameter)self, (float)values) → None

Sets all values using a single float value.

SetValues((daeParameter)self, (quantity)values) → None

Sets all values using a single quantity object.

SetValues((daeParameter)self, (ndarray(dtype=float|quantity))values) → None

Sets all values using a numpy array of simple floats or quantity objects.

array((daeParameter)self[, (object)index1[, ...[, (object)index8]]]) → adouble_array

Gets the array of parameter’s values at the specified domain indexes (used to build equation residuals only). How many arguments index1, ..., index8 are used depends on the number of domains that the parameter is distributed on. Argument types can be one of the following:

  • daeIndexRange object
  • plain integer (to select a single index from a domain)
  • python list (to select a list of indexes from a domain)
  • python slice (to select a range of indexes from a domain: start_index, end_index, step)
  • character '*' (to select all points from a domain)
  • empty python list [] (to select all points from a domain)
__call__((daeParameter)self[, (int)index1[, ...[, (int)index8]]]) → adouble

Gets the value of the parameter at the specified domain indexes (used to build equation residuals only). How many arguments index1, ..., index8 are used depends on the number of domains that the parameter is distributed on.

DistributeOnDomain((daeParameter)self, (daeDomain)domain) → None
Domains
GetDomainsIndexesMap((daeParameter)self, (int)indexBase) → dict
NumberOfPoints
ReportingOn
Units
npyValues
class daeVariable

Bases: pyCore.daeObject

__init__((object)arg1, (str)name, (daeVariableType)variableType, (daeModel)parentModel[, (str)description=''[, (list)domains=[]]]) → object

__init__( (object)arg1, (str)name, (daeVariableType)variableType, (daePort)parentPort [, (str)description=’’ [, (list)domains=[]]]) -> object

GetValue((daeVariable)self[, (int)index1[, ...[, (int)index8]]]) → float

Gets the value of the variable at the specified domain indexes. How many arguments index1, ..., index8 are used depends on the number of domains that the variable is distributed on.

GetQuantity((daeVariable)self[, (int)index1[, ...[, (int)index8]]]) → quantity

Gets the value of the variable at the specified domain indexes as the quantity object (with value and units). How many arguments index1, ..., index8 are used depends on the number of domains that the variable is distributed on.

SetValue((daeVariable)self, [(int)index1, [..., [(int)index8, ]]](float)value) → None

Sets the value of the variable at the specified domain indexes. How many arguments index1, ..., index8 are used depends on the number of domains that the variable is distributed on.

SetValue((daeVariable)self, [(int)index1, [..., [(int)index8, ]]](quantity)value) → None

Sets the value of the variable at the specified domain indexes. How many arguments index1, ..., index8 are used depends on the number of domains that the variable is distributed on.

SetValues((daeVariable)self, (ndarray(dtype=float|quantity))values) → None

Sets all values using a numpy array of simple floats or quantity objects.

AssignValue((daeVariable)self, [(int)index1, [..., [(int)index8, ]]](float)value) → None
AssignValue((daeVariable)self, [(int)index1, [..., [(int)index8, ]]](quantity)value) → None
AssignValues((daeVariable)self, (float)values) → None
AssignValues((daeVariable)self, (quantity)values) → None
AssignValues((daeVariable)self, (ndarray(dtype=float|quantity))values) → None
ReAssignValue((daeVariable)self, [(int)index1, [..., [(int)index8, ]]](float)value) → None
ReAssignValue((daeVariable)self, [(int)index1, [..., [(int)index8, ]]](quantity)value) → None
ReAssignValues((daeVariable)self, (float)values) → None
ReAssignValues((daeVariable)self, (quantity)values) → None
ReAssignValues((daeVariable)self, (ndarray(dtype=float|quantity))values) → None
SetInitialCondition((daeVariable)self, [(int)index1, [..., [(int)index8, ]]](float)initialCondition) → None
SetInitialCondition((daeVariable)self, [(int)index1, [..., [(int)index8, ]]](quantity)initialCondition) → None
SetInitialConditions((daeVariable)self, (float)initialConditions) → None
SetInitialConditions((daeVariable)self, (quantity)initialConditions) → None
SetInitialConditions((daeVariable)self, (ndarray(dtype=float|quantity))initialConditions) → None
ReSetInitialCondition((daeVariable)self, [(int)index1, [..., [(int)index8, ]]](float)initialCondition) → None
ReSetInitialCondition((daeVariable)self, [(int)index1, [..., [(int)index8, ]]](quantity)initialCondition) → None
ReSetInitialConditions((daeVariable)self, (float)initialConditions) → None
ReSetInitialConditions((daeVariable)self, (quantity)initialConditions) → None
ReSetInitialConditions((daeVariable)self, (ndarray(dtype=float|quantity))initialConditions) → None
SetInitialGuess((daeVariable)self, [(int)index1, [..., [(int)index8, ]]](float)initialGuess) → None
SetInitialGuess((daeVariable)self, [(int)index1, [..., [(int)index8, ]]](quantity)initialGuess) → None
SetInitialGuesses((daeVariable)self, (float)initialGuesses) → None
SetInitialGuesses((daeVariable)self, (quantity)initialGuesses) → None
SetInitialGuesses((daeVariable)self, (ndarray(dtype=float|quantity))initialGuesses) → None
SetAbsoluteTolerances((daeVariable)self, (float)tolerances) → None
array((daeVariable)self[, (object)index1[, ...[, (object)index8]]]) → adouble_array

Gets the array of variable’s values at the specified domain indexes (used to build equation residuals only). How many arguments index1, ..., index8 are used depends on the number of domains that the variable is distributed on. Argument types are the same as those described in pyCore.daeParameter.array()

BlockIndexes
DistributeOnDomain((daeVariable)self, (daeDomain)domain) → None
Domains
GetDomainsIndexesMap((daeVariable)self, (int)indexBase) → dict
NumberOfPoints
OverallIndex
ReportingOn
SetValueConstraint((daeVariable)arg1, (list)arg2, (daeeVariableValueConstraint)arg3) → None

SetValueConstraint( (daeVariable)arg1, (daeeVariableValueConstraint)arg2) -> None

SetValueConstraint( (daeVariable)arg1, (int)arg2, (daeeVariableValueConstraint)arg3) -> None

SetValueConstraint( (daeVariable)arg1, (int)arg2, (int)arg3, (daeeVariableValueConstraint)arg4) -> None

SetValueConstraint( (daeVariable)arg1, (int)arg2, (int)arg3, (int)arg4, (daeeVariableValueConstraint)arg5) -> None

SetValueConstraint( (daeVariable)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (daeeVariableValueConstraint)arg6) -> None

SetValueConstraint( (daeVariable)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (int)arg6, (daeeVariableValueConstraint)arg7) -> None

SetValueConstraint( (daeVariable)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (int)arg6, (int)arg7, (daeeVariableValueConstraint)arg8) -> None

SetValueConstraint( (daeVariable)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (int)arg6, (int)arg7, (int)arg8, (daeeVariableValueConstraint)arg9) -> None

SetValueConstraint( (daeVariable)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (int)arg6, (int)arg7, (int)arg8, (int)arg9, (daeeVariableValueConstraint)arg10) -> None

SetValueConstraints((daeVariable)arg1, (daeeVariableValueConstraint)arg2) → None

SetValueConstraints( (daeVariable)arg1, (object)arg2) -> None

Type
VariableType
npyGatheredIDs
npyIDs
npyTimeDerivatives
npyValues
class daeModel

Bases: pyCore.daeObject

Base model class.

__init__((object)self, (str)name[, (daeModel)parentModel=0[, (str)description='']]) → None :

Constructor...

ComponentArrays

A list of arrays of components in the model.

Components

A list of components in the model.

ComputeStack
ConnectEventPorts((daeModel)self, (daeEventPort)portFrom, (daeEventPort)portTo) → None :

Connects two event ports.

ConnectPorts((daeModel)self, (daePort)portFrom, (daePort)portTo) → None :

Connects two ports.

CreateEquation((daeModel)self, (str)name[, (str)description=''[, (float)scaling=1.0]]) → daeEquation :

Creates a new equation. Used to add equations to models or states in state transition networks

DeclareEquations((daeModel)self) → None :

User-defined function where all model equations ans state transition networks are declared. Must be always implemented in derived classes.

DeclareEquations( (daeModel)self) -> None

Domains

A list of domains in the model.

ELSE((daeModel)self[, (str)stateDescription='']) → None :

Adds the last state to a reversible state transition network.

ELSE_IF((daeModel)self, (daeCondition)condition[, (float)eventTolerance=0.0[, (str)stateName=''[, (str)stateDescription='']]]) → None :

Adds a new state to a reversible state transition network.

END_IF((daeModel)self) → None :

Finalises a reversible state transition network.

END_STN((daeModel)self) → None :

.

Equations

A list of equations in the model.

EventPortConnections

A list of event port connections in the model.

EventPorts

A list of event ports in the model.

GetCoSimulationInterface((daeModel)self) → dict
GetFMIInterface((daeModel)self) → dict
IF((daeModel)self, (daeCondition)condition[, (float)eventTolerance=0.0[, (str)ifName=''[, (str)ifDescription=''[, (str)stateName=''[, (str)stateDescription='']]]]]) → None :

Creates a reversible state transition network and adds the first state.

InitialConditionMode

A mode used to calculate initial conditions ...

InitializeModel((daeModel)self, (str)jsonInit) → None
IsModelDynamic

Boolean flag that determines whether the model is synamic or steady-state.

ModelType

A type of the model ().

ON_CONDITION((daeModel)self, (daeCondition)condition[, (list)switchToStates=[][, (list)setVariableValues=[][, (list)triggerEvents=[][, (list)userDefinedActions=[][, (float)eventTolerance=0.0]]]]]) → None :

.

ON_EVENT((daeModel)self, (daeEventPort)eventPort[, (list)switchToStates=[][, (list)setVariableValues=[][, (list)triggerEvents=[][, (list)userDefinedActions=[]]]]]) → None :

.

OnConditionActions

A list of OnCondition actions in the model.

OnEventActions

A list of OnEvent actions in the model.

OverallIndex_BlockIndex_VariableNameMap
Parameters

A list of parameters in the model.

PortArrays

A list of arrays of ports in the model.

PortConnections

A list of port connections in the model.

Ports

A list of ports in the model.

PropagateDomain((daeModel)arg1, (daeDomain)arg2) → None :

.

PropagateParameter((daeModel)arg1, (daeParameter)arg2) → None :

.

STATE((daeModel)self, (str)stateName[, (str)stateDescription='']) → daeState :

.

STN((daeModel)self, (str)stnName[, (str)stnDescription='']) → daeSTN :

.

STNs

A list of state transition networks in the model.

SWITCH_TO((daeModel)self, (str)targetState, (daeCondition)condition[, (float)eventTolerance=0.0]) → None :

.

SaveModelReport((daeModel)self, (str)xmlFilename) → None :

.

SaveRuntimeModelReport((daeModel)self, (str)xmlFilename) → None :

.

SetReportingOn((daeModel)self, (bool)reportingOn) → None :

Switches the reporting of the model variables/parameters to the data reporter on or off.

UpdateEquations((daeModel)self) → None

UpdateEquations( (daeModel)self) -> None

Variables

A list of variables in the model.

dictComponentArrays

A list of arrays of components in the model.

dictComponents

A list of components in the model.

dictDomains

A list of domains in the model.

dictEquations

A list of equations in the model.

dictEventPortConnections

A list of event port connections in the model.

dictEventPorts

A list of event ports in the model.

dictOnConditionActions

A list of OnCondition actions in the model.

dictOnEventActions

A list of OnEvent actions in the model.

dictParameters

A list of parameters in the model.

dictPortArrays

A list of arrays of ports in the model.

dictPortConnections

A list of port connections in the model.

dictPorts

A list of ports in the model.

dictSTNs

A list of state transition networks in the model.

dictVariables

A list of variables in the model.

class daeEquation

Bases: pyCore.daeObject

BuildJacobianExpressions
CheckUnitsConsistency
DistributeOnDomain((daeEquation)self, (daeDomain)domain, (daeeDomainBounds)domainBounds[, (str)name='']) → daeDEDI

DistributeOnDomain( (daeEquation)self, (daeDomain)domain, (list)domainIndexes [, (str)name=’‘]) -> daeDEDI

DistributedEquationDomainInfos
EquationExecutionInfos
EquationType
Residual
Scaling
SimplifyExpressions
class daeEquationExecutionInfo

Bases: Boost.Python.instance

ComputeStack
DiffVariableIndexes
Equation
EquationIndex
EquationType
GetComputeStackInfo((daeEquationExecutionInfo)self[, (dict)unaryOps={}[, (dict)binaryOps={}]]) → tuple
JacobianExpressions
Name
Node
VariableIndexes
class daeSTN

Bases: pyCore.daeObject

ActiveState
States
Type
dictStates
class daeIF

Bases: pyCore.daeSTN

class daeState

Bases: pyCore.daeObject

Equations
NestedSTNs
OnConditionActions
OnEventActions
class daePort

Bases: pyCore.daeObject

__init__((object)self, (str)name, (daeePortType)type, (daeModel)parentModel[, (str)description='']) → None
Domains
Export((daePort)self, (str)content, (daeeModelLanguage)language, (daeModelExportContext)context) → None
Parameters
SetReportingOn((daePort)self, (bool)reportingOn) → None
Type
Variables
dictDomains
dictParameters
dictVariables
class daeEventPort

Bases: pyCore.daeObject

__init__((object)self, (str)name, (daeePortType)type, (daeModel)parentModel[, (str)description='']) → None
EventData
Events
ReceiveEvent((daeEventPort)self, (float)data) → None
RecordEvents
SendEvent((daeEventPort)self, (float)data) → None
Type
class daePortConnection

Bases: pyCore.daeObject

Equations
PortFrom
PortTo
class daeEventPortConnection

Bases: pyCore.daeObject

PortFrom
PortTo
class daeScalarExternalFunction

Bases: Boost.Python.instance

__init__((object)self, (str)name, (daeModel)parentModel, (unit)units, (dict)arguments) → None
__call__((daeScalarExternalFunction)self) → adouble
Calculate((daeScalarExternalFunction)self, (dict)values) → object

Calculate( (daeScalarExternalFunction)arg1, (dict)arg2) -> None

Name
class daeVectorExternalFunction

Bases: Boost.Python.instance

__init__((object)self, (str)name, (daeModel)parentModel, (unit)units, (int)numberOfResults, (dict)arguments) → None
__call__((daeVectorExternalFunction)self) → adouble_array
Calculate((daeVectorExternalFunction)self, (dict)values) → object

Calculate( (daeVectorExternalFunction)arg1, (dict)arg2) -> None

Name
NumberOfResults
class daeDomainIndex

Bases: Boost.Python.instance

__init__((object)self, (int)index) → None

__init__( (object)self, (daeDomain)domain, (int)dummy) -> None

__init__( (object)self, (daeDEDI)dedi) -> None

__init__( (object)self, (daeDEDI)dedi, (int)increment) -> None

__init__( (object)self, (daeDomainIndex)domainIndex) -> None

DEDI
Increment
Index
Type
class daeIndexRange

Bases: Boost.Python.instance

__init__((object)self, (daeDomain)domain) → None

__init__( (object)arg1, (daeDomain)arg2, (list)arg3) -> object

__init__( (object)self, (daeDomain)domain, (int)startIndex, (int)endIndex, (int)step) -> None

Domain
EndIndex
NoPoints
StartIndex
Step
Type
class daeArrayRange

Bases: Boost.Python.instance

__init__((object)self, (daeDomainIndex)domainIndex) → None

__init__( (object)self, (daeIndexRange)indexRange) -> None

DomainIndex
NoPoints
Range
Type
class daeDEDI

Bases: pyCore.daeObject

__init__()

Raises an exception This class cannot be instantiated from Python

__call__((daeDEDI)self) → adouble
Domain
DomainBounds
DomainPoints
class daeAction

Bases: pyCore.daeObject

__init__((object)self) → None
Execute((daeAction)self) → None

Execute( (daeAction)arg1) -> None

RuntimeNode
STN
SendEventPort
SetupNode
StateTo
Type
VariableWrapper
class daeOnEventActions

Bases: pyCore.daeObject

Actions
EventPort
Execute((daeOnEventActions)arg1) → None
UserDefinedActions
class daeOnConditionActions

Bases: pyCore.daeObject

Actions
Condition
Execute((daeOnConditionActions)arg1) → None
UserDefinedActions
class daeOptimizationVariable

Bases: pyCore.daeOptimizationVariable_t

__init__((object)self) → None
LowerBound
Name
Scaling
StartingPoint
Type
Units
UpperBound
Value
class daeObjectiveFunction

Bases: pyCore.daeObjectiveFunction_t

__init__((object)self) → None
AbsTolerance
Gradients
Name
Residual
Scaling
Value
class daeOptimizationConstraint

Bases: pyCore.daeOptimizationConstraint_t

__init__((object)self) → None
AbsTolerance
Gradients
Name
Residual
Scaling
Type
Value
class daeMeasuredVariable

Bases: pyCore.daeMeasuredVariable_t

__init__((object)self) → None
AbsTolerance
Gradients
Name
Residual
Scaling
Value

7.1.1.2. Functions

dt
d
d2
dt_array
d_array
d2_array
Time
Constant Constant( (quantity)value) -> adouble
Array
Sum
Product
Integral
Average
dt((adouble)ad) → adouble
d((adouble)ad, (daeDomain)domain[, (daeeDiscretizationMethod)discretizationMethod=pyCore.daeeDiscretizationMethod.eCFDM[, (dict)options={}]]) → adouble
d2((adouble)ad, (daeDomain)domain[, (daeeDiscretizationMethod)discretizationMethod=pyCore.daeeDiscretizationMethod.eCFDM[, (dict)options={}]]) → adouble
dt_array((adouble_array)adarr) → adouble_array
d_array((adouble_array)adarr, (daeDomain)domain[, (daeeDiscretizationMethod)discretizationMethod=pyCore.daeeDiscretizationMethod.eCFDM[, (dict)options={}]]) → adouble_array
d2_array((adouble_array)adarr, (daeDomain)domain[, (daeeDiscretizationMethod)discretizationMethod=pyCore.daeeDiscretizationMethod.eCFDM[, (dict)options={}]]) → adouble_array
Time() → adouble
Constant((float)value) → adouble

Constant( (quantity)value) -> adouble

Array((list)values) → adouble_array
Sum((adouble_array)adarray) → adouble
Product((adouble_array)adarray) → adouble
Integral((adouble_array)adarray) → adouble
Average((adouble_array)adarray) → adouble

7.1.2. Auto-differentiation and equation evaluation tree support

7.1.2.1. Classes

adouble Class adouble operates on values/derivatives of domains, parameters and variables.
adouble_array Class adouble_array operates on arrays of values/derivatives of domains, parameters and variables.
daeCondition
class adouble

Bases: Boost.Python.instance

Class adouble operates on values/derivatives of domains, parameters and variables. It supports basic mathematical operators (+, -, , /, *), comparison operators (<, <=, >, >=, ==, !=), logical operators and (&), or (|) and not (~), and mathematical functions (sqrt, exp, sin, cos, ...). Operands can be instances of adouble or float values.

__init__((object)self[, (float)value=0.0[, (float)derivative=0.0[, (bool)gatherInfo=False[, (adNode)node=0]]]]) → None
Derivative
GatherInfo

Internally used by the framework.

Node

Contains the equation evaluation node.

NodeAsLatex((adouble)arg1) → str
NodeAsPlainText((adouble)arg1) → str
Value
abs((adouble)arg1) → adouble
arccos((adouble)arg1) → adouble
arccosh((adouble)arg1) → adouble
arcsin((adouble)arg1) → adouble
arcsinh((adouble)arg1) → adouble
arctan((adouble)arg1) → adouble
arctan2((adouble)arg1, (adouble)arg2) → adouble
arctanh((adouble)arg1) → adouble
ceil((adouble)arg1) → adouble
cos((adouble)arg1) → adouble
cosh((adouble)arg1) → adouble
erf((adouble)arg1) → adouble
exp((adouble)arg1) → adouble
fabs((adouble)arg1) → adouble
floor((adouble)arg1) → adouble
log((adouble)arg1) → adouble
log10((adouble)arg1) → adouble
sin((adouble)arg1) → adouble
sinh((adouble)arg1) → adouble
sqrt((adouble)arg1) → adouble
tan((adouble)arg1) → adouble
tanh((adouble)arg1) → adouble
class adouble_array

Bases: Boost.Python.instance

Class adouble_array operates on arrays of values/derivatives of domains, parameters and variables. It supports basic mathematical operators (+, -, , /, *) and functions (sqrt, exp, sin, cos,...). Operands can be instances of adouble_array, adouble or float values.

__init__((object)self[, (bool)gatherInfo=False[, (adNodeArray)node=0]]) → None
static FromList((list)values) → adouble_array :

Returns adouble_array object from the list of adouble objects

static FromNumpyArray((object)values) → adouble_array :

Returns adouble_array object from the ndarray of adouble objects

GatherInfo

Used internally by the framework.

Node

Contains the equation evaluation node.

NodeAsLatex((adouble_array)arg1) → str
NodeAsPlainText((adouble_array)arg1) → str
abs((adouble_array)arg1) → adouble_array
arccos((adouble_array)arg1) → adouble_array
arccosh((adouble_array)arg1) → adouble_array
arcsin((adouble_array)arg1) → adouble_array
arcsinh((adouble_array)arg1) → adouble_array
arctan((adouble_array)arg1) → adouble_array
arctan2((adouble_array)arg1, (adouble_array)arg2) → adouble_array
arctanh((adouble_array)arg1) → adouble_array
ceil((adouble_array)arg1) → adouble_array
cos((adouble_array)arg1) → adouble_array
cosh((adouble_array)arg1) → adouble_array
erf((adouble_array)arg1) → adouble_array
exp((adouble_array)arg1) → adouble_array
fabs((adouble_array)arg1) → adouble_array
floor((adouble_array)arg1) → adouble_array
log((adouble_array)arg1) → adouble_array
log10((adouble_array)arg1) → adouble_array
sin((adouble_array)arg1) → adouble_array
sinh((adouble_array)arg1) → adouble_array
sqrt((adouble_array)arg1) → adouble_array
tan((adouble_array)arg1) → adouble_array
tanh((adouble_array)arg1) → adouble_array
class daeCondition

Bases: Boost.Python.instance

Since it is not allowed to overload Python’s operators and, or and not they cannot be used to define logical comparison operations; therefore, the bitwise operators &, | and ~ are overloaded and should be used instead.

__or__((daeCondition)self, (daeCondition)right) → daeCondition

Bitwise operator or (\) in DAE Tools is used as a logical comparison operator or.

__and__((daeCondition)self, (daeCondition)right) → daeCondition

Bitwise operator and (&) in DAE Tools is used as a logical comparison operator and.

__inv__((daeCondition)self, (daeCondition)right) → daeCondition

Bitwise inversion operator (~) in DAE Tools is used as a logical comparison operator not.

EventTolerance
Expressions
ID
Library
RuntimeNode
RuntimeNodeAsLatex((daeCondition)arg1) → str
RuntimeNodeAsPlainText((daeCondition)arg1) → str
SetupNode
SetupNodeAsLatex((daeCondition)arg1) → str
SetupNodeAsPlainText((daeCondition)arg1) → str
Version

7.1.2.2. Mathematical functions

Exp Exp( (adouble_array)arg1) -> adouble_array
Log Log( (adouble_array)arg1) -> adouble_array
Log10 Log10( (adouble_array)arg1) -> adouble_array
Sqrt Sqrt( (adouble_array)arg1) -> adouble_array
Pow Pow( (adouble)arg1, (adouble)arg2) -> adouble
Sin Sin( (adouble_array)arg1) -> adouble_array
Cos Cos( (adouble_array)arg1) -> adouble_array
Tan Tan( (adouble_array)arg1) -> adouble_array
ASin ASin( (adouble_array)arg1) -> adouble_array
ACos ACos( (adouble_array)arg1) -> adouble_array
ATan ATan( (adouble_array)arg1) -> adouble_array
Sinh Sinh( (adouble_array)arg1) -> adouble_array
Cosh Cosh( (adouble_array)arg1) -> adouble_array
Tanh Tanh( (adouble_array)arg1) -> adouble_array
ASinh ASinh( (adouble_array)arg1) -> adouble_array
ACosh ACosh( (adouble_array)arg1) -> adouble_array
ATanh ATanh( (adouble_array)arg1) -> adouble_array
ATan2 ATan2( (adouble_array)arg1, (adouble_array)arg2) -> adouble_array
Erf Erf( (adouble_array)arg1) -> adouble_array
Ceil Ceil( (adouble_array)arg1) -> adouble_array
Floor Floor( (adouble_array)arg1) -> adouble_array
Abs Abs( (adouble_array)arg1) -> adouble_array
Min Min( (float)arg1, (adouble)arg2) -> adouble
Max Max( (float)arg1, (adouble)arg2) -> adouble
Exp((adouble)arg1) → adouble

Exp( (adouble_array)arg1) -> adouble_array

Log((adouble)arg1) → adouble

Log( (adouble_array)arg1) -> adouble_array

Log10((adouble)arg1) → adouble

Log10( (adouble_array)arg1) -> adouble_array

Sqrt((adouble)arg1) → adouble

Sqrt( (adouble_array)arg1) -> adouble_array

Pow((adouble)arg1, (float)arg2) → adouble

Pow( (adouble)arg1, (adouble)arg2) -> adouble

Pow( (float)arg1, (adouble)arg2) -> adouble

Sin((adouble)arg1) → adouble

Sin( (adouble_array)arg1) -> adouble_array

Cos((adouble)arg1) → adouble

Cos( (adouble_array)arg1) -> adouble_array

Tan((adouble)arg1) → adouble

Tan( (adouble_array)arg1) -> adouble_array

ASin((adouble)arg1) → adouble

ASin( (adouble_array)arg1) -> adouble_array

ACos((adouble)arg1) → adouble

ACos( (adouble_array)arg1) -> adouble_array

ATan((adouble)arg1) → adouble

ATan( (adouble_array)arg1) -> adouble_array

Sinh((adouble)arg1) → adouble

Sinh( (adouble_array)arg1) -> adouble_array

Cosh((adouble)arg1) → adouble

Cosh( (adouble_array)arg1) -> adouble_array

Tanh((adouble)arg1) → adouble

Tanh( (adouble_array)arg1) -> adouble_array

ASinh((adouble)arg1) → adouble

ASinh( (adouble_array)arg1) -> adouble_array

ACosh((adouble)arg1) → adouble

ACosh( (adouble_array)arg1) -> adouble_array

ATanh((adouble)arg1) → adouble

ATanh( (adouble_array)arg1) -> adouble_array

ATan2((adouble)arg1, (adouble)arg2) → adouble

ATan2( (adouble_array)arg1, (adouble_array)arg2) -> adouble_array

Erf((adouble)arg1) → adouble

Erf( (adouble_array)arg1) -> adouble_array

Ceil((adouble)arg1) → adouble

Ceil( (adouble_array)arg1) -> adouble_array

Floor((adouble)arg1) → adouble

Floor( (adouble_array)arg1) -> adouble_array

Abs((adouble)arg1) → adouble

Abs( (adouble_array)arg1) -> adouble_array

Min((adouble)arg1, (adouble)arg2) → adouble

Min( (float)arg1, (adouble)arg2) -> adouble

Min( (adouble)arg1, (float)arg2) -> adouble

Min( (adouble_array)adarray) -> adouble

Max((adouble)arg1, (adouble)arg2) → adouble

Max( (float)arg1, (adouble)arg2) -> adouble

Max( (adouble)arg1, (float)arg2) -> adouble

Max( (adouble_array)adarray) -> adouble

7.1.3. Auxiliary classes

daeVariableWrapper
daeConfig
daeNodeGraph
class daeVariableWrapper

Bases: Boost.Python.instance

__init__((object)self, (daeVariable)variable[, (str)name='']) → None

__init__( (object)self, (adouble)ad [, (str)name=’‘]) -> None

DomainIndexes
Name
OverallIndex
Value
Variable
VariableType
class daeConfig

Bases: Boost.Python.instance

__contains__((daeConfig)self, (object)propertyPath) → object
__getitem__((daeConfig)self, (object)propertyPath) → object
__setitem__((daeConfig)self, (object)propertyPath, (object)value) → None
ConfigFileName
GetBoolean((daeConfig)self, (str)propertyPath[, (bool)defaultValue]) → bool
GetFloat((daeConfig)self, (str)propertyPath[, (float)defaultValue]) → float
GetInteger((daeConfig)self, (str)propertyPath[, (int)defaultValue]) → int
GetString((daeConfig)self, (str)propertyPath[, (str)defaultValue]) → str
Reload((daeConfig)self) → None
SetBoolean((daeConfig)self, (str)propertyPath, (bool)value) → None
SetFloat((daeConfig)self, (str)propertyPath, (float)value) → None
SetInteger((daeConfig)self, (str)propertyPath, (int)value) → None
SetString((daeConfig)self, (str)propertyPath, (str)value) → None
has_key((daeConfig)self, (object)propertyPath) → object
class daeNodeGraph(rootLabel, node)[source]

Bases: object

SaveGraph(filename, layout='dot')[source]

7.1.4. Auxiliary functions

daeVersion
daeVersionMajor
daeVersionMinor
daeVersionBuild
daeGetConfig
daeSetConfigFile
daeVersion([(bool)includeBuild=False]) → str
daeVersionMajor() → int
daeVersionMinor() → int
daeVersionBuild() → int
daeGetConfig() → object
daeSetConfigFile((str)arg1) → None

7.1.5. Enumerations

daeeDomainType
daeeParameterType
daeePortType
daeeDiscretizationMethod
daeeDomainBounds
daeeInitialConditionMode
daeeDomainIndexType
daeeRangeType
daeIndexRangeType
daeeOptimizationVariableType
daeeModelLanguage
daeeConstraintType
daeeUnaryFunctions
daeeBinaryFunctions
daeeSpecialUnaryFunctions
daeeLogicalUnaryOperator
daeeLogicalBinaryOperator
daeeConditionType
daeeActionType
daeeEquationType
daeeModelType
class daeeDomainType

Bases: Boost.Python.enum

eArray = pyCore.daeeDomainType.eArray
eDTUnknown = pyCore.daeeDomainType.eDTUnknown
eStructuredGrid = pyCore.daeeDomainType.eStructuredGrid
eUnstructuredGrid = pyCore.daeeDomainType.eUnstructuredGrid
class daeeParameterType

Bases: Boost.Python.enum

eBool = pyCore.daeeParameterType.eBool
eInteger = pyCore.daeeParameterType.eInteger
ePTUnknown = pyCore.daeeParameterType.ePTUnknown
eReal = pyCore.daeeParameterType.eReal
class daeePortType

Bases: Boost.Python.enum

eInletPort = pyCore.daeePortType.eInletPort
eOutletPort = pyCore.daeePortType.eOutletPort
eUnknownPort = pyCore.daeePortType.eUnknownPort
class daeeDiscretizationMethod

Bases: Boost.Python.enum

eBFDM = pyCore.daeeDiscretizationMethod.eBFDM
eCFDM = pyCore.daeeDiscretizationMethod.eCFDM
eDMUnknown = pyCore.daeeDiscretizationMethod.eDMUnknown
eFFDM = pyCore.daeeDiscretizationMethod.eFFDM
eUpwindCCFV = pyCore.daeeDiscretizationMethod.eUpwindCCFV
class daeeDomainBounds

Bases: Boost.Python.enum

eClosedClosed = pyCore.daeeDomainBounds.eClosedClosed
eClosedOpen = pyCore.daeeDomainBounds.eClosedOpen
eDBUnknown = pyCore.daeeDomainBounds.eDBUnknown
eLowerBound = pyCore.daeeDomainBounds.eLowerBound
eOpenClosed = pyCore.daeeDomainBounds.eOpenClosed
eOpenOpen = pyCore.daeeDomainBounds.eOpenOpen
eUpperBound = pyCore.daeeDomainBounds.eUpperBound
class daeeInitialConditionMode

Bases: Boost.Python.enum

eAlgebraicValuesProvided = pyCore.daeeInitialConditionMode.eAlgebraicValuesProvided
eICTUnknown = pyCore.daeeInitialConditionMode.eICTUnknown
eQuasiSteadyState = pyCore.daeeInitialConditionMode.eQuasiSteadyState
class daeeDomainIndexType

Bases: Boost.Python.enum

eConstantIndex = pyCore.daeeDomainIndexType.eConstantIndex
eDITUnknown = pyCore.daeeDomainIndexType.eDITUnknown
eDomainIterator = pyCore.daeeDomainIndexType.eDomainIterator
eIncrementedDomainIterator = pyCore.daeeDomainIndexType.eIncrementedDomainIterator
eLastPointInDomain = pyCore.daeeDomainIndexType.eLastPointInDomain
class daeeRangeType

Bases: Boost.Python.enum

eRaTUnknown = pyCore.daeeRangeType.eRaTUnknown
eRange = pyCore.daeeRangeType.eRange
eRangeDomainIndex = pyCore.daeeRangeType.eRangeDomainIndex
class daeIndexRangeType

Bases: Boost.Python.enum

eAllPointsInDomain = pyCore.daeIndexRangeType.eAllPointsInDomain
eCustomRange = pyCore.daeIndexRangeType.eCustomRange
eIRTUnknown = pyCore.daeIndexRangeType.eIRTUnknown
eRangeOfIndexes = pyCore.daeIndexRangeType.eRangeOfIndexes
class daeeOptimizationVariableType

Bases: Boost.Python.enum

eBinaryVariable = pyCore.daeeOptimizationVariableType.eBinaryVariable
eContinuousVariable = pyCore.daeeOptimizationVariableType.eContinuousVariable
eIntegerVariable = pyCore.daeeOptimizationVariableType.eIntegerVariable
class daeeModelLanguage

Bases: Boost.Python.enum

eCDAE = pyCore.daeeModelLanguage.eCDAE
eMLNone = pyCore.daeeModelLanguage.eMLNone
ePYDAE = pyCore.daeeModelLanguage.ePYDAE
class daeeConstraintType

Bases: Boost.Python.enum

eEqualityConstraint = pyCore.daeeConstraintType.eEqualityConstraint
eInequalityConstraint = pyCore.daeeConstraintType.eInequalityConstraint
class daeeUnaryFunctions

Bases: Boost.Python.enum

eAbs = pyCore.daeeUnaryFunctions.eAbs
eArcCos = pyCore.daeeUnaryFunctions.eArcCos
eArcCosh = pyCore.daeeUnaryFunctions.eArcCosh
eArcSin = pyCore.daeeUnaryFunctions.eArcSin
eArcSinh = pyCore.daeeUnaryFunctions.eArcSinh
eArcTan = pyCore.daeeUnaryFunctions.eArcTan
eArcTanh = pyCore.daeeUnaryFunctions.eArcTanh
eCeil = pyCore.daeeUnaryFunctions.eCeil
eCos = pyCore.daeeUnaryFunctions.eCos
eCosh = pyCore.daeeUnaryFunctions.eCosh
eExp = pyCore.daeeUnaryFunctions.eExp
eFloor = pyCore.daeeUnaryFunctions.eFloor
eLn = pyCore.daeeUnaryFunctions.eLn
eLog = pyCore.daeeUnaryFunctions.eLog
eScaling = pyCore.daeeUnaryFunctions.eScaling
eSign = pyCore.daeeUnaryFunctions.eSign
eSin = pyCore.daeeUnaryFunctions.eSin
eSinh = pyCore.daeeUnaryFunctions.eSinh
eSqrt = pyCore.daeeUnaryFunctions.eSqrt
eTan = pyCore.daeeUnaryFunctions.eTan
eTanh = pyCore.daeeUnaryFunctions.eTanh
eUFUnknown = pyCore.daeeUnaryFunctions.eUFUnknown
class daeeBinaryFunctions

Bases: Boost.Python.enum

eArcTan2 = pyCore.daeeBinaryFunctions.eArcTan2
eBFUnknown = pyCore.daeeBinaryFunctions.eBFUnknown
eDivide = pyCore.daeeBinaryFunctions.eDivide
eMax = pyCore.daeeBinaryFunctions.eMax
eMin = pyCore.daeeBinaryFunctions.eMin
eMinus = pyCore.daeeBinaryFunctions.eMinus
eMulti = pyCore.daeeBinaryFunctions.eMulti
ePlus = pyCore.daeeBinaryFunctions.ePlus
ePower = pyCore.daeeBinaryFunctions.ePower
class daeeSpecialUnaryFunctions

Bases: Boost.Python.enum

eAverage = pyCore.daeeSpecialUnaryFunctions.eAverage
eMaxInArray = pyCore.daeeSpecialUnaryFunctions.eMaxInArray
eMinInArray = pyCore.daeeSpecialUnaryFunctions.eMinInArray
eProduct = pyCore.daeeSpecialUnaryFunctions.eProduct
eSUFUnknown = pyCore.daeeSpecialUnaryFunctions.eSUFUnknown
eSum = pyCore.daeeSpecialUnaryFunctions.eSum
class daeeLogicalUnaryOperator

Bases: Boost.Python.enum

eNot = pyCore.daeeLogicalUnaryOperator.eNot
eUOUnknown = pyCore.daeeLogicalUnaryOperator.eUOUnknown
class daeeLogicalBinaryOperator

Bases: Boost.Python.enum

eAnd = pyCore.daeeLogicalBinaryOperator.eAnd
eBOUnknown = pyCore.daeeLogicalBinaryOperator.eBOUnknown
eOr = pyCore.daeeLogicalBinaryOperator.eOr
class daeeConditionType

Bases: Boost.Python.enum

eCTUnknown = pyCore.daeeConditionType.eCTUnknown
eEQ = pyCore.daeeConditionType.eEQ
eGT = pyCore.daeeConditionType.eGT
eGTEQ = pyCore.daeeConditionType.eGTEQ
eLT = pyCore.daeeConditionType.eLT
eLTEQ = pyCore.daeeConditionType.eLTEQ
eNotEQ = pyCore.daeeConditionType.eNotEQ
class daeeActionType

Bases: Boost.Python.enum

eChangeState = pyCore.daeeActionType.eChangeState
eReAssignOrReInitializeVariable = pyCore.daeeActionType.eReAssignOrReInitializeVariable
eSendEvent = pyCore.daeeActionType.eSendEvent
eUnknownAction = pyCore.daeeActionType.eUnknownAction
eUserDefinedAction = pyCore.daeeActionType.eUserDefinedAction
class daeeEquationType

Bases: Boost.Python.enum

eAlgebraic = pyCore.daeeEquationType.eAlgebraic
eETUnknown = pyCore.daeeEquationType.eETUnknown
eExplicitODE = pyCore.daeeEquationType.eExplicitODE
eImplicitODE = pyCore.daeeEquationType.eImplicitODE
class daeeModelType

Bases: Boost.Python.enum

eDAE = pyCore.daeeModelType.eDAE
eMTUnknown = pyCore.daeeModelType.eMTUnknown
eODE = pyCore.daeeModelType.eODE
eSteadyState = pyCore.daeeModelType.eSteadyState

7.1.6. Global constants

cnAlgebraic int(x=0) -> integer
cnDifferential int(x=0) -> integer
cnAssigned int(x=0) -> integer
cnAlgebraic = 0

int(x=0) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-‘ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

cnDifferential = 1

int(x=0) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-‘ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

cnAssigned = 2

int(x=0) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-‘ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4