7.1. Module pyCore¶
7.1.1. Key modelling concepts¶
7.1.1.1. Classes¶
Base model class. |
|
- class daeVariableType¶
- __init__((object)self, (str)name, (unit)units, (float)lowerBound, (float)upperBound, (float)initialGuess, (float)absTolerance[, (daeeVariableValueConstraint)valueConstraint=pyCore.daeeVariableValueConstraint.eNoConstraint]) None ¶
- property AbsoluteTolerance¶
- property InitialGuess¶
- property LowerBound¶
- property Name¶
- property Units¶
- property UpperBound¶
- property ValueConstraint¶
- class daeObject¶
- property CanonicalName¶
- property Description¶
- GetNameRelativeToParentModel((daeObject)self) str ¶
- GetStrippedName((daeObject)self) str ¶
- GetStrippedNameRelativeToParentModel((daeObject)self) str ¶
- property ID¶
- property Library¶
- property Model¶
- property Name¶
- property Version¶
- class daeDomain¶
- __init__((object)self, (str)name, (daeModel)parentModel, (unit)units[, (str)description='']) None ¶
__init__( (object)self, (str)name, (daePort)parentPort, (unit)units [, (str)description=’’]) -> None
- property 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 ¶
- property LowerBound¶
- property NumberOfIntervals¶
- property NumberOfPoints¶
- property Points¶
- property Type¶
- property Units¶
- property UpperBound¶
- array((daeDomain)self, (object)indexes) adouble_array ¶
- class daeParameter¶
- __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 argumentsindex1, ..., 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
objectplain 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 ¶
- property Domains¶
- GetDomainsIndexesMap((daeParameter)self, (int)indexBase) dict ¶
- property NumberOfPoints¶
- property ReportingOn¶
- property Units¶
- property npyValues¶
- class daeVariable¶
- __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 argumentsindex1, ..., 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 inpyCore.daeParameter.array()
- property BlockIndexes¶
- DistributeOnDomain((daeVariable)self, (daeDomain)domain) None ¶
- property Domains¶
- GetDomainsIndexesMap((daeVariable)self, (int)indexBase) dict ¶
- property NumberOfPoints¶
- property OverallIndex¶
- property 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
- property Type¶
- property VariableType¶
- property npyGatheredIDs¶
- property npyIDs¶
- property npyTimeDerivatives¶
- property npyValues¶
- class daeModel¶
Base model class.
- __init__((object)self, (str)name[, (daeModel)parentModel=0[, (str)description='']]) None : ¶
Constructor…
- property ComponentArrays¶
A list of arrays of components in the model.
- property Components¶
A list of components in the model.
- property 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
- property 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 : ¶
.
- property Equations¶
A list of equations in the model.
- property EventPortConnections¶
A list of event port connections in the model.
- property 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.
- property InitialConditionMode¶
A mode used to calculate initial conditions …
- InitializeModel((daeModel)self, (str)jsonInit) None ¶
- property IsModelDynamic¶
Boolean flag that determines whether the model is synamic or steady-state.
- property 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 : ¶
.
- property OnConditionActions¶
A list of OnCondition actions in the model.
- property OnEventActions¶
A list of OnEvent actions in the model.
- property OverallIndex_BlockIndex_VariableNameMap¶
- property Parameters¶
A list of parameters in the model.
- property PortArrays¶
A list of arrays of ports in the model.
- property PortConnections¶
A list of port connections in the model.
- property 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 : ¶
.
- property 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
- property Variables¶
A list of variables in the model.
- property dictComponentArrays¶
A list of arrays of components in the model.
- property dictComponents¶
A list of components in the model.
- property dictDomains¶
A list of domains in the model.
- property dictEquations¶
A list of equations in the model.
- property dictEventPortConnections¶
A list of event port connections in the model.
- property dictEventPorts¶
A list of event ports in the model.
- property dictOnConditionActions¶
A list of OnCondition actions in the model.
- property dictOnEventActions¶
A list of OnEvent actions in the model.
- property dictParameters¶
A list of parameters in the model.
- property dictPortArrays¶
A list of arrays of ports in the model.
- property dictPortConnections¶
A list of port connections in the model.
- property dictPorts¶
A list of ports in the model.
- property dictSTNs¶
A list of state transition networks in the model.
- property dictVariables¶
A list of variables in the model.
- class daeEquation¶
- property BuildJacobianExpressions¶
- property CheckUnitsConsistency¶
- DistributeOnDomain((daeEquation)self, (daeDomain)domain, (daeeDomainBounds)domainBounds[, (str)name='']) daeDEDI ¶
DistributeOnDomain( (daeEquation)self, (daeDomain)domain, (list)domainIndexes [, (str)name=’’]) -> daeDEDI
- property DistributedEquationDomainInfos¶
- property EquationExecutionInfos¶
- property EquationType¶
- property Residual¶
- property Scaling¶
- property SimplifyExpressions¶
- class daeEquationExecutionInfo¶
- property ComputeStack¶
- property DiffVariableIndexes¶
- property Equation¶
- property EquationIndex¶
- property EquationType¶
- GetComputeStackInfo((daeEquationExecutionInfo)self[, (dict)unaryOps={}[, (dict)binaryOps={}]]) tuple ¶
- property JacobianExpressions¶
- property Name¶
- property Node¶
- property VariableIndexes¶
- class daeIF¶
- class daeState¶
- property Equations¶
- property NestedSTNs¶
- property OnConditionActions¶
- property OnEventActions¶
- class daePort¶
- __init__((object)self, (str)name, (daeePortType)type, (daeModel)parentModel[, (str)description='']) None ¶
- property Domains¶
- Export((daePort)self, (str)content, (daeeModelLanguage)language, (daeModelExportContext)context) None ¶
- property Parameters¶
- SetReportingOn((daePort)self, (bool)reportingOn) None ¶
- property Type¶
- property Variables¶
- property dictDomains¶
- property dictParameters¶
- property dictVariables¶
- class daeEventPort¶
- __init__((object)self, (str)name, (daeePortType)type, (daeModel)parentModel[, (str)description='']) None ¶
- property EventData¶
- property Events¶
- ReceiveEvent((daeEventPort)self, (float)data) None ¶
- property RecordEvents¶
- SendEvent((daeEventPort)self, (float)data) None ¶
- property Type¶
- class daeScalarExternalFunction¶
- __init__((object)self, (str)name, (daeModel)parentModel, (unit)units, (dict)arguments) None ¶
- Calculate((daeScalarExternalFunction)self, (dict)values) object ¶
Calculate( (daeScalarExternalFunction)arg1, (dict)arg2) -> None
- property Name¶
- class daeVectorExternalFunction¶
- __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
- property Name¶
- property NumberOfResults¶
- class daeDomainIndex¶
- __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
- property DEDI¶
- property Increment¶
- property Index¶
- property Type¶
- class daeIndexRange¶
- __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
- property Domain¶
- property EndIndex¶
- property NoPoints¶
- property StartIndex¶
- property Step¶
- property Type¶
- class daeArrayRange¶
- __init__((object)self, (daeDomainIndex)domainIndex) None ¶
__init__( (object)self, (daeIndexRange)indexRange) -> None
- property DomainIndex¶
- property NoPoints¶
- property Range¶
- property Type¶
- class daeDEDI¶
- __init__()¶
Raises an exception This class cannot be instantiated from Python
- property Domain¶
- property DomainBounds¶
- property DomainPoints¶
- class daeAction¶
- __init__((object)self) None ¶
- Execute((daeAction)self) None ¶
Execute( (daeAction)arg1) -> None
- property RuntimeNode¶
- property STN¶
- property SendEventPort¶
- property SetupNode¶
- property StateTo¶
- property Type¶
- property VariableWrapper¶
- class daeOnEventActions¶
- property Actions¶
- property EventPort¶
- Execute((daeOnEventActions)arg1) None ¶
- property UserDefinedActions¶
- class daeOnConditionActions¶
- property Actions¶
- property Condition¶
- Execute((daeOnConditionActions)arg1) None ¶
- property UserDefinedActions¶
- class daeOptimizationVariable¶
- __init__((object)self) None ¶
- property LowerBound¶
- property Name¶
- property Scaling¶
- property StartingPoint¶
- property Type¶
- property Units¶
- property UpperBound¶
- property Value¶
- class daeObjectiveFunction¶
- __init__((object)self) None ¶
- property AbsTolerance¶
- property Gradients¶
- property Name¶
- property Residual¶
- property Scaling¶
- property Value¶
7.1.1.2. Functions¶
Constant( (quantity)value) -> 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 ¶
- Array((list)values) adouble_array ¶
7.1.2. Auto-differentiation and equation evaluation tree support¶
7.1.2.1. Classes¶
Class adouble operates on values/derivatives of domains, parameters and variables. |
|
Class adouble_array operates on arrays of values/derivatives of domains, parameters and variables. |
|
- class adouble¶
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 ¶
- property Derivative¶
- property GatherInfo¶
Internally used by the framework.
- property Node¶
Contains the equation evaluation node.
- NodeAsLatex((adouble)arg1) str ¶
- NodeAsPlainText((adouble)arg1) str ¶
- property Value¶
- class adouble_array¶
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
- property GatherInfo¶
Used internally by the framework.
- property 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¶
Since it is not allowed to overload Python’s operators
and
,or
andnot
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 operatoror
.- __and__((daeCondition)self, (daeCondition)right) daeCondition ¶
Bitwise operator and (
&
) in DAE Tools is used as a logical comparison operatorand
.- __inv__((daeCondition)self, (daeCondition)right) daeCondition ¶
Bitwise inversion operator (
~
) in DAE Tools is used as a logical comparison operatornot
.- RuntimeNodeAsLatex((daeCondition)arg1) str ¶
- RuntimeNodeAsPlainText((daeCondition)arg1) str ¶
- SetupNodeAsLatex((daeCondition)arg1) str ¶
- SetupNodeAsPlainText((daeCondition)arg1) str ¶
7.1.2.2. Mathematical functions¶
Exp( (adouble_array)arg1) -> adouble_array |
|
Log( (adouble_array)arg1) -> adouble_array |
|
Log10( (adouble_array)arg1) -> adouble_array |
|
Sqrt( (adouble_array)arg1) -> adouble_array |
|
Pow( (adouble)arg1, (adouble)arg2) -> adouble |
|
Sin( (adouble_array)arg1) -> adouble_array |
|
Cos( (adouble_array)arg1) -> adouble_array |
|
Tan( (adouble_array)arg1) -> adouble_array |
|
ASin( (adouble_array)arg1) -> adouble_array |
|
ACos( (adouble_array)arg1) -> adouble_array |
|
ATan( (adouble_array)arg1) -> adouble_array |
|
Sinh( (adouble_array)arg1) -> adouble_array |
|
Cosh( (adouble_array)arg1) -> adouble_array |
|
Tanh( (adouble_array)arg1) -> adouble_array |
|
ASinh( (adouble_array)arg1) -> adouble_array |
|
ACosh( (adouble_array)arg1) -> adouble_array |
|
ATanh( (adouble_array)arg1) -> adouble_array |
|
ATan2( (adouble_array)arg1, (adouble_array)arg2) -> adouble_array |
|
Erf( (adouble_array)arg1) -> adouble_array |
|
Ceil( (adouble_array)arg1) -> adouble_array |
|
Floor( (adouble_array)arg1) -> adouble_array |
|
Abs( (adouble_array)arg1) -> adouble_array |
|
Min( (float)arg1, (adouble)arg2) -> adouble |
|
Max( (float)arg1, (adouble)arg2) -> adouble |
- Pow((adouble)arg1, (float)arg2) adouble ¶
Pow( (adouble)arg1, (adouble)arg2) -> adouble
Pow( (float)arg1, (adouble)arg2) -> adouble
- ATan2((adouble)arg1, (adouble)arg2) adouble ¶
ATan2( (adouble_array)arg1, (adouble_array)arg2) -> adouble_array
7.1.3. Auxiliary classes¶
- class daeVariableWrapper¶
- __init__((object)self, (daeVariable)variable[, (str)name='']) None ¶
__init__( (object)self, (adouble)ad [, (str)name=’’]) -> None
- property DomainIndexes¶
- property Name¶
- property OverallIndex¶
- property Value¶
- property Variable¶
- property VariableType¶
- class daeConfig¶
- __contains__((daeConfig)self, (object)propertyPath) object ¶
- __getitem__((daeConfig)self, (object)propertyPath) object ¶
- __setitem__((daeConfig)self, (object)propertyPath, (object)value) None ¶
- property 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 ¶
7.1.4. Auxiliary functions¶
- daeVersion([(bool)includeBuild=False]) str ¶
- daeVersionMajor() int ¶
- daeVersionMinor() int ¶
- daeVersionBuild() int ¶
- daeGetConfig() object ¶
- daeSetConfigFile((str)arg1) None ¶
7.1.5. Enumerations¶
- class daeeDomainType¶
- eArray = pyCore.daeeDomainType.eArray¶
- eDTUnknown = pyCore.daeeDomainType.eDTUnknown¶
- eStructuredGrid = pyCore.daeeDomainType.eStructuredGrid¶
- eUnstructuredGrid = pyCore.daeeDomainType.eUnstructuredGrid¶
- class daeeParameterType¶
- eBool = pyCore.daeeParameterType.eBool¶
- eInteger = pyCore.daeeParameterType.eInteger¶
- ePTUnknown = pyCore.daeeParameterType.ePTUnknown¶
- eReal = pyCore.daeeParameterType.eReal¶
- class daeePortType¶
- eInletPort = pyCore.daeePortType.eInletPort¶
- eOutletPort = pyCore.daeePortType.eOutletPort¶
- eUnknownPort = pyCore.daeePortType.eUnknownPort¶
- class daeeDiscretizationMethod¶
- eBFDM = pyCore.daeeDiscretizationMethod.eBFDM¶
- eCFDM = pyCore.daeeDiscretizationMethod.eCFDM¶
- eDMUnknown = pyCore.daeeDiscretizationMethod.eDMUnknown¶
- eFFDM = pyCore.daeeDiscretizationMethod.eFFDM¶
- eUpwindCCFV = pyCore.daeeDiscretizationMethod.eUpwindCCFV¶
- class daeeDomainBounds¶
- 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¶
- eAlgebraicValuesProvided = pyCore.daeeInitialConditionMode.eAlgebraicValuesProvided¶
- eICTUnknown = pyCore.daeeInitialConditionMode.eICTUnknown¶
- eQuasiSteadyState = pyCore.daeeInitialConditionMode.eQuasiSteadyState¶
- class daeeDomainIndexType¶
- eConstantIndex = pyCore.daeeDomainIndexType.eConstantIndex¶
- eDITUnknown = pyCore.daeeDomainIndexType.eDITUnknown¶
- eDomainIterator = pyCore.daeeDomainIndexType.eDomainIterator¶
- eIncrementedDomainIterator = pyCore.daeeDomainIndexType.eIncrementedDomainIterator¶
- eLastPointInDomain = pyCore.daeeDomainIndexType.eLastPointInDomain¶
- class daeeRangeType¶
- eRaTUnknown = pyCore.daeeRangeType.eRaTUnknown¶
- eRange = pyCore.daeeRangeType.eRange¶
- eRangeDomainIndex = pyCore.daeeRangeType.eRangeDomainIndex¶
- class daeIndexRangeType¶
- eAllPointsInDomain = pyCore.daeIndexRangeType.eAllPointsInDomain¶
- eCustomRange = pyCore.daeIndexRangeType.eCustomRange¶
- eIRTUnknown = pyCore.daeIndexRangeType.eIRTUnknown¶
- eRangeOfIndexes = pyCore.daeIndexRangeType.eRangeOfIndexes¶
- class daeeOptimizationVariableType¶
- eBinaryVariable = pyCore.daeeOptimizationVariableType.eBinaryVariable¶
- eContinuousVariable = pyCore.daeeOptimizationVariableType.eContinuousVariable¶
- eIntegerVariable = pyCore.daeeOptimizationVariableType.eIntegerVariable¶
- class daeeModelLanguage¶
- eCDAE = pyCore.daeeModelLanguage.eCDAE¶
- eMLNone = pyCore.daeeModelLanguage.eMLNone¶
- ePYDAE = pyCore.daeeModelLanguage.ePYDAE¶
- class daeeConstraintType¶
- eEqualityConstraint = pyCore.daeeConstraintType.eEqualityConstraint¶
- eInequalityConstraint = pyCore.daeeConstraintType.eInequalityConstraint¶
- class daeeUnaryFunctions¶
- 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¶
- 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¶
- 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¶
- eNot = pyCore.daeeLogicalUnaryOperator.eNot¶
- eUOUnknown = pyCore.daeeLogicalUnaryOperator.eUOUnknown¶
- class daeeLogicalBinaryOperator¶
- eAnd = pyCore.daeeLogicalBinaryOperator.eAnd¶
- eBOUnknown = pyCore.daeeLogicalBinaryOperator.eBOUnknown¶
- eOr = pyCore.daeeLogicalBinaryOperator.eOr¶
- class daeeConditionType¶
- 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¶
- eChangeState = pyCore.daeeActionType.eChangeState¶
- eReAssignOrReInitializeVariable = pyCore.daeeActionType.eReAssignOrReInitializeVariable¶
- eSendEvent = pyCore.daeeActionType.eSendEvent¶
- eUnknownAction = pyCore.daeeActionType.eUnknownAction¶
- eUserDefinedAction = pyCore.daeeActionType.eUserDefinedAction¶
7.1.6. Global constants¶
int([x]) -> integer int(x, base=10) -> integer |
|
int([x]) -> integer int(x, base=10) -> integer |
|
int([x]) -> integer int(x, base=10) -> integer |
- cnAlgebraic = 0¶
int([x]) -> 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]) -> 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]) -> 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