ILanerTransformPeriod.AutoPeriod

Fore Syntax

AutoPeriod: TransformModelAutoPeriodOptions;

Fore.NET Syntax

AutoPeriod: Prognoz.Platform.Interop.Cubes.TransformModelAutoPeriodOptions;

Description

The AutoPeriod property determines the conditions used in the calculation of retrospection and forecast periods limits.

Comments

This property enables the user to set the following options of calculated series calculation period:

Sample period start date Sample period end date Forecast period starts date Forecast period end date
Specified date (by default). Specified date (by default). Certain date (default) Specified date (by default).
Current date plus/minus k of points. Current date plus/minus k of points. Current date plus/minus k of points. Current date plus/minus k of points.
Beginning of data plus/minus k points. Data end plus/minus k of points. Forecast end plus/minus k points. Data end plus/minus k of points.
Sample end minus kpoints. Sample start plus k points. Sample start plus k points. Sample end pluskpoints.
  Data start plus k of points. Sample end pluskpoints.  

The k parameter is determined by the following properties:

Fore Example

Executing the example requires a workbook with the WORKBOOK_TR_PERIOD identifier containing a calculated series. This series must be the first in data table and must be calculated by means of forecast method.

Add links to the Cubes, Express, Laner, Metabase system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    ErAn: IEaxAnalyzer;
    Laner: ILaner;
    Series: ILanerSeries;
    Serie: ILanerCalculateSerie;
    TransPeriod: ILanerTransformPeriod;
Begin
    mb := MetabaseClass.Active;
    ErAn := mb.ItemById("WORKBOOK_TR_PERIOD").Edit As IEaxAnalyzer;
    Laner := ErAn.Laner;
    Series := Laner.Series;
    Serie := Series.Item(0As ILanerCalculateSerie;
    TransPeriod := Serie.TransformPeriod;
    TransPeriod.AutoPeriod := TransformModelAutoPeriodOptions.IdentStartByFact
        Or TransformModelAutoPeriodOptions.IdentEndByFact
        Or TransformModelAutoPeriodOptions.ForecastStartByIdentEnd
        Or TransformModelAutoPeriodOptions.ForecastEndByIdentEnd;
    TransPeriod.StartOffset := 1;
    TransPeriod.IdentificationEndOffset := -5;
    TransPeriod.ForecastStartDateOffset := 1;
    TransPeriod.EndOffset := 10;
    (ErAn As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the following Options are set for the selected calculated series:

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Cubes;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Laner;

Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    ErAn: IEaxAnalyzer;
    Laner: ILaner;
    Series: ILanerSeries;
    Serie: ILanerCalculateSerie;
    TransPeriod: ILanerTransformPeriod;
Begin
    mb := Params.Metabase;
    ErAn := mb.ItemById["WORKBOOK_TR_PERIOD"].Edit() As IEaxAnalyzer;
    Laner := ErAn.Laner;
    Series := Laner.Series;
    Serie := Series.Item[0As ILanerCalculateSerie;
    TransPeriod := Serie.TransformPeriod;
    TransPeriod.AutoPeriod := TransformModelAutoPeriodOptions.tmapoIdentStartByFact
        Or TransformModelAutoPeriodOptions.tmapoIdentEndByFact
        Or TransformModelAutoPeriodOptions.tmapoForecastStartByIdentEnd
        Or TransformModelAutoPeriodOptions.tmapoForecastEndByIdentEnd;
    TransPeriod.StartOffset := 1;
    TransPeriod.IdentificationEndOffset := -5;
    TransPeriod.ForecastStartDateOffset := 1;
    TransPeriod.EndOffset := 10;
    (ErAn As IMetabaseObject).Save();
End Sub;

See also:

ILanerTransformPeriod