user14597641
user14597641

Reputation:

Measuring time in assembler in anylogic, question clarification

Im trying to get the time in a assembler in anylogic, I can use measuretimestart/end features for the services and I can get the distribution graphs, however when I try to get the time for the assembler with the following code: On enter 3: Time=time(); and On exit: timeDS.add(time()-Time); the mean doesn't make sense to me. I really don't know at this stage what element is providing a realistic information in the software. I'm testing with a 10 weeks delay time each block and no delays in the queues, even removing the selectOutput function. the arrival is a rate of 1 per month, triggering a calls for inject 1 element each, but I wet this non sense mean every time, is there any code to use in this particular situations or how I get the distributions correct? Thanks! enter image description here

Upvotes: 0

Views: 360

Answers (1)

Felipe
Felipe

Reputation: 9421

what are you trying to measure: the time it takes for the assembly to happen? The time it takes from the moment the first part of the assembly arrives until the assembly happens? This answer is only associated to the delay time.

Time seems to be a global variable, so if many assemblies are happening at the same time, your result will be distorted because Time variable changes every time an assembly starts...

Also, the on enter 3 is not what defines the moment in which the assembly process starts. Instead use the "on enter delay" action

you need to define an agent type that will be at the output of the assembler and assign it a time variable then on the "on enter delay" you can do agent.startTime=time() and the "on at exit" you can do "data.add(time()-agent.startTime)

Upvotes: 1

Related Questions