about depicting a variable (Sum) in Anylogic

176 views Asked by At

For defining the behaviour of my agents, I created a state chart in which when a user likes a comment, the variable "likes" is changed as follows :

Likes=Likes+1;

It should show me at the end the sum of likes. In order to depict this sum , as it is not a statistics, I cannot use a bar chart or anything for it. What if I define this in statistics:

Name : Totalallikes 
Type:Sum
expressions: item.Likes

Does it make sense? Or I am summing the likes twice this way?
Thank you

1

There are 1 answers

0
Flexecute On BEST ANSWER

I believe your variable should already contain the sum, there's no need to create a Statistic or sum them up any more or else as you say, you would be summing them up twice.