Remove(Index: Integer): Boolean;
Index. Index of removed variable.
The Remove method removes the variable from the collection by its index. The method returns True if removal was successful.
Executing the example requires the Optima variable that contains a system of non-linear equations and parameters for its calculation.
Add a link to the Cp system assembly.
Sub UserProc;
Var
Optima: NonLinearDecomposition;
PeriodL, j: Integer;
Vars: INonLDVariables;
Res: INonLoResults;
Begin
// System calculation
PeriodL := 4;
Res := Optima.Evaluate(PeriodL) As INonLoResults;
Debug.WriteLine(Res.ErrorMsg);
// Display results
If (Res.Status = 0) Then
Vars := Optima.Variables;
For j := 0 To Vars.Count - 1 Do
Vars.Remove(0);
End For;
End If;
End Sub UserProc;
After executing the example a system of non-linear equations is created and calculated. The variables collection is cleared.
See also: