IMsCompositeFormulaTermSet.Included

Syntax

Included: Boolean;

Description

The Included property determines whether this set is used in calculation.

Example

Executing the example requires that the repository contains CONT_MODEL modeling container with the BINREG model that uses the binary regression method for calculation.

Add links to the Metabase and Ms system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    SpaceDescr: IMetabaseObjectDescriptor;
    MObj: IMetabaseObject;
    Model: IMsModel;
    Trans: IMsFormulaTransform;
    VarTrans: IMsFormulaTransformVariable;
    Tree: IMsFormulaTransformSlicesTree;
    Slice: IMsFormulaTransformSlice;
    Selector: IMsFormulaTransformSelector;
    Formula: IMsFormula;
    Binary: IMsBinaryRegressionTransform;
    Explanatories: IMsCompositeFormulaTermSetList;
    i, j: Integer;
    TermSet: IMsCompositeFormulaTermSet;
    CompTerm: IMsCompositeFormulaTerm;
Begin
    MB := MetabaseClass.Active;
    SpaceDescr := mb.ItemById("CONT_MODEL");
    MObj := MB.ItemByIdNamespace("BinReg",SpaceDescr.Key).Bind;
    Model := MObj As IMsModel;
    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);
    Binary := Formula.Method As IMsBinaryRegressionTransform;
    Explanatories := Binary.Explanatories;
    Debug.WriteLine("Terms of explanatory series:");
    For i := 0 To Explanatories.Count- 1 Do
        TermSet := Explanatories.Item(i);
        Debug.WriteLine(" Set " + (i + 1).ToString + ":");
        For j := 0 To TermSet.Count - 1 Do
            CompTerm := TermSet.Item(j);
            Debug.WriteLine("   " + CompTerm.ExpressionText);
            Debug.WriteLine("   Used in calculation: " + TermSet.Included.ToString);
            If TermSet.SingleTerm <> Null Then
                Debug.WriteLine("   Leading term:" + TermSet.SingleTerm.ExpressionText);
            End If;
        End For;
    End For;
End Sub;

After executing the example, sets of terms of explanatory series are displayed in the console window. The following is displayed for each set: whether it is used in calculation and a leading composite term.

See also:

IMsCompositeFormulaTermSet