cancel
Showing results for 
Search instead for 
Did you mean: 

The sum of the a user defined attribute

Experimenter
Experimenter

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

2 REPLIES

Re: The sum of the a user defined attribute

Phenom
Phenom

- 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  
web: www.bangsow.eu
mail: steffen@bangsow.net


Re: The sum of the a user defined attribute

Experimenter
Experimenter

Thanks Steffen, that worked for me!