INonLDVariables.Count

Syntax

Count: Integer;

Description

The property is read-only.

The Count property returns the number of variables in the collection.

Example

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

Sub Main;

Var

Optima: NonLinearDecomposition;

PeriodL, j, i: Integer;

Vars: INonLDVariables;

Vrbl: INonLDVariable;

Res: INonLoResults;

val: Double;

Begin

// Calculate 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

Vrbl := Vars.Item(j);

Debug.WriteLine("Variable: " + Vrbl.Id);

For i := 0 To PeriodL - 1 Do

Val := Res.VarValues(Vrbl.Id)[i];

Debug.WriteLine(Val);

End For;

Debug.WriteLine("-----");

End For;

End If;

End Sub Main;

After executing the example a system of non-linear equations is created and calculated. The calculated variables of the system are displayed in the console window.

See also:

INonLDVariables