*desvarlinkcreatewithfunction
Creates a design variable link.
Syntax
*desvarlinkcreatewithfunction name mark_id dependent_desvarid functype dequation_id c0 cmult desvar_coeffs numcoeffs
Type
HyperMesh Tcl Modify
Description
This command creates a design variable link that corresponds to a DLINK or DLINK2 card, depending upon the specified arguments:
Inputs
- name
- Name of the design variable link.
- mark_id
- ID of the mark containing the design variables and/or table entries that will be used in creating the design variable link.
- dependent_desvarid
- ID of the dependent design variable.
- functype
- Pre-defined function type used in creating the design variable link. Supported values are:
- 0 – None
- 1 – SUM
- 2 – AVG
- 3 – SSQ
- 4 – RSS
- 5 – MAX
- 6 – MIN
- 7 – AVGABS
- 8 – MAXABS
- 9 – MINABS
- 10 – SUMABS
- dequation_id
- ID of optimization equation.
- c0
- Value of constant used in DLINK (should be set to zero for DLINK2).
- cmult
- Value of constant multiplier used in DLINK (should be set to zero for DLINK2).
- desvar_coeffs
- Coefficient multiplier for independent design variables.
- numcoeffs
- Number of coefficients. This number should be the same as the number of independent design variables in the case of DLINK and zero in the case of DLINK2.
Examples
To create a design variable link dlink_1 with a dependent design variable of ID 2 and
independent design variables dv1 and dv3 with coefficient multipliers of 0.96 and
1.05:
*createmark designvars 1 "dv1" "dv3"
*createmark optitableentrs 1
*createdoublearray 2 0.96 1.05
*desvarlinkcreatewithfunction "dlink_1" 1 2 0 0 0.2 1.3 1 2
To create a design variable link dlink2_1 with a dependent design variable of ID 6 and
table entries t1, t2 and t3, using SSQ function
type:
*createmark designvars 1
*createmark optitableentrs 1 "t1" "t2" "t3"
*createdoublearray 0
*desvarlinkcreatewithfunction "dlink2_1" 1 6 3 0 0 0 1 0
Errors
Incorrect usage results in a Tcl error. To
detect errors, you can use the catch
command:
if { [ catch {command_name...} ] } {
# Handle error
}
Version History
9.0