IMsGreyForecastTransform.UpperConfidenceLevel

Syntax

UpperConfidenceLevel: IVariableStub;

Description

The UpperConfidenceLevel property determines the variable to which upper confidence limit data is unloaded on modeling problem calculation.

Comments

The property is outdated, use IMsMethodSeries.UpperConfidenceLevel.

Example

Executing the example requires a modeling problem in the container. The first model of the problem uses the Grey forecast for calculation.

Sub Main;

Var

MB: IMetabase;

KontKey: Integer;

MObj: IMetabaseObject;

Problem: IMsProblem;

CalcSett: IMsProblemCalculationSettings;

Calculation: IMsProblemCalculation;

Model: IMsModel;

Trans: IMsFormulaTransform;

VarTrans: IMsFormulaTransformVariable;

Tree: IMsFormulaTransformSlicesTree;

Slice: IMsFormulaTransformSlice;

Selector: IMsFormulaTransformSelector;

Formula: IMsFormula;

Grey: IMsGreyForecastTransform;

LowConfLvl, UpperConfLvl: IVariableStub;

Begin

MB := MetabaseClass.Active;

KontKey := MB.ItemById("KONT_MODEL").Key;

MObj := MB.ItemByIdNamespace("PROBLEM_1", KontKey).Edit;

//variables to which the data are loaded

LowConfLvl := MB.ItemByIdNamespace("LowConfLvl", KontKey).Edit As IVariableStub;

UpperConfLvl := MB.ItemByIdNamespace("UpperConfLvl", KontKey).Edit As IVariableStub;

Problem := MObj As IMsProblem;

Model := (Problem.MetaModel.CalculationChain.Item(0) As IMsCalculationChainModel).Model;

Model := (Model As IMetabaseObject).Edit As IMsModel;

Model.Transform.Series.Add(LowConfLvl);

Model.Transform.Series.Add(UpperConfLvl);

Trans := Model.Transform;

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);

Grey := Formula.Method As IMsGreyForecastTransform;

// lower confidence limit

Grey.LowerConfidenceLevel := LowConfLvl;

// upper confidence limit

Grey.UpperConfidenceLevel := UpperConfLvl;

CalcSett := Problem.CreateCalculationSettings;

Calculation := Problem.Calculate(CalcSett);

Calculation.Run;

(Model As IMetabaseObject).Save;

MObj.Save;

End Sub Main;

After executing the example variables with the LowConfLvl and highConfLvl identifiers are added to the list of model output variables. After calculating the problem, the data of low and upper confidential bounds, is unloaded.

See also:

IMsGreyForecastTransform