SetVariableType method: OptInterface class
Syntax
SetVariableType(modelID, varArrayID, varType)
Description
Use the SetVariableType method to change the data type of a model variable array.
Parameters
| Parameter | Description |
|---|---|
|
ModelID |
Specify as a string the name of the optimization model for which you want to change the variable type. This must be the name of one of the models associated with the analytic type definition. |
|
varArrayID |
Specify as a string the name of the variable array for which you want to change the variable type. Your application documentation should provide this name. |
|
varType |
Specify one of the following system constants representing the new variable type:
|
Returns
%OptInter_Success if the method succeeds, %OptInter_Fail otherwise.
Example
Local OptInterface &oi = CreateOptInterface();
Local string &varArrayName = "X";
Local integer &result;
&result = &oi.SetVariableType("QE_PSA_MODEL", &varArrayName, %Opt_Var_Bin);
If (&result <> %OptInter_Success) Then
&oi.DumpMsgToLog(%Severity_Status, "Failed to change variable type ");
End-If;