AddAllSeries;
AddAllSeries();
The AddAllSeries method adds all the initial express modeling series to the summary statistics calculation set.
To add a certain series use the IEmStatisticsSettings.Add method; to remove all series use the IEmStatisticsSettings.RemoveAllSeries method.
To execute the example, add a link to the Modeller system assembly.
The example is a procedure that contains one input parameter ExprModeller that is an object that determines express modeling parameters.
Sub StatSeries(ExprModeller: IExpressModeller);
Var
Sett: IEmStatisticsSettings;
ModSeries: IEmSeries;
Serie: IEmSerie;
i, j: Integer;
Header: IEmHeader;
Begin
Sett := ExprModeller.CreateStatisticsSettings;
ModSeries := ExprModeller.Series;
If ModSeries.Count > 0 Then
Sett.AddAllSeries;
For i := 0 To Sett.SerieCount - 1 Do
Serie := Sett.Serie(i);
Debug.WriteLine(Serie.FullName);
Debug.WriteLine(" - identifier: " + Serie.Name);
Debug.WriteLine(" - name: " + Serie.DisplayName);
Debug.WriteLine(" - calculated: " + (Serie.Source <> Null).ToString);
Debug.WriteLine(" - observations: ");
Header := ExprModeller.Header;
Debug.Indent;
For j := 0 To Serie.Count - 1 Do
Debug.Write(Header.Item(j) + ": ");
Debug.WriteLine(Serie.Item(j));
End For;
Debug.Unindent;
Debug.Write(" - average: ");
Debug.WriteLine(Serie.Statistic(EmStatistics.Average));
End For;
ExprModeller.EvaluateMethod("C:\Statistics.html", Sett, True);
Else
Debug.WriteLine("Data is missing");
End If;
End Sub StatSeries;
Example execution result: all the express modeling source series that are specified in the input parameter are used for the summary statistics calculation; every series data, series observations values and their average are displayed in the console window. The summary statistics calculation report is output to the C:\Statistics.html file.
The example is a procedure that contains one input parameter ExprModeller that is an object that determines express modeling parameters.
Imports Prognoz.Platform.Interop.Modeller;
…
Public Shared Sub StatSeries(ExprModeller: IExpressModeller);
Var
Sett: IEmStatisticsSettings;
ModSeries: IEmSeries;
Serie: IEmSerie;
i, j: Integer;
Header: IEmHeader;
Begin
Sett := ExprModeller.CreateStatisticsSettings();
ModSeries := ExprModeller.Series;
If ModSeries.Count > 0 Then
Sett.AddAllSeries();
For i := 0 To Sett.SerieCount - 1 Do
Serie := Sett.Serie[i];
System.Diagnostics.Debug.WriteLine(Serie.FullName);
System.Diagnostics.Debug.WriteLine(" - identifier: " + Serie.Name);
System.Diagnostics.Debug.WriteLine(" - name: " + Serie.DisplayName);
System.Diagnostics.Debug.WriteLine(" - calculated: " + (Serie.Source <> Null).ToString());
System.Diagnostics.Debug.WriteLine(" - observations: ");
Header := ExprModeller.Header;
System.Diagnostics.Debug.Indent();
For j := 0 To Serie.Count - 1 Do
System.Diagnostics.Debug.Write(Header.Item[j] + ": ");
System.Diagnostics.Debug.WriteLine(Serie.Item[j]);
End For;
System.Diagnostics.Debug.Unindent();
System.Diagnostics.Debug.Write(" - average: ");
System.Diagnostics.Debug.WriteLine(Serie.Statistic[EmStatistics.emsAverage]);
End For;
ExprModeller.EvaluateMethod("C:\Statistics.html", Sett, True);
Else
System.Diagnostics.Debug.WriteLine("Data is missing");
End If;
End Sub StatSeries;
Example execution result: all the express modeling source series that are specified in the input parameter are used for the summary statistics calculation; every series data, series observations values and their average are displayed in the console window. The summary statistics calculation report is output to the C:\Statistics.html file.
See also: