Creating a dataset from queue size in service block

111 views Asked by At

I am a newbie to anylogic simulations. In my project, I want to take out queue size at every time step from a service block and create a dataset. Similarly, I also want to take out the mean queue size from the same after every replication and create a dataset of that as well. Can anyone help me with how to do it?

1

There are 1 answers

0
Benjamin On

Welcome to SOF and AnyLogic. Best post separate issues for separate questions, see this intro to SOF for AnyLogic users.

But for now:

I want to take out queue size at every time step from a service block and create a dataset.

Use a cyclic event that calls myDataSet.add(myServiceBlock.queue.size())

I also want to take out the mean queue size from the same after every replication and create a dataset of that as well.

In your experiment, add a DataSet myMeanResults. In the "On Simulation end" code box of your experiment, call myMeanResults.add(root.myDataSet.getYMean())

Make sure your Datasets can keep enough values!

Also, always check the AnyLogic help and example models. Very often, these basics are covered there already. Else, tell us what you already tried :)