If we want to trace the performance of an atomic DEVS model, we
need to set the flag on by using CollectStatistics(true)
.
We can also get the flag's status by calling
CollectStatisticsFlag()
. The virtual function
Get_Statistics_s()
will return a string which represents
the status in terms of collecting statistics. Also, the
user can override the GetPerformance()
function to collect
the performance index.
void CollectStatistics(bool flag = true) { m_cs = flag; } bool CollectStatisticsFlag() const { return m_cs; } virtual string Get_Statistics_s() const { return Get_s(); } virtual map<string, double> GetPerformance() const;We will see the theoretical background of performance indices and how we collect them using DEVS++ in Chapter 4.