<< AdvancedModelLearningDataEvidence computing_experiment ComputingExperiment >>

computing_experiment >> computing_experiment > AdvancedModelLearningDataTimeGrid

AdvancedModelLearningDataTimeGrid

Implements a computational experiment of a user system, given in the form of an xcos-diagram, with the calculation of the output dynamics of the system at specified times

Syntax

[SystemOutputCharacteristics,..
SystemParametrs..
]=AdvancedModelLearningDataTimeGrid(SystemOutputCharacteristicsNames,..
SystemOutputCharacteristicsNamesIndexes,SystemOutputCharacteristicsIndexes,..
SystemShemaName,TimeMoments,SystemParametrsNames,SystemParametrsValues,..
absolutTolErr,relativeTolErr,simulationTime,timeStepMax,Solver,toleranceTime)

Arguments

SystemOutputChatacteristicsNames

Array of names of system output characteristics in xcos-diagram (see block TOWS_c). Array dimension 1xM

SystemOutputCharacteristicsIndexes

An array of indices of the dynamics of the output characteristics in the names of the output characteristics of the system in the xcos diagram (block TOWS_c), the index of each name of the output characteristic of the system in the array SystemOutputChatacteristicsNames is set by the corresponding element array SystemOutputCharacteristicsNamesIndexes. Array dimension 1xM

SystemShemaName

Full name of the user system xcos diagram file (extension .zcos, .xcos)

TimeMoments

Cell-array (see cell-arrays) arrays (the dimension of each array is 1xN, N is different for each dynamics) discrete moments in time for each dynamics of the output characteristics specified by indices SystemOutputCharacteristicsIndexes

SystemParametrsNames

The names of the system parameters in the xcos diagram (see the context property in Xcos diagram structure). Array of strings of dimension 1xM

SystemParametrsValues

System parameter values in the xcos diagram (see the context property in Xcos diagram structure), specified by the corresponding SystemParametrsNames. NxM array of real numbers (each n-th row of N rows in the matrix is the corresponding n-th dynamics)

absolutTolErr

Absolute errors of integration in xcos (see the tol (1) atol property in Xcos diagram structure) of each dynamics. Array of positive real numbers of dimension 1xN

relativeTolErr

Relative errors of integration in xcos (see the tol (2) rtol property in Xcos diagram structure) of each dynamics. Array of positive real numbers of dimension 1xN

simulationTime

Simulation times in xcos (see the tf property in Xcos diagram structure) of each dynamics. Array of positive real numbers of dimension 1xN

timeStepMax

Maximum time integration steps in xcos (see the tol (7) hmax property in Xcos diagram structure) of each dynamics. Array of positive real numbers of dimension 1xN

Solver

Solver views in xcos (see the tol (6) solver property in Xcos diagram structure) of each dynamics. An array of integers ranging from 0 to 100 - solver codes. The dimension of the solver codes is 1xN

toleranceTime

Time errors in xcos are the corresponding minimum steps of integration over time (see the tol (3) ttol property in Xcos diagram structure) for each dynamics. Array of positive real numbers of dimension 1xN

Return values

SystemOutputChatacteristics

Matrix of parameters of system output characteristics. It is a vertical concatenation of matrices of output characteristics of the system at discrete times for each dynamics of the system. The dimension of the MxQ matrix. Q is the total length of arrays of discrete time instants for each dynamics of the system

SystemParametrs

Matrix of system parameters, the names of which are specified in the SystemParametrsNames array and for which discrete values of the system's output characteristics are calculated at discrete times. Dimension of the MxQ matrix

Description

Simulates (computational experiment) a user system, specified in the form of an xcos diagram, for its various parameters (specified in the context).

Returns for each dynamics a matrix of discrete values of user-specified output characteristics of the system (specified in the diagram as TOWS_c blocks) at these discrete moments in time

Examples

//Forming the path to the xcos-diagram Proba3.zcos
[a, pathlib] = libraryinfo("computing_experimentlib");
clear a;
pathlib = strncpy(pathlib, length(pathlib) - length('macros')) + 'xcos';
pathdiagram = fullfile(pathlib, 'Proba3.zcos');

//Running a computational experiment
SystemParametrsNames = ['b', 'a', 'd'];//Parameter names
SystemParametrsValues = [ 1.5, 0.81, 3.81;
                         2.25, 0.51, 6.81;
                         1.11, 0.93, 3.51];//Parameter values
SystemOutputChatacteristicsNames = ['A1', 'A3', 'A2'];//Model output charactristics names
TimeMoments = cell(1, 3);
TimeMoments{1} = [0.0:0.05:9.95]';
TimeMoments{2} = [0.0:0.1:9.9]';
TimeMoments{3} = [0.0:0.2:9.8]';
[SystemOutputCharacteristics,...//Output characteristic
 parametrs...//Parameters
 ]=AdvancedModelLearningDataTimeGrid(SystemOutputChatacteristicsNames,..//System output characteristic names
                                     [1, 3, 2, 2],..//System output characteristics indices
                                     [2, 1, 1, 3],..//System output characteristics indices (in names)
                                     fullfile(pathdiagram),..//System diagram name
                                     TimeMoments,..//Times moments
                                     SystemParametrsNames,..//Parameter names that define dynamics
                                     SystemParametrsValues,..//The values of the parameters that determine the dynamics
                                     [ 0.45E-6,0.63E-6,0.57E-6],..//Absolute errors
                                     [0.723E-6,0.39E-6,0.75E-6],..//Relative errors
                                     [10.0,11.0,12.9],..//Simulation times
                                     [0.81E-4,0.75E-4,0.87E-4],..//Maximum time integration steps
                                     [2,3,5],..//Solvers type
                                     [1E-10,1E-10,1E-10]..//Times tolerances
                                     );


//Result
disp(SystemOutputCharacteristics);
disp(parametrs);

See also


Report an issue
<< AdvancedModelLearningDataEvidence computing_experiment ComputingExperiment >>