SaveProblem(SerieIndices: Array): IMetabaseObjectDescriptor;
SerieIndices. Indexes of saved series given as an array. If the parameter is set to Null, all series will be saved.
The SaveProblem method saves working area data as a modeling problem.
Saving a data table in the form of a modeling problem is relevant only if the table contains calculated series. Otherwise the empty problem is saved. The problem is saved to the child object of the time series database: that is, the Transformations modeling container. During saving the following objects are created:
Modeling variable - the modeling variables are created based on the calculated series, for which the original series (indicators) are the input (explanatory) variables.
Model - describes the transformation of the modeling variable.
Metamodel - describes the model calculation sequence.
Problem - forms the metamodel manipulation problem.
Executing the example requires a form with the following components: the Button component named Button1, the TabSheetBox component named TabSheetBox1, and the UiErAnalyzer component named UiErAnalyzer1. UiErAnalyzer1 is a data source for TabSheetBox1. A working area of the time series database should be loaded to UiErAnalyzer1.
The example is a handler of the OnClick event for the Button1 component.
Add links to the Express, ExtCtrls, Forms, Laner, Metabase and Tab system assemblies.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
ErA: IEaxAnalyzer;
Laner: ILaner;
ar: Array[1] Of Integer;
ProblDesc: IMetabaseObjectDescriptor;
Begin
ErA := UiErAnalyzer1.ErAnalyzer;
Laner := ErA.Laner;
ar[0] := 0;
ProblDesc := Laner.SaveProblem(ar);
Debug.WriteLine(ProblDesc.Name);
End Sub Button1OnClick;
After executing the example the first data series is saved as the modeling problem. The problem name is displayed in the console window.
See also: