i want to make Pedestrians to select a specific attractors once they enter a waiting area where this area is a waiting area , this area has many attractors , how that can be done ?
The pedWait block has that option clearly defined:
you can choose a customer attractor choice and use areaNode local variable in the attractor choice in order to get the attractor you want. In this example i choose the first attractor (with index 0), but you will have to create your own logic in order to decide what is the suitable attractor for your incoming agent.
Related
In my model, there are pickers moving along a picking aisle. They pick up "Box" agents from a "picking slot", and then transfer those "Box" agents into a conveyor flowchart using the enter.take() method. The specific conveyor and entry point on that conveyor are dynamically defined according to the picker's current location.
A simple flowchart like so:
It works most of the time, but when traffic gets high, I end up with the following error.
An agent was not able to leave the port root.enter_convey.out at time
784.505 / date Mar 8, 2021, 12:12:04 AM (current model time is 785.088). Consider increasing capacities and/or throughputs of the subsequent object(s) or using PULL protocol
I suspect it is due to a presentation of the "Box" agent existing within the entry area of the ConveyorPath during the time the following agent is slated to enter. Is that correct? If not, what is the issue?
If my suspicions are correct, how would I go about finding out whether the entry zone of the conveyor I am trying to place agents on is occupied? And how would I go about writing a condition in order to only send agents into the conveying flowchart if the space is free?
EDIT - Additional details, follow up to Yashar's answer:
I have multiple conveyor/picking aisles, and within each of those are multiple pickers.
Let's say picker 1 is dropping off Box X at offset A, and there is currently no space. Box X enters and stays in the queue.
At the same moment, picker 2 is dropping off Box Y at offset B, and there is also no space. Box Y enters and stays in the queue behind Box X.
Now according to the Queue block functions, even if a space frees up at offset B for Box Y, Box Y would still have to wait for Box X to enter the conveyor before it can enter itself. That would not be the behavior I am looking for. Am I correct in my understanding of the Queue block?
Thank you.
You can add a queue block after enter_convey. Don't forget to tick the maximum capacity there. If your conveyor system has a maximum number of units it can accommodate, then it is natural that after that limit, no units can enter the system. You can either do that or keep them in the previous station (using a delay block with "stopDelay ()" option) and whenever you have empty space in the conveyor you can send a signal to stop the delay and send it over to the conveyor system.
I have a warehouse model where "Picker" agents move along the Y-axis to reach the front of a "picking slot" agent.
I would like to make it so that upon arrival in front of the picking slot, the Picker agents face the picking slot.
I am aware of the "Set rotation upon arrival" feature of the MoveTo blocks, but I am having trouble making sense out of it. What sort of value should I input here?
Is it possible to dynamically define the rotation according the the agents' relative location to each other? If so, how should I go about it? Some of the slots are on the left of the picker, and others on the right.
Thank you.
Please have a look at the Wholesale Warehouse example in the sample models (help section of AnyLogic). There they use agent.agent_image.setRotation(-PI) and then turn it into initial position with agent_image.setRotation(0) You can use this dynamically and with if conditions in your blocks.
I am running a pedestrian simulation in Anylogic and want greater granularity in the agent position information that I get at the end of my model. Currently, I have it set up to show a heat map of traffic density, but I would like to trace the actual position of each agent through its time in the model, like a line or trail.
model visualization at the end of a simulation
[1]: https://i.stack.imgur.com/RwCVo.png
Add a cyclic event into your Pedestrian agent type (you cannot use the default pedestrians but must create your own agent type).
Then, every second (or whatever resolution you need), write the pedestrian coordinates (getX and getY) into a dbase table along with its index.
Then, you can do any post-processing that you need.
PS: typically, this is not really necessary, so make sure you really need this ;)
I can make agents go to "n" number of attractors in an area using the pedestrian library but when I try making agents go to the attractors in a rectangular node area drawn using the process modelling library, I can only make the agents go to one of the "n" numbers of attractors I have drawn. So I want to know is there a way to do the same thing using process modelling library.
Current blocks:
In a moveTo block property, you should specify Attractor as your destination, and not node. And then either put exact static attractor (you should have 'n' moveTo blocki in this case) or better define some logic to determine next attractor dynamically: for example add all your attractors to collection and then specify "randomFrom(collectionName)" as a dynamic value of attractor. In a latter case 1 moveTo block will be enough but you might need to create a loop (with a help of selectOutput object) which will process movement n times.
I am working on an evacuation project for a floor and would like to create a distribution of pedestrians from the pedSource block. These pedestrians will already appear in an area when I run the simulation. I want to obtain a fixed number of pedestrians in one area while the rest is distributed to other areas.
I have made a collection of areas that pedestrians will appear using allLocations (area, area1, area2 and OfficeArea). The event is triggered by an event and using a delay block. The max amount of pedestrians at the given floor is 100
Image of block flowchart
Image of floor layout plan
This is the code I tried where pedestrians would appear in the areas:
allLocations.get(uniform_discr(0, allLocations.size()-1))
I expect a fixed 10 number of pedestrians in the office area and positioned where I set the attractors, but the actual result shows more than 10 number of pedestrians and do not appear at the set attractor.
Image of actual result
Setting an attractor as a target for pedestrians is according to the documentation only working for the blocks pedWait and pedGoTo (I could actually only get it to work with pedWait, not with pedGoTo). Therefore you cannot initialize agents directly onto attractors using the initial location or the jumpTo() function.
You have several options as a workaround:
Extract the x,y coordinates of the attractor, and use the type point(x,y) to define the initial location or the location for the jumpTo()
Instead of using (graphical) attractors consider just defining points by code directly
Use very small individual areas instead of one large area with attractors
Use a pedWait block in your process flow and let your pedestrians 'walk' to their initial positions. Give the model a short time until everybody is on the desired location before starting your evacuation. You can also run the model in super fast mode during this initial phase, so that it will barely be visible.