Adams Basic Package > Adams View > View Command Language > data_element > data_element create array ic_array

data_element create array ic_array

Allows you to create an ic_array. This element creates a one-dimensional array of real numbers that can be accessed in user-written subroutines. You can use an IC_ARRAY to designate define initial conditions array for an LINEAR_STATE_EQUATION or GENERAL_STATE_EQUATION. In that case, you should ensure that the value of the SIZE parameters the same as the X_STATE_ARRAY (state variable) of the associated LINEAR_STATE_EQUATION or GENERAL_STATE_EQUATION.

Format:

 
data_element create array ic_array
array_name =
array_name
adams_id =
integer
comments =
string
size =
integer
numbers =
real

Example:

 
data_element create array ic_array &
array_name =
.model_1.array_1 &
adams_id =
1 &
size =
3 &
numbers =
2.1,3.4,5

Description:

 
Parameter
Value Type
Description
array_name,
Array name
Specifies the name of the new array. You may use this name later to refer to this array.
adams_id
Integer
Specifies an integer used to identify this element in the Adams data file.
comments
String
Specifies comments for the object being created or modified.
Size
Integer
Specifies the size of an array.
numbers
Real
Allows you to enter a one dimensional array of real numbers when using the IC_ARRAY of the GENERAL_ARRAY. The number of entries should match the value of the SIZE parameter.

Extended Definition:

1. Adams View will not allow you to have two arrays with the same full name, so you must provide a unique name.
Normally, entity names are composed of alphabetic, numeric, or '_' (underscore) characters, and start with an alphabetic or '_' character. They may be any length. For more information, see Using Extended Names.
By enclosing the name in double quotes, you may use other printable characters, or start the name with a numeral. If a name contains characters, or starts with a numeral, you must always quote the name when entering it.
Note that you can specify the parentage of an entity (for example, what part "owns" a marker or a geometry element) when you CREATE it by changing the name. If you enter just the entity name, then the default parent will be assigned by Adams View. If you type in the full name, then you may over ride the default parent. In most cases, when creating an entity, Adams View will provide a default name. The default name that Adams View provides will specify the parentage that it has assumed. You may, or course, delete this name and use your own. The form of a full name is:
"...._NAME.GRAND_PARENT_NAME.PARENT_NAME.ENTITY_NAME"
The number of levels used varies from case to case and the parentage must exist before an entity can be assigned to it.
2. When you use the FILE ADAMS_DATA_SET WRITE command, Adams View writes an Adams data file for your model. Adams requires that each modeling element be identified by a unique integer identifier. If you use this parameter to specify a non-zero identifier, Adams View will use it in the corresponding statement in the Adams data file.
You may also enter zero as an identifier, either explicitly or by default. The next time you write an Adams file, Adams View will replace the zero with a unique, internally-generated identifier. Adams View will permanently store this identifier with the element just as if you had entered it yourself.
Normally, you would let all identifiers default to zero, and Adams View would generate the identifiers for you. You are never required to enter a non-zero identifier. You only need to specify it if, for some reason, you wish to control the Adams file output.
3. In cases where Adams calculates the SIZE differently from the SIZE that the user supplies, Adams returns an error or warning message.
For the X_STATE_ARRAYs and Y_OUTPUT_ARRAYs, the corresponding systems modeling element automatically determines the size of the array and checks it against the ARRAY command SIZE parameter value (if given).
For the IC_ARRAY, the SIZE parameter is optional and Adams determines the actual size of the array during parsing, as it counts the NUMBERS values. However, if you provide a value for SIZE , Adams checks the count for consistency.
The SIZE argument, if used, should match the number of entries in the VARIABLE_NAME parameter, the NUMBERS parameters, or the size needed for the associated systems element. Adams View provides the SIZE parameter mainly for user convenience in model creation (it is not required). For LINEAR_STATE_EQUATION arrays, the X_STATE_ARRAY size is the row dimension of the A_STATE_MATRIX, and the Y_OUTPUT_ARRAY size is the row dimension of the C_OUTPUT_MATRIX or the D_FEEDFORWARD_MATRIX. For TRANSFER_FUNCTION arrays, the transformation from polynomial ratio type to canonical state space type internally determines the X_STATE_ARRAY size; the Y_OUTPUT_ARRAY size is always 1. For GENERAL_STATE_EQUATION arrays, the X_STATE_ARRAY size is the STATE_EQUATION_COUNT as defined in the matching GENERAL_STATE_EQUATION definition and Y_OUTPUT_ARRAY size is the OUTPUT_EQUATION_COUNT, as defined in the same GENERAL_STATE_EQUATION definition.