Skip to main content
Definition: ModelCenter/src/ModelCenter.odl (line 1714) An array of double (real) values.
Inherits from:

Members

Properties

Property hasChanged

Definition: ModelCenter/src/ModelCenter.odl (line 1)
Return type: boolean

Property hide

Definition: ModelCenter/src/ModelCenter.odl (line 1)
Return type: boolean

Property OwningComponent

Definition: ModelCenter/src/ModelCenter.odl (line 1)
Return type: LPDISPATCH

Property size

Definition: ModelCenter/src/ModelCenter.odl (line 1)
Return type: long

Property numDimensions

Definition: ModelCenter/src/ModelCenter.odl (line 1)
Return type: long

Property lowerBound

Definition: ModelCenter/src/ModelCenter.odl (line 1)
Lower bound of the array. Return type: double

Property upperBound

Definition: ModelCenter/src/ModelCenter.odl (line 1)
Upper bound of the array. Return type: double

Property description

Definition: ModelCenter/src/ModelCenter.odl (line 1)
Description of the array. Return type: BSTR

Property units

Definition: ModelCenter/src/ModelCenter.odl (line 1)
Units of the array. Return type: BSTR

Property enumAliases

Definition: ModelCenter/src/ModelCenter.odl (line 1)
Enumerated aliases of the array. Return type: BSTR

Property enumValues

Definition: ModelCenter/src/ModelCenter.odl (line 1)
Enumerated values of the array. Return type: BSTR

Property format

Definition: ModelCenter/src/ModelCenter.odl (line 1)
Format of the variable. Return type: BSTR

Property value

Definition: ModelCenter/src/ModelCenter.odl (line 1822)
Get the value of an array element. Parameters:
  • d1: Index in the 1st dimension (0-based index)
  • d2: Index in the 2nd dimension (0-based index)
  • d3: Index in the 3rd dimension (0-based index)
  • d4: Index in the 4th dimension (0-based index)
  • d5: Index in the 5th dimension (0-based index)
  • d6: Index in the 6th dimension (0-based index)
  • d7: Index in the 7th dimension (0-based index)
  • d8: Index in the 8th dimension (0-based index)
  • d9: Index in the 9th dimension (0-based index)
  • d10: Index in the 10th dimension (0-based index)
Returns: The value. Return type: VARIANT

Property value

Definition: ModelCenter/src/ModelCenter.odl (line 1838)
Set the value of an array element. You must set the array size first. Parameters:
  • d1: Index in the 1st dimension (0-based index)
  • d2: Index in the 2nd dimension (0-based index)
  • d3: Index in the 3rd dimension (0-based index)
  • d4: Index in the 4th dimension (0-based index)
  • d5: Index in the 5th dimension (0-based index)
  • d6: Index in the 6th dimension (0-based index)
  • d7: Index in the 7th dimension (0-based index)
  • d8: Index in the 8th dimension (0-based index)
  • d9: Index in the 9th dimension (0-based index)
  • d10: Index in the 10th dimension (0-based index)
  • newValue: New value.
Return type: double

Public functions

Function isValid

Finds out whether or not the array is valid. Returns: yes(TRUE) or no(FALSE). Return type: boolean Reimplements: isValid

Function validate

Causes the array to validate itself. Return type: void Reimplements: validate

Function getName

Gets the name of the array. Returns: The name of the array. Return type: BSTR Reimplements: getName

Function getFullName

Gets the full ModelCenter path of the array. Returns: The full ModelCenter path of the array. Return type: BSTR Reimplements: getFullName

Function getType

Gets the type of the array. Returns: The type of the array as a string. Return type: BSTR Reimplements: getType

Function 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

Converts the array to a string, validating the array if necessary. If the variable is an array, it will to be of the form “1, 2, 3” for one-dimensional arrays or “bounds[3,3] {1, 2, 3, 4, 5, 6, 7, 8, 9}” for multi-dimensional arrays. Returns: The converted string value of the array. Return type: BSTR Reimplements: toString

Function fromString

