IMsModelPeriod.AllowForecastBeforeIdent

Fore Syntax

AllowForecastBeforeIdent: Boolean;

Fore.NET Syntax

AllowForecastBeforeIdent: boolean;

Description

The AllowForecastBeforeIdent property determines whether forecasting period is available before sample period.

Comments

Available values:

Fore Example

Executing the example requires that the repository contains a modeling container with the MS identifier containing a model with the MODEL_FREEDIM identifier.

Add links to the Metabase, Ms system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Model: IMsModel;
    Period: IMsModelPeriod;
Begin
    // Get current repository
    MB := MetabaseClass.Active;
    // Get the model
    Model := MB.ItemByIdNamespace("MODEL_FREEDIM", MB.ItemById("MS").Key).Edit As IMsModel;
    // Get model periods
    Period := Model.Period;
    // Determine that forecasting period can be before sample period
    Period.AllowForecastBeforeIdent := True;
    // Set sample period dates
    Period.IdentificationStartDate := DateTime.ComposeDay(200511);
    Period.IdentificationEndDate := DateTime.ComposeDay(20151231);
    // Set forecasting period dates
    Period.ForecastStartDate := DateTime.ComposeDay(200011);
    Period.ForecastEndDate := DateTime.ComposeDay(20041231);
    // Determine that on modeling problem calculation model periods are used
    Model.UseModelPeriod := True;
    // Save changes
    (Model As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the forecasting period, which is before sample period, is set for the model.

Fore.NET Example

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

Imports Prognoz.Platform.Interop.Ms;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Model: IMsModel;
    Period: IMsModelPeriod;
Begin
    // Get current repository
    MB := Params.Metabase;
    // Get the model
    Model := MB.ItemByIdNamespace["MODEL_FREEDIM", MB.ItemById["MS"].Key].Edit() As IMsModel;
    // Get model periods
    Period := Model.Period;
    // Determine that forecasting period can be before sample period
    Period.AllowForecastBeforeIdent := True;
    // Set sample period dates
    Period.IdentificationStartDate := DateTime.Parse("01.01.2005");
    Period.IdentificationEndDate := DateTime.Parse("31.12.2015");
    // Set forecasting period dates
    Period.ForecastStartDate := DateTime.Parse("01.01.2000");
    Period.ForecastEndDate := DateTime.Parse("31.12.2004");
    // Determine that on modeling problem calculation model periods are used
    Model.UseModelPeriod := True;
    // Save changes
    (Model As IMetabaseObject).Save();
End Sub;

See also:

IMsModelPeriod