*opticonstraintcreate

Creates an optimization constraint.

Syntax

*opticonstraintcreate name response_id bound_type lower_bound upper_bound 1 integer_array number_of_integers

Type

HyperMesh Tcl Modify

Description

Creates an optimization constraint.

Inputs

name
The name of the optimization constraint to create.
response_id
The ID of the response the constraint applies to.
bound_type
A flag that indicates the type of constraint to apply. Valid values are:
  • 0 - Lower bound only
  • 1 - Upper bound only
  • 2 - Both lower and upper bound
lower_bound
The lower bound value. Valid when bound_type is 0 or 2.
upper_bound
The upper bound value. Valid when bound_type is 1 or 2.
integer_array
The ID of the integer array that contains the loadsteps to constraint applies to. The integer array is created using the *createarray command. This should always be set to 1.
number_of_integers
Integer indicating the size (number of loadsteps) in the integer array created using *createarray.

Example

Create an optimization constraint named "const1", applied to response 3 with lower bound -1, upper bound 1 and loadsteps 2-4:

*createarray 3 2 3 4
*opticonstraintcreate "const1" 3 2 -1 1 1 3

Errors

Incorrect usage results in a Tcl error. To detect errors, you can use the catch command:
if { [ catch {command_name...} ] } {
   # Handle error
}