IMsProblemCalculationSettings.FilterLevelsOnLoad

Syntax

FilterLevelsOnLoad: Boolean;

Description

The FilterLevelsOnLoad property determines whether to load data only by calendar levels, which are used in the problem calculation chain.

Comments

Available values:

True. Default value. Only data by the calendar levels, which are used in the problem calculation chain, is loaded. It enables the user to reduce time of problem calculation.

False. Data on all calendar levels are loaded.

Example

Executing the example requires that the repository contains a modeling container with the MS identifier containing a modeling problem with the PROBLEM identifier.

Add links to the Metabase, Ms system assemblies.

Sub UserProc;
Var
    Mb: IMetabase;
    MsDescr: IMetabaseObjectDescriptor;
    Problem: IMsProblem;
    CalcSett: IMsProblemCalculationSettings;
    Period: IMsModelPeriod;
    ProblemCalc: IMsProblemCalculation;
Begin
    Mb := MetabaseClass.Active;
    // Get modeling container
    MsDescr := Mb.ItemById("MS");
    // Getnbsp;modelingnbsp;problem
    Problem := Mb.ItemByIdNamespace("PROBLEM", MsDescr.Key).Bind As IMsProblem;
    // Create problem calculation options
    CalcSett := Problem.CreateCalculationSettings;
    // Perform calculation by the Fact scenario
    CalcSett.FactIncluded := True;
    // Load data only by the calendar levels,
    // which are used in the problem calculation chain
    CalcSett.FilterLevelsOnLoad := True;
    // Specify calculation period
    Period := CalcSett.Period;
    Period.IdentificationStartDate := DateTime.Parse("01.01.1990");
    Period.IdentificationEndDate := DateTime.Parse("31.12.2009");
    Period.ForecastStartDate := DateTime.Parse("01.01.2010");
    Period.ForecastEndDate := DateTime.Parse("01.01.2015");
    // Perform calculation
    ProblemCalc := Problem.Calculate(CalcSett);
    ProblemCalc.SaveHistory := True;
    ProblemCalc.Run;
End Sub UserProc;

Example execution result: the problem will be calculated by the Fact scenario with sample and forecasting periods specified before calculation. Data for the calculation is loaded only by the levels of calendar, which are used in the problem calculation chain. Calculation history is saved.

See also:

IMsProblemCalculationSettings