Interface ModelCenter::IIntegerVariable
Last update: 16.07.2025
Definition: ModelCenter/src/ModelCenter.odl (line 3461)
COM Instance.
Inherits from:
Members
- clearLowerBound
- clearUpperBound
- dependentLinks
- dependents
- description
- directDependents
- directPrecedents
- enumAliases
- enumValues
- format
- fromFormattedString
- fromString
- getFullName
- getMetadata
- getName
- getType
- hasChanged
- hasLowerBound
- hasUpperBound
- hide
- invalidate
- isInput
- isInputToComponent
- isInputToModel
- isValid
- lowerBound
- OwningComponent
- precedentLinks
- precedents
- setInitialValue
- setMetadata
- toFormattedString
- toFormattedStringAbsolute
- toString
- toStringAbsolute
- units
- upperBound
- validate
- value
- valueAbsolute
Properties
Property hasChanged
Definition: ModelCenter/src/ModelCenter.odl (line 1)
boolean ModelCenter::IIntegerVariable::hasChanged
Return type: boolean
Property hide
Definition: ModelCenter/src/ModelCenter.odl (line 1)
boolean ModelCenter::IIntegerVariable::hide
Return type: boolean
Property OwningComponent
Definition: ModelCenter/src/ModelCenter.odl (line 1)
LPDISPATCH ModelCenter::IIntegerVariable::OwningComponent
Return type: LPDISPATCH
Property value
Definition: ModelCenter/src/ModelCenter.odl (line 1)
long ModelCenter::IIntegerVariable::value
Value of the variable.
Return type: long
Property valueAbsolute
Definition: ModelCenter/src/ModelCenter.odl (line 1)
long ModelCenter::IIntegerVariable::valueAbsolute
The value of the variable (Fetched without attempting to validate).
Return type: long
Property lowerBound
Definition: ModelCenter/src/ModelCenter.odl (line 1)
long ModelCenter::IIntegerVariable::lowerBound
Lower bound of the variable.
Return type: long
Property upperBound
Definition: ModelCenter/src/ModelCenter.odl (line 1)
long ModelCenter::IIntegerVariable::upperBound
Upper bound of the variable.
Return type: long
Property units
Definition: ModelCenter/src/ModelCenter.odl (line 1)
BSTR ModelCenter::IIntegerVariable::units
Units of the variable.
Return type: BSTR
Property description
Definition: ModelCenter/src/ModelCenter.odl (line 1)
BSTR ModelCenter::IIntegerVariable::description
Description of the variable.
Return type: BSTR
Property enumValues
Definition: ModelCenter/src/ModelCenter.odl (line 1)
BSTR ModelCenter::IIntegerVariable::enumValues
Enumerated values of the variable.
Return type: BSTR
Property enumAliases
Definition: ModelCenter/src/ModelCenter.odl (line 1)
BSTR ModelCenter::IIntegerVariable::enumAliases
Enumerated aliases of the variable.
Return type: BSTR
Property format
Definition: ModelCenter/src/ModelCenter.odl (line 1)
BSTR ModelCenter::IIntegerVariable::format
Format of the variable.
Return type: BSTR
Public functions
Function isValid
boolean ModelCenter::IIntegerVariable::isValid()
Returns whether or not the variable is valid.
Returns:
True if variable is valid. False if the variable is not valid.
Return type: boolean
Reimplements: isValid
Function validate
void ModelCenter::IIntegerVariable::validate()
Validates the variable by running the component if needed.
Return type: void
Reimplements: validate
Function getName
BSTR ModelCenter::IIntegerVariable::getName()
Gets the name of the variable.
Returns:
The name of the variable.
Return type: BSTR
Reimplements: getName
Function getFullName
BSTR ModelCenter::IIntegerVariable::getFullName()
Gets the full ModelCenter path of the variable.
Returns:
The full ModelCenter path of the variable.
Return type: BSTR
Reimplements: getFullName
Function getType
BSTR ModelCenter::IIntegerVariable::getType()
Gets the type of the variable.
Returns:
The type of the variable as a string.
Return type: BSTR
Reimplements: getType
Function isInput
boolean ModelCenter::IIntegerVariable::isInput()
Finds out whether or not the variable is an input with respect to the model. Returns the same value as isInputToModel.
Return values:
- true: Input
- false: Output
Return type: boolean
Reimplements: isInput
Function toString
BSTR ModelCenter::IIntegerVariable::toString()
Converts the variable value to a string, validating the variable if necessary.
Returns:
The value of the variable as a string.
Return type: BSTR
Reimplements: toString
Function fromString
void ModelCenter::IIntegerVariable::fromString(BSTR value)
Sets the value of the variable from the specified string.
Parameters:
- value: New value.
Parameters:
- BSTR value
Return type: void
Reimplements: fromString
Function toStringAbsolute
BSTR ModelCenter::IIntegerVariable::toStringAbsolute()
Converts the value of the variable to a string.
Returns:
The value of the variable as a string.
Return type: BSTR
Reimplements: toStringAbsolute
Function invalidate
void ModelCenter::IIntegerVariable::invalidate()
Marks the variable as invalid (needs to be computed). This will set all dependent variables invalid also.
Return type: void
Reimplements: invalidate
Function directPrecedents
LPDISPATCH ModelCenter::IIntegerVariable::directPrecedents([optional]VARIANT followSuspended, [optional]VARIANT reserved)
Returns a list of variables that are immediate precedents to the value of this variable. This function returns all variables that influence this variable and are directly connected via a link to it.
Parameters:
- followSuspended: Optional boolean specifies whether links which are suspended should be included in the search. Default is false.
- reserved: Reserved for future use.
Returns:
IDispatch* to an IVariables object.
Parameters:
- [optional] VARIANT followSuspended
- [optional] VARIANT reserved
Return type: LPDISPATCH
Reimplements: directPrecedents
Function directDependents
LPDISPATCH ModelCenter::IIntegerVariable::directDependents([optional]VARIANT followSuspended, [optional]VARIANT reserved)
Returns a list of variables that are immediate dependents of the value of this variable. This function returns all variables that are influenced by this variable and are directly connected via a link to it.
Parameters:
- followSuspended: Optional boolean specifies whether links which are suspended should be included in the search. Default is false.
- reserved: Reserved for future use.
Returns:
IDispatch* to an IVariables object.
Parameters:
- [optional] VARIANT followSuspended
- [optional] VARIANT reserved
Return type: LPDISPATCH
Reimplements: directDependents
Function precedentLinks
LPDISPATCH ModelCenter::IIntegerVariable::precedentLinks([optional]VARIANT reserved)
Returns a list of links that are immediate precedents to the value of this variable. All the returned links will have this variable as the LHS of the equation. Except for arrays, the returned list will be 1 element long.
Parameters:
- reserved: Reserved for future use.
Returns:
IDispatch* to an IVariableLinks object.
Parameters:
- [optional] VARIANT reserved
Return type: LPDISPATCH
Reimplements: precedentLinks
Function dependentLinks
LPDISPATCH ModelCenter::IIntegerVariable::dependentLinks([optional]VARIANT reserved)
Returns a list of links that immediately depend on the value of this variable. All the returned links will have this variable as part of a RHS equation.
Parameters:
- reserved: Reserved for future use.
Returns:
IDispatch* to an IVariableLinks object.
Parameters:
- [optional] VARIANT reserved
Return type: LPDISPATCH
Reimplements: dependentLinks
Function precedents
LPDISPATCH ModelCenter::IIntegerVariable::precedents([optional]VARIANT followSuspended, [optional]VARIANT reserved)
Returns a list of variables that are precedents to the value of this variable. This function returns all variables that influence this variable, not just directly connected ones.
Parameters:
- followSuspended: Optional boolean specifies whether links which are suspended should be included in the search. Default is false.
- reserved: Reserved for future use.
Returns:
IDispatch* to an IVariables object.
Parameters:
- [optional] VARIANT followSuspended
- [optional] VARIANT reserved
Return type: LPDISPATCH
Reimplements: precedents
Function dependents
LPDISPATCH ModelCenter::IIntegerVariable::dependents([optional]VARIANT followSuspended, [optional]VARIANT reserved)
Returns a list of variables that are dependent upon the value of this variable. This function returns all variables that are influenced by this variable, not just directly connected ones.
Parameters:
- followSuspended: Optional boolean specifies whether links which are suspended should be included in the search. Default is false.
- reserved: Reserved for future use.
Returns:
IDispatch* to an IVariables object.
Parameters:
- [optional] VARIANT followSuspended
- [optional] VARIANT reserved
Return type: LPDISPATCH
Reimplements: dependents
Function isInputToComponent
boolean ModelCenter::IIntegerVariable::isInputToComponent()
Checks whether or not the variable is an input. Returns true if the variable was originally added as an input, ignoring the current state that can change based off of links.
Return values:
- true: Input
- false: Output
Return type: boolean
Reimplements: isInputToComponent
Function isInputToModel
boolean ModelCenter::IIntegerVariable::isInputToModel()
Checks whether or not the variable is an input. A linked input returns false (Output).
Return values:
- true: Input
- false: Output
Return type: boolean
Reimplements: isInputToModel
Function setMetadata
void ModelCenter::IIntegerVariable::setMetadata(BSTR name, MetadataType type, VARIANT value, MetadataAccess access, boolean archive)
Sets the meta data value of the given meta data key name.
Parameters:
- name: Metadata specifier used to store the data.
- type:
- value:
- access:
- archive:
Parameters:
- BSTR name
- MetadataType type
- VARIANT value
- MetadataAccess access
- boolean archive
Return type: void
Reimplements: setMetadata
Function getMetadata
VARIANT ModelCenter::IIntegerVariable::getMetadata(BSTR name)
Gets the meta data value of the given meta data key name.
Parameters:
- name: Metadata key name.
Returns:
Metadata value.
Parameters:
- BSTR name
Return type: VARIANT
Reimplements: getMetadata
Function setInitialValue
void ModelCenter::IIntegerVariable::setInitialValue(long value)
Sets the initial value of the variable.
Parameters:
- value: Initial value.
Parameters:
- long value
Return type: void
Function hasLowerBound
boolean ModelCenter::IIntegerVariable::hasLowerBound()
Whether or not the variable has an lower bound.
Returns:
yes(TRUE) or no(FALSE).
Return type: boolean
Function hasUpperBound
boolean ModelCenter::IIntegerVariable::hasUpperBound()
Whether or not the variable has an upper bound.
Returns:
yes(TRUE) or no(FALSE).
Return type: boolean
Function toFormattedString
BSTR ModelCenter::IIntegerVariable::toFormattedString()
Converts the value to a formatted string.
Returns:
The formatted value.
Return type: BSTR
Function fromFormattedString
void ModelCenter::IIntegerVariable::fromFormattedString(BSTR value)
Sets the value from a formatted string.
Parameters:
- value: Formatted value to load.
Parameters:
- BSTR value
Return type: void
Function toFormattedStringAbsolute
BSTR ModelCenter::IIntegerVariable::toFormattedStringAbsolute()
Converts the value to a formatted string without validating.
Returns:
The formatted value.
Return type: BSTR
Function clearUpperBound
void ModelCenter::IIntegerVariable::clearUpperBound()
Clears the lower bound property of the variable if it has previously been set.
Return type: void
Function clearLowerBound
void ModelCenter::IIntegerVariable::clearLowerBound()
Clears the upper bound property of the variable if it has previously been set.
Return type: void