IMsCalculationChainEntries.ArrangeModels

Syntax

ArrangeModels(ArrangeMode: MsArrangeMode; [Problem: IMsProblem = Null]);

Parameters

ArrangeMode. Mode of auto building a calculation chain.

Problem. The problem, by which the calculation periods of created equation system will be set.

Description

The ArrangeModels method automatically arranges calculation chain of models by specified parameters according to dependences between variables.

Comments

Automatic creation enables the user to find dependencies between models and create a calculation chain in accordance with these dependencies. Automatic creation ignores metamodels included into calculation chain.

Principles of automatic chain creation:

The value of the ArrangeMode parameter influences the automatic building as follows:

NOTE. If the modeling container is a child of time series database, separate use of the SplitSlices value is unavailable.

Example

Executing the example requires that the repository contains a modeling container with the CONT_MODEL identifier containing a metamodel with the META_ARRANGE identifier.

Add links to the Metabase and Ms system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    ContKey: Integer;
    MetaModel: IMsMetaModel;
    Chain: IMsCalculationChainEntries;
Begin
    mb := MetabaseClass.Active;
    ContKey := mb.GetObjectKeyById("CONT_MODEL");
    MetaModel := mb.ItemByIdNamespace("META_ARRANGE", ContKey).Edit As IMsMetaModel;
    Chain := MetaModel.CalculationChain;
    Chain.ArrangeModels(MsArrangeMode.DeleteFolders Or MsArrangeMode.SplitSlices);
    (MetaModel As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the elements in calculation chain are ordered without taking into account folders, multidimensional models with cycles are divided into parts.

See also:

IMsCalculationChainEntries