Reputation: 75
I am working on the evacuation time of pedestrians by running 100 runs using monte carlo. I have trouble creating the graphs and am very confused in the steps. Something is missing and I am not sure what it is.
I have created a parameter variation experiment page and included a Histogram2D data and a graph from analysis but I don't know how to read the data I want from the main.
Below image is the data I am trying to acquire from the timeMeasureEnd which isn't linked yet.
I use the code
root.timeEnd
but get this error as shown below
Upvotes: 0
Views: 417
Reputation: 972
You can directly access the timeMeasureEnd's internal dataset: timeMeasureEnd.dataset. See the AnyLogic example model Measuring Length of Stay, referenced in the documentation.
As for your error, your statement gets interpreted as a variable declaration. As soon as you put some useful code in there it works, eg. a simple assignment to a local dataset in your Experiment class:
dataset = root.timeMeasureEnd.dataset;
To save the longest measured time after each run:
iteration
to save the current iteration indexiteration++;
dataset.add(iteration,root.timeMeasureEnd.dataset.getYMax());
Upvotes: 1