Sets the value of the array from a specified string. For 1D arrays, the specification is of the form ‘1,2,3’.
For nD arrays, the specification is of the form ‘bounds[2,2,2] {1,2,3,4,5,6,7,8}’.
String arrays may optionally have the elements quoted in the form ‘bounds[2,3] {“a”, “b,c”, “d”, "", “e”, “f”}’
Parameters:
  • value: New value.
Parameters:
  • BSTR value
Return type: void Reimplements: fromString

Function toStringAbsolute

Converts the array to a string. If the variable is an array, it will to be of the form “1, 2, 3” for one-dimensional arrays or “bounds[3,3] {1, 2, 3, 4, 5, 6, 7, 8, 9}” for multi-dimensional arrays. Returns: The converted string value of the array. Return type: BSTR Reimplements: toStringAbsolute

Function 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

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

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

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

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

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

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

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

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

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: Return type: void Reimplements: setMetadata

Function getMetadata

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 toStringEx

Converts the value of an array element to a string, validating the array if necessary. Parameters:
  • index: Index of the array element (0-based index).
Returns: The value of the element as a string. Parameters:
  • long index
Return type: BSTR Reimplements: toStringEx

Function fromStringEx

Sets the value of an array element from a specified string. Parameters:
  • value: New value.
  • index: Index of the array element (0-based index).
Parameters:
  • BSTR value
  • long index
Return type: void Reimplements: fromStringEx

Function toStringAbsoluteEx

Converts the value of an array element to a string. Parameters:
  • index: Index of the array element (0-based index).
Returns: The value of the element as a string. Parameters:
  • long index
Return type: BSTR Reimplements: toStringAbsoluteEx

Function getLength

Get the length of the n’th dimension of the array. Parameters:
  • dim: Dimension of the array to query. This uses a 0 based index, so 0 will give you the first dimension, 1 the second, etc. If omitted, gives the first dimension
Returns: Length(size) of the array. Parameters:
  • [optional] VARIANT dim
Return type: long Reimplements: getLength

Function setLength

Sets the length of the n’th dimension of the array Parameters:
  • length: New length of the n’th dimension of the array
  • dim: The dimension to set. This uses a 0 based index, so 0 will set the first dimension, 1 the second, etc. If omitted, sets the first dimension
Parameters:
  • long length
  • [optional] VARIANT dim
Return type: void Reimplements: setLength

Function setDimensions

Sets the number of dimensions of an array and the length of each dimension in one call. An array initializes to 0 length. If any dimension of the array has 0 length, the whole array contains no data. You must set the array size before filling in values unless you are using the setArray() call. Parameters:
  • d1: length of the 1st dimension of the array
  • d2: length of the 2nd dimension of the array. If omitted, the array is 1 dimensional
  • d3: length of the 3rd dimension of the array. If omitted, the array is 2 dimensional
  • d4: length of the 4th dimension of the array. If omitted, the array is 3 dimensional
  • d5: length of the 5th dimension of the array. If omitted, the array is 4 dimensional
  • d6: length of the 6th dimension of the array. If omitted, the array is 5 dimensional
  • d7: length of the 7th dimension of the array. If omitted, the array is 6 dimensional
  • d8: length of the 8th dimension of the array. If omitted, the array is 7 dimensional
  • d9: length of the 9th dimension of the array. If omitted, the array is 8 dimensional
  • d10: length of the 10th dimension of the array. If omitted, the array is 9 dimensional
Parameters:
  • long d1
  • [optional] VARIANT d2
  • [optional] VARIANT d3
  • [optional] VARIANT d4
  • [optional] VARIANT d5
  • [optional] VARIANT d6
  • [optional] VARIANT d7
  • [optional] VARIANT d8
  • [optional] VARIANT d9
  • [optional] VARIANT d10
Return type: void Reimplements: setDimensions

Function hasLowerBound

Finds out whether or not the array has a lower bound. Returns: Yes (TRUE) or no (FALSE). Return type: boolean

Function hasUpperBound

Finds out whether or not the array has an upper bound. Returns: Yes (TRUE) or no (FALSE). Return type: boolean

Function getValue

Gets the value of an array element. Parameters:
  • d1: index in the 1st dimension (0-based index)
  • d2: index in the 2nd dimension (0-based index)
  • d3: index in the 3rd dimension (0-based index)
  • d4: index in the 4th dimension (0-based index)
  • d5: index in the 5th dimension (0-based index)
  • d6: index in the 6th dimension (0-based index)
  • d7: index in the 7th dimension (0-based index)
  • d8: index in the 8th dimension (0-based index)
  • d9: index in the 9th dimension (0-based index)
  • d10: index in the 10th dimension (0-based index)
Returns: The value. Parameters:
  • VARIANT d1
  • [optional] VARIANT d2
  • [optional] VARIANT d3
  • [optional] VARIANT d4
  • [optional] VARIANT d5
  • [optional] VARIANT d6
  • [optional] VARIANT d7
  • [optional] VARIANT d8
  • [optional] VARIANT d9
  • [optional] VARIANT d10
Return type: double

Function setValue

Sets the value of an array element. You must set the array size first. Parameters:
  • value: New value.
  • d1: position in the 1st dimension of the array (or full index string) (0-based index)
  • d2: position in the 2nd dimension of the array (0-based index)
  • d3: position in the 3rd dimension of the array (0-based index)
  • d4: position in the 4th dimension of the array (0-based index)
  • d5: position in the 5th dimension of the array (0-based index)
  • d6: position in the 6th dimension of the array (0-based index)
  • d7: position in the 7th dimension of the array (0-based index)
  • d8: position in the 8th dimension of the array (0-based index)
  • d9: position in the 9th dimension of the array (0-based index)
  • d10: position in the 10th dimension of the array (0-based index)
Parameters:
  • double value
  • VARIANT d1
  • [optional] VARIANT d2
  • [optional] VARIANT d3
  • [optional] VARIANT d4
  • [optional] VARIANT d5
  • [optional] VARIANT d6
  • [optional] VARIANT d7
  • [optional] VARIANT d8
  • [optional] VARIANT d9
  • [optional] VARIANT d10
Return type: void

Function getArray

Gets the whole array as a single primitive array object in the language’s native array format. This is typically faster than calling individual array elements. Returns: The primitive array Return type: VARIANT

Function setArray

Sets the whole array at once using a single primitive array object in the language’s native array format. This is typically faster than calling individual array elements. The array will take on the size and dimensions of the passed in array. Parameters:
  • array: The primitive source array
Parameters:
  • VARIANT array
Return type: void

Function toFormattedStringEx

Converts the value to a formatted string. Parameters:
  • index: Position in the array (0-based index).
Returns: Formatted string. Parameters:
  • long index
Return type: BSTR

Function fromFormattedStringEx

Loads a formatted string. Parameters:
  • value: Formatted value to load.
  • index: Position in the array (0-based index).
Parameters:
  • BSTR value
  • long index
Return type: void

Function toFormattedStringAbsoluteEx

Converts the value to an absolute formatted string. Parameters:
  • index: Position in the array (0-based index).
Returns: An absolute formatted string. Parameters:
  • long index
Return type: BSTR

Function clearUpperBound

Clears the upper bound property of the array if it has previously been set. Return type: void

Function clearLowerBound

Clears the lower bound property of the array if it has previously been set. Return type: void

Function getValueAbsolute

Gets the value of an array element without validating. Parameters:
  • d1: index in the 1st dimension (0-based index)
  • d2: index in the 2nd dimension (0-based index)
  • d3: index in the 3rd dimension (0-based index)
  • d4: index in the 4th dimension (0-based index)
  • d5: index in the 5th dimension (0-based index)
  • d6: index in the 6th dimension (0-based index)
  • d7: index in the 7th dimension (0-based index)
  • d8: index in the 8th dimension (0-based index)
  • d9: index in the 9th dimension (0-based index)
  • d10: index in the 10th dimension (0-based index)
Returns: The value. Parameters:
  • VARIANT d1
  • [optional] VARIANT d2
  • [optional] VARIANT d3
  • [optional] VARIANT d4
  • [optional] VARIANT d5
  • [optional] VARIANT d6
  • [optional] VARIANT d7
  • [optional] VARIANT d8
  • [optional] VARIANT d9
  • [optional] VARIANT d10
Return type: double