INonLDVariables.Remove

Syntax

Remove(Index: Integer): Boolean;

Parameters

Index is index of a removed variable.

Description

The Remove method removes the variable from the collection by its index. The method returns True if the deletion was successful.

Example

Executing this example requires the Optima variable that contains system of non-linear equations and parameters for its calculation.

Sub Main;

Var

Optima: NonLinearDecomposition;

PeriodL, j: Integer;

Vars: INonLDVariables;

Res: INonLoResults;

Begin

// Calculating the system

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 Main;

After executing this example a non-linear equation system is created and calculated. Collection of variables is cleared.

See also:

INonLDVariables