IMsProblemCalculationSettings.AdvancedOptions

Fore Syntax

AdvancedOptions: MsProblemCalculationOptions;

Fore.NET Syntax

AdvancedOptions: Prognoz.Platform.Interop.Ms.MsProblemCalculationOptions;

Description

The AdvancedOptions property determines additional parameters of problem calculation.

Comments

This property can be used to reduce calculation time of modeling problem.

If AdvancedOptions contains the value:

Fore Example

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

Add links to the Metabase, Ms system assemblies.

Sub UserProc;
Var
    Mb: IMetabase;
    ModelSpaceD: IMetabaseObjectDescriptor;
    Problem: IMsProblem;
    CalcSett: IMsProblemCalculationSettings;
Begin
    Mb := MetabaseClass.Active;
    // Get modeling container
    ModelSpaceD := Mb.ItemById("MS");
    // Get modeling problem
    Problem := Mb.ItemByIdNamespace("PROBLEM_ADV", ModelSpaceD.Key).Bind As IMsProblem;
    // Get problem calculation parameters
    CalcSett := Problem.CreateCalculationSettings;
    // Include the Fact scenario to calculation
    CalcSett.FactIncluded := True;
    // Set problem calculation periods
    CalcSett.Period.IdentificationStartDate := DateTime.ComposeDay(200011);
    CalcSett.Period.IdentificationEndDate := DateTime.ComposeDay(20041231);
    CalcSett.Period.ForecastStartDate := DateTime.ComposeDay(200511);
    CalcSett.Period.ForecastEndDate := DateTime.ComposeDay(20071231);
    // Set additional calculation parameters
    CalcSett.AdvancedOptions := MsProblemCalculationOptions.SkipOutputDataLoad Or MsProblemCalculationOptions.CacheCoords;
    // Perform calculation
    Problem.Calculate(CalcSett).Run;
End Sub UserProc;

After executing the example a modeling problem is calculated without loading data by output variables and with caching of data dimensions coordinates.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example. Use Fore.NET analogs instead of Fore components.

Imports Prognoz.Platform.Interop.Ms;

Public Shared Sub Main(Params: StartParams);
Var
    Mb: IMetabase;
    ModelSpaceD: IMetabaseObjectDescriptor;
    Problem: IMsProblem;
    CalcSett: IMsProblemCalculationSettings;
Begin
    Mb := Params.Metabase;
    // Get modeling container
    ModelSpaceD := Mb.ItemById["MS"];
    // Get modeling problem
    Problem := Mb.ItemByIdNamespace["PROBLEM_ADV", ModelSpaceD.Key].Bind() As IMsProblem;
    // Get problem calculation parameters
    CalcSett := Problem.CreateCalculationSettings();
    // Include the Fact scenario to calculation
    CalcSett.FactIncluded := True;
    // Set problem calculation periods
    CalcSett.Period.IdentificationStartDate := DateTime.Parse("2000/1/1");
    CalcSett.Period.IdentificationEndDate := DateTime.Parse("2004/12/31");
    CalcSett.Period.ForecastStartDate := DateTime.Parse("2005/1/1");
    CalcSett.Period.ForecastEndDate := DateTime.Parse("2007/12/31");
    // Set additional calculation parameters
    CalcSett.AdvancedOptions := MsProblemCalculationOptions.mspcoSkipOutputDataLoad
        Or MsProblemCalculationOptions.mspcoCacheCoords;
    // Perform calculation
    Problem.Calculate(CalcSett).Run();
End Sub;

See also:

IMsProblemCalculationSettings