Showing results for 
Search instead for 
Do you mean 
Solved! Go to solution

The sum of the a user defined attribute

Hi there community,


I was wondering how I can get the sum of a specific user defined attribute of all output.


For example:
- I have a process through which cars flow.

- Each car has a user defined attribute called "Total Depreciation" (which is [value_of_car] * [depreciationrate] * [lead time]


- I want to sum up all depreciation values of the output and use that as output for the experiment manager. 



Thanks in advance!

PS. I would also like to know how to sum up just all the waiting times for each car instead of the lead times

Accepted by topic author Sjoerd
‎12-18-2016 02:06 PM

Re: The sum of the a user defined attribute

- you could use an global variable (e.g. total_deprecation, type real)
- entrance control of the drain:

total_deprecation:=total_deprecation+ @.total_deprication; --@ is the MU that triggers the control

-- for waiting time have a look into the attributes of the MU: stat...

Steffen Bangsow
freelance simulation specialist  

Re: The sum of the a user defined attribute

Thanks Steffen, that worked for me!