Gathering statistics on a resourcePool - anylogic

I want to get some statistics on some of the resources I have in AnyLogic. For instance, I have a forklift agent and a resourcePool of forklift and I want to get the hourly utilization and the total distance traveled by all forklifts in the pool. I know I can click on the resourcePool icon and see the utilization, but I want to get that with the traveled distance updated and saved every hour.
Sorry I'm new to this and took me few months of learning to get my model straight
Thank you

First, you must create an agent type for your resources. With that in place, you can record anything anytime using datasets or default AnyLogic logging capability.
See some example models using resource pools with custom agent types such as "Lead acid battery production" and many more.
PS: Recording distance travelled is done automatically if you apply default logging but it is a bit more involved if you want to do it manually.

Related

Mean statistics about agents in Anylogic

I'm working on a family practitioner model, my goal is to model the population of a city and all of the family practitioners in that given city by taking into account the distribution of the treatment time and the arrival schedule of patients etc... So far i've managed to create an agent that contains a bloc diagram to model the whole process
With a source and a delay bloc to generate patients according to a fixed schedule, a service bloc and two sinks.
Now i've put a population of this agent "process" in the main and i've simulated the model for 3 months.
Lets say i've started with a population of 10 process which represents the number of practitioners. My goal now to to collect some Mean statistics, like the Mean number of treated patients (treated patients goes to the sink "Served") of the 10 practitioners, the Mean waiting time of patients at the service bloc, the mean utilization ratio of the resource of the service bloc...
I want to also know if is it possible to limit the total number of Patients (or to at least count them), for exemple, instead of simulating the model for 3 months, i wanna limit the total number of patients that goes to the 10 process to 10k and i want to know how much time does it take to serve all of them. (is it possible with this architecture of the model or do i have to make major changes)
Thank you

Traffic Flow regarding Anylogic

I'm an undergrad student in the Philippines and were currently using Anylogic Software for our thesis. May I ask how to put a chart/time plot that consists the traffic flow (vehicle per hour) so that we can justify that our study area is congested? Thank you and have a good day.
The are a number of options you can use but the simplest option is to count the total number of cars in the system.
For this simply add a Road Network Descriptor and select the road network you want it to represent
Then you add a time plot, and set the value that needs to be plotted as roadNetworkDescriptor.size() and set the update time to hour

Track driven distance of transporters in Anylogic

I have modelled a fleet of AGVs as agents through TransporterFleet and TransportControl blocks.
The AGVs navigate in free space between different conveyors and their home locations.
Is it possible in Anylogic to track the driven distance for each AGV?
The Transporter API includes a getDistanceTravelled() function since version 8.5.2
Try using the "Logging" feature as that typically tracks the distance covered by agents in your model.
If it doesn't work for free-space AGVs, you have to record it manually (recurring event every x time-units)

How to make Anylogic simulations run faster?

I have a model with agents: cars, passengers and petrol stations. The population size of the cars is 500 and there are 5 petrol stations. The passengers here are generated randomly and I have capped the passengers on the map to be at a maximum of 500 at any point in time (the limit here is set to be the same as the population size of the cars).
However, the simulation speed is running really slow (like 1-2s/sec) on virtual mode. Could this be due to the complicated model built or are there any ways on how we can speed up the running time of the simulation?
Many factors can slow your model, here are just some ideas:
Do you use Pedestrian agent types for your passengers? Try not to, unless ped dynamics are crucial
do you use conditional transitions? They are evualated at every event in the model and can slow it. You can always replace them with message-based transitions easily
Do you use the road traffic library? Again, only apply it if car dynamics are really necessary, else revert to the process library
Do you read/write a lot of data during the sim run to the dbase or an external file? Avoid that and do it at the start/end
Also, it could just be inefficient coding. You can check that using a Java profiler. Easiest is to use the one that comes with any Java JDK.
Good luck

how to make live scoreboard in netlogo?

i am working on the simulation of coalition in agent society. Agents (turtles) form coalition dynamically and after some times they left current coalition and joined other one. Hence, number of members (turtles) in the coalition vary on every tick. Some times because of no member in the coalition, coalition vanishes and some times two or more than two members (turtles) form the new coalition. I want to have live score board in simulation, which gives updated stats about the coalition and its members. For instance, how many coalition currently exist, what are the names of the coalition and how many members in each coalition. Could any one guide me which feature should i use to develop the live score board? Any guidance would be highly appreciated.
The monitor widget is the best option for current count of coalition membership (or plot if you want it over time). For more detailed information, have a look at using the output area with commands such as output-show to provide the information.