IMsProblemCalculationSettings.Details

Syntax

Details: Variant;

Description

The Details property determines type of calculated criterion problem.

Comments

If the Details property contains object of the type:

Example

Executing the example requires that the repository contains a modeling container with the MS identifier containing a criterion function with the TARGET_PROBLEM identifier.

Add links to the Metabase, Ms system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    MsKey: Integer;
    Problem: IMsProblem;
    CalcSettings: IMsProblemCalculationSettings;
    Calculation: IMsProblemCalculation;
    TargetProblem: IMsTargetProblem;
Begin
    mb := MetabaseClass.Active;
    // Get modelling container key
    MsKey := mb.GetObjectKeyById("MS");
    // Get criterion problem
    Problem := mb.ItemByIdNamespace("TARGET_PROBLEM", MsKey).Bind As IMsProblem;
    // Create problem calculation parameters
    CalcSettings := Problem.CreateCalculationSettings;
    // Get criterion problem parameters
    TargetProblem := Problem.AdditionalDetails.Item(0As IMsTargetProblem;
    // Determine type of calculated problem
    CalcSettings.Details := TargetProblem;
    // Calculate problem
    Calculation := Problem.Calculate(CalcSettings);
    Calculation.Run;
End Sub UserProc;

After executing the example optimal control problem is calculated.

See also:

IMsProblemCalculationSettings