Showing results for 
Search instead for 
Did you mean: 

How to use DataFit with SimTalk

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer

Hello gurus,

Is there a way or documentation using DataFit with SimTalk?

I'm creating a model that get updated data in a SQL database and I'ld like to generate statistics distributions of this data using SimTalk, it's possibile or exists another good way to do this?


EDIT: I found an example in the help (Using the Object DataFit During the Simulation), but I need more examples or documentation.




Re: How to use DataFit with SimTalk

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello Imundin,

at first you must import the data by a SQL statement to a Tablefile of Plant Simulation. In the example of the documentation it is the Tablefile Sample. The sample of data to be examined is contained in the fourth column.

Instead of the outdated method insertList you can use

Samples.copyRangeTo({4,1}..{4,*}, DataFit.DataX,1,1)

Of course, insertlist also works. The internal Tablefile DataFit.Distributions contains all statistical distribution. 

The following instructions selects only the Gamma-distribution:

DataFit.Distributions.initialize({3,1}..{3,12}, false)
DataFit.Distributions[3,"Gamma"] := true

 If your sample does not contain outliers a filter of the data is not needed:

DataFit.FilterRequired := false

The internal method filterData computes the descriptive statistics. It is needed for the Goodness of fit test. It is started by the internal method fit

The results are contained in the internal Tablefile Ranking. I recommend to use the instruction for the first inspection:


Please also look at the collection of small example which can be opened via the Start Page of Plant Simulation:

Category: Tools, Topic: Statistic tools, Example: Overview. Look at the method EstimateBySimTALK.