Learning Book - Collecting, Outputting and Inputting Data in Anylogic PDF
Learning Book - Collecting, Outputting and Inputting Data in Anylogic PDF
Learning Book - Collecting, Outputting and Inputting Data in Anylogic PDF
April 4, 2012
Recording of Results
• A frequent modeler need is to record some
components of model state over time
– State variables (e.g. stocks)
– States of agents
– Summaries of model state
– We informally term this a “trajectory file”
• Trajectory recording is only supported by AnyLogic
Professional
• AnyLogic does allow for
– Definition of DataSets that record recent values of
parameters
– Statistics summarizing model state
– Reporting on values of data sets as a graph or table
Techniques for Outputting Data
• Ad-Hoc Exports from variables
• Manual copies from visible datasets
• Export to files
• Writing to console
• Export to databases
• [AnyLogic Professional] Dataset archiving
• Capturing images of graphs
Cross-Method Output Tips
• A convenient mechanism is to periodically output
data using events (e.g. every time unit)
• Beyond output, be sure to save information on
context of run
– Model version (Use unique id that increment whenever
change model)
– Parameter assumptions
– Intention
• Think carefully about whether want to save away
intermediate data
Hands on Model Use Ahead
Expression: item.statechart.isStateActive(Person.Susceptible)
Example Statistics
The population in which the statistics
are to be calculated