Details: Variant;
The Details property determines type of calculated criterion problem.
If the Details property contains object of the type:
IMsTargetProblem. Optimal control problem is calculated. The problem consists in finding such values of controlling variables, at which condition of criterion function optimization is fulfilled.
IMsForecastingProblem. Forecasting problem is calculated. Models included into the problem are calculated consequently in each scenario point: firstly, all models are calculated by the first scenario point, then all models are calculated by the second scenario point, and so on.
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(0) As 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: