How can I generate unique numerical IDs for agents created by three different sources in AnyLogic?

Advertisements I have three sources that create agents and then flow into a queue. All three sources create different agents. My idea is to assign an ID (numerical value of int) to each created agent in each source at "Actions – On before Arrival". The ID should be unique. So it should be prevented that… Read More How can I generate unique numerical IDs for agents created by three different sources in AnyLogic?

Anylogic Parameter Variation Experiment output to Excel

Advertisements I’m trying to use parameter variation experiment of Anylogic and export the result "loss" of each run to the corresponding position in the Excel table. However, only a few of the results are successfully exported to the table. The related code and result are shown below. enter image description hereenter image description hereenter image… Read More Anylogic Parameter Variation Experiment output to Excel

AnyLogic – Excel output: delete spreadsheet before each simulation run?

Advertisements After destroying my main agent I wrote a code ExcelFile.setCellValue(…) that puts parameters into an Excel. My output function with excel works but only if I delete the whole workspace of each spreadsheet before every simulation run. Because I have a big number of sheets this is very exhausting. Is there a possibility to… Read More AnyLogic – Excel output: delete spreadsheet before each simulation run?

Anylogic: I've assigned a statistic value to a variable, but it only return 0

Advertisements I have assigned a statistics value to the variable waiting_units using jeepneys.Waiting_Units_MDJ(). jeepneys is the population, and Waiting_Units() is the statistics. When simulated, it only returns 0 and not the statistics value. It only shows the right statistic value if I add an event with an action waiting_units = jeepneys.Waiting_Units_MDJ(); to assign the value.… Read More Anylogic: I've assigned a statistic value to a variable, but it only return 0

How to count and illustrate agents based on specific parmeter values in bar charts?

Advertisements My source is generating an agent called Sitz with several parameters which get their value out of a database. One of the parameters is product_type. Now I would like to count and illustrate the number of Sitz for each product_type in bar chart. I am thinking of a bar chart which shows 2 bars,… Read More How to count and illustrate agents based on specific parmeter values in bar charts?

How to return agents based on same value of a integer parameter

Advertisements I have agents(Segment) with parameter ring(integer). I want to release my agents when three rings are equal. For example the entries in wait block are as follows 13,25,7,25,13,25,13,7,1,1,7,1,….. As soon as 3 parameters are equal they should be returned. I am struggling to compare the parameters in a queue, if anybody can help that… Read More How to return agents based on same value of a integer parameter