0

I have a process flow which has some service blocks. For some reasons, I cannot use separate delays and queue block, I must stick to service block. However, i have some problems when I tried to measure the queuing time only in the service block,

I read some topic in stackoverflow, and follow steps as:

  • i clickk into service blockk,
  • "on enter" action, i insert the code: double queueStartTime = time();
  • then "on seize" action, i insert the code double queueTime = time() - queueStartTime; and then i create a statistic measure with value equals queue time

it should have worked.

but it said that queueStartTime cannot be resolved to a variable. as this is not answered in last topic, there fore i am seeking for other help. does anyone get this issue, and you please help.

1 Answers1

1

The "on seize" code box does not know about local variables created in the "on Enter" code box.

Drag a normal AnyLogic variable object timeEnter next to the Service block and use that to store the entry time and calculate the time-to-seize.

Benjamin
  • 10,603
  • 3
  • 16
  • 28