AllowForecastBeforeIdent: Boolean;
The AllowForecastBeforeIdent property determines whether forecasting period is available before sample period.
Available values:
True. Forecasting period can be before sample period.
False. Forecasting period can be only after sample period.
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.Transform.Period;
// Determine that forecasting period can be before sample period
Period.AllowForecastBeforeIdent := True;
// Set sample period dates
Period.IdentificationStartDate := DateTime.ComposeDay(2005, 1, 1);
Period.IdentificationEndDate := DateTime.ComposeDay(2015, 12, 31);
// Set forecasting period dates
Period.ForecastStartDate := DateTime.ComposeDay(2000, 1, 1);
Period.ForecastEndDate := DateTime.ComposeDay(2004, 12, 31);
// 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.
See also: