IdentByFact: Boolean;
The IdentByFact property determines whether the data is taken for sample period by the Fact scenario.
The property is relevant for working with series from time series database in modeling and forecasting.
Available values:
True. Data is taken for sample period by the Fact scenario.
False. Data is taken for sample period by the scenario set for the calculated series.
Executing the example requires a form with the following components: the Button component named Button1, the LanerBox component named LanerBox1, and the UiErAnalyzer component named UiErAnalyzer1. UiErAnalyzer1 is a data source for LanerBox1. A working area of the time series database should be loaded to UiErAnalyzer1. The repository must include a modeling container with the MS identifier containing a modeling problem with the FILLMODEL identifier. This task must contain an internal metamodel containing an internal time series database and a model. The modeling container must also include a scenario with the 43276 key. The scenario is used to calculate the FILLMODEL task.
The example is a handler of the OnClick event for the Button1 component.
Add links to the Metabase, Ms, and Laner system assemblies.
Sub UserProc;
Var
mb: IMetabase;
wb: IMetabaseObject;
MsObj: IMetabaseObjectDescriptor;
Meta: IMsMetaModel;
MetaVisual: IMsMetaModelVisualController;
SimpleModel: IMsModel;
ScArr: Array Of Integer;
pr: IMsProblem;
Period: IMsModelPeriod;
i: Integer;
ChainEn: IMsCalculationChainEntries;
Laner: ILaner;
Begin
// Get workbook
wb := UiErAnalyzer1.Object.Edit;
mb := MetabaseClass.Active;
// Get modeling container
MsObj := mb.ItemById("MS");
// Get modeling problem
pr := mb.ItemByIdNamespace("FILLMODEL", MsObj.Key).Bind As IMsProblem;
// Get metamodel
Meta := pr.MetaModel;
MetaVisual := Meta.VisualController;
// Get model
ChainEn := Meta.CalculationChain;
For i := 0 To ChainEn.Count - 1 Do
If ChainEn.Item(i).Type = MsCalculationChainEntryType.Model Then
SimpleModel := (ChainEn.Item(i) As IMsCalculationChainModel).Model;
End If;
End For;
// Create an array of scenario keys
ScArr := New Integer[2];
ScArr[0] := -1;
ScArr[1] := 43276;
Period := SimpleModel.Period;
// Fill in the workbook by data from the model
MetaVisual.FillWithModel(SimpleModel, ScArr, Period, Period, pr, wb);
wb.Save;
// Open the workbook
Laner := (wb As IEaxAnalyzer).Laner;
Laner.BeginUpdate;
UiErAnalyzer1.Object := wb;
UiErAnalyzer1.Active := True;
// Sample data is taken by the Fact scenario
Laner.IdentByFact := True;
Laner.Update;
Laner.EndUpdate;
End Sub UserProc;
After executing the example the workbook filled in by the data from the internal model is opened.
After executing the example, UiErAnalayzer1 contains the opened workbook filled in by the data from the internal model by several scenarios. The data for calculation for sample period are taken by the Fact scenario.
See also: