IMsGreyForecastTransform.ConfidenceLevel

Syntax

ConfidenceLevel: Double;

Description

The ConfidenceLevel property determines the confidence limits relevance. By default the value 0,95 is set to the property.

Example

Executing the example requires that the repository contains a modeling container with the KONT_MODEL identifier. The container contains the Var_1 variable, further used as an output one.

Sub Main;

Var

MB: IMetabase;

CrInf: IMetabaseObjectCreateInfo;

MObj: IMetabaseObject;

Model: IMsModel;

Trans: IMsFormulaTransform;

Varr: IMsVariableStub;

VarTrans: IMsFormulaTransformVariable;

Tree: IMsFormulaTransformSlicesTree;

Slice: IMsFormulaTransformSlice;

Selector: IMsFormulaTransformSelector;

Formula: IMsFormula;

Grey: IMsGreyForecastTransform;

Begin

MB := MetabaseClass.Active;

CrInf := Mb.CreateCreateInfo;

CrInf.ClassId := MetabaseObjectClass.KE_CLASS_MSMODEL;

CrInf.Id := "New_Grey";

CrInf.Name := "New_Grey";

CrInf.Parent := Mb.ItemById("KONT_MODEL");

CrInf.Permanent := False;

MObj := Mb.CreateObject(CrInf).Edit;

Model := MObj As IMsModel;

Trans := Model.Transform;

Varr := MB.ItemByIdNamespace("Var_1", MB.ItemById("KONT_MODEL").Key).Bind As IMsVariableStub;

Trans.Outputs.Add(Varr);

VarTrans := Trans.Outputs.Item(0);

Tree := VarTrans.SlicesTree(VarTrans);

Slice := Tree.CreateSlice(1);

Selector := Model.Transform.CreateSelector;

Selector.Slice := Slice;

Formula := Model.Transform.Transform(Selector);

Formula.Kind := MsFormulaKind.GreyForecast;

Grey := Formula.Method As IMsGreyForecastTransform;

Grey.ConfidenceLevel := 0.99;

MObj.Save;

End Sub Main;

After executing the example a model is created in the modeling container. The Grey forecast is used for model calculation. The value 0,99 is set for a significance value of confidential limits.

See also:

IMsGreyForecastTransform