AnyLogic 6 Discussion

Greetings, I need to do the same experiment a number of times and store the experiment results in an Excel sheet. How can I replicate it automatically and quickly the same experiment a number of times? I need to take statistics with the results. sorry for my translation. Thank you very much
Hi Leo, You can use Parameter Variation experiment to implement it. Even you have no parameters to vary, you will be able to run it the required number of times and collect the statistics. You should use "After simulation run" field from advanced properties of experiment to write statistics to the database. From this field you will be able to refer to the root active object using reserved word "root". I hope it helps.
Thank you Pavel, it helped me, but not entirely, i have many doubts. For example: a simple MM1 system, source-queue-delay-sink; then, at the end of the experiment in the sink object, i exported the total number of entities in a database excel (just one number). The conditions don't change during the experiment. I need to repeat the experiment 1000 times, from the begining (finally, 1000 data in the database). What should i write in the diferent field of the different objects? I would appreciate if you help me with this simple example. Sorry for my translation, I hope you understand my explanation. thank you very much.
Hi Leo, You're able to calculate the number of entities entered sink block using the following method: "sink.in.count()". In Parameter Variation experiment you should set the required number of runs (in "Number of runs" field) and type the code like the following in "After simulation run" field: database.modify("INSERT INTO table_name VALUES ('"+root.sink.in.count()+"');"); More information about how to work with databases, you can find in the Knowledge Base: http://www.xjtek.com/search/?s=excel&section[kb]=on
Hi Pavel, thank you very much, it helped me with: root.database.modify("INSERT INTO table_name VALUES ('"+root.sink.in.count()+"');"); One more question: applying the same tool (Parameter Variation experiment), and the same example, working with confidence intervals on the property "replication", what does the field "of expression"?. Thanks again Pavel
Hi Leo, "of expression" should contain the objective function for which the confidence level is evaluated.
and how can I built the "expression" (e.g. a queueTime of a defined Java Class (in this case "Client")) in a single server system (source-queue-delay-sink)????... p.s.: i already defined the "queueTime" using e.g. the "time()" function. greetings marcelo
Hi Marcelo, For instance, you can create function and two variables (or e.g. collections) where you will store the time when entity enter and exit the queue. Then, when entity exit the queue, you can call the function that calculate how many time entity spent in the queue. So this function can be an expression.
Hi Pavel can we make Parameter Variation experiment invisible at runtime. No User Interface. Thanks
Hi Anil, Only Custom Experiment (available in AnyLogic Professional) can be used to run the model in invisible (fastest) mode.