I run a parameter variation experiment in Anylogic and collect histogram data about the number of specific agents. This histogram returns the min, mean, and max-value (among others).
I am looking for a way to get the dataset for one specific iteration only (the iteration that is closest to the mean-value of the histogram data).
Is there a way to return data for one specific iteration?
Many thanks!
Yes, but not with HistogramData objects.
Use normal Dataset
objects in your experiment. In the properties, you can switch to "use x value as iteration" and store any value from your model iterations in the y-value.
Now you have a nice table with data from your individual iterations.
cheers
Thanks @Benjamin, one step closer to the solution! Now that I know the iteration I am interested in, can I add data from this specific iteration to another dataset? Maybe something like dataset2.add(get.iteration(X).Data? I could not find a related command in the documentation.
Use
DataSet.getY(i)
where i is the iteration number you are interested in. Add it to another dataset usingadd(x,y)