I'm building a pedestrian model using Anylogic. I have set my agents move in several groups between S2/S3/S4 and S1 (the movement direction is indicated by the blue two-way arrow in the figure).
Background picture for problem statement:
One group of my agents should have appeared from any position in S2(line) and moved toward S1(line), but in fact, I found several agents with obvious abnormal detour behaviour appeared. Their trajectories are shown as the red line with arrows. I have checked there was no interference of other agents at the same time.
May I ask what causes such a small amount of agents to produce this abnormal behaviour since I have set the same behaviour for the whole group? And how to fix this behaviour?
Related
Update: link to simplified model with replicated error added
In simulation model of conveyor technology, we are using a conveyor object type roller and we are moving our custom agents of transporter type by convey block always to the next position on a conveyor (imagine this as a exit or entry point on conveyor). It happens in some random seeds, that our agents cross allowed gap and Anylogic shows following error.
It always happens when some agent enters convey block, but the error occurs on two other transporters, when the one behind crosses the gap. - THIS IS NO LONGER TRUE. Today it happened when there was no agent entering convey block. We did not find any way to ignore this error or to find a workaround. Anyone has any ideas how to resolve it ? Picture of actual situation added, pink conveyors are breaking gap, and error pops up. We also found out that gap is broken also before, but error does not pop up.
link to simple mode file with replicated error: https://cloud.anylogic.com/model/ceafcc2a-9a05-4bb9-a56f-a1c018698b16?mode=SETTINGS&tab=GENERAL
I have a rather huge model of a production system in anylogic with two agv fleets, which transport material between stations. My problem is solely with one of the fleets.
My product enters the system through a conveyor, seizes a transport agent, then waits on the agent and then drives off to the first station.
My problem is with the conveyor and my transport agent. After a while of simulating, I get error message and is what the console says.
Now I thoug myself clever:
If the agent is not on the conveyor (or does not care) it might not throw this error. So I put in the "on new transporter" of the transporter fleet an unit.ignoreCollisions(true);
But that did not help.
Then I made a restricted area around the conveyor (on a scale of 1000 % one of rectangles of the grid to small, then exactly the size, then one row of rectangles too big), but it still goes into the restricted area and then throws me this error.
I do not even understand how the agent can (a) care about this (it ignores collisions) and (b) how it can enter the restricted/forbidden area.
Does anyone else experience the same? How did you solve it?
I am trying to do a pedestrian modeling where individual pedestrian agent behavior needs to be controlled. Can I do that using the pedestrian agent's statechart?
Update: Sorry that my initial question wasn't clear enough
main
jaywalker (agent)statechart
runtime screenshot
jaywalker agent from padsource
In the first picture (main) I have a simple pedestrian model where jaywalker (pedestrian agent) moves through 2 road crossing. Initially all the jaywalker agents are in "walking" state & colored yellow (pic: 2), but whenever some agents are near another agent (near means within the triangular shown in jaywalker agent representation), they send the message "HI" to them & socialize. If someone is socialized, then they move from "walker" state to "socializing" state (and turn red) & send messages to others who are within his triangular range("field of vision" triangle). The first 11 socializing is done directly by a message from main (on model startup) & 11 jaywalker agents are receiving it & moving to "socializing" state. The problem is in my graph it's showing the first 11 socializing but during model runtime the agent's color is not changing. Secondly, after those 11 socializing, agents aren't socializing or sending any message to others who are within his triangle.
So, I am confused about how I can make my agents move from one statechart to another while modeling the movement behavior using the pedestrian library. Am I missing any step to connect the pedestrian library & agent statechart?
It looks like you did not tell PedSource to create your custom ped agents of type "JayWalker". Try this:
Delete your population, not needed
Make sure your JayWalker agent type is defined as pedestrians in its properties:
In your PedSource, make sure it creates "JayWalker" agents as below. (You should select JayWalker where my screen selects "MyPed")
Optionally, you can make the PedSource add the created "MyPed" agents to a custom population, but likely not necessary for you.
PS: Please understand that PedSource is creating agents, do not use your population for that. Read some more about PedSource and populations and do some tutorials to understand these basic concepts better :-)
I am quite new with Anylogic.
I am trying to model a simple conveyor system.
I would like my conveyor to accumulate until the conveyed objects touch each other.
I have set the "gap" parameter of the conveyor to zero, but the objects accumulate with a pitch of (apparently) one meter ?
Am I missing something ?
Please have a look to the model:
https://cloud.anylogic.com/model/3af9fc14-8677-4171-9191-52614703bef6?mode=SETTINGS
If you have a custom agent, you can set it to type Material Item (1). You can then set the dimensions at the class level (2), and AnyLogic gives you this nice visual aid to see how big your item is (3). This visual is nice, because then you can draw your shapes for animation purposes to match the size.
This approach would be for components that do not change in size, like pallets or consistent parts in a manufacturing environment. For material items that have varying sizes, like boxes in a DC, I would probably use the source solution Ben suggested.
You can set the size of your agents in several places. Best one for you is likely in the Sourceblock when you create your object agents. Tick the "change dimension" tickbox as below:
In your conveyor, you can override/adjust the length again if you like:
I am modelling a crowd simulation in AnyLogic where the people throng around a vehicle which moves in time. Since the vehicle is an obstacle, pedestrians should not get within it.
As walls are treated as obstacles in AnyLogic, I decided to use walls for defining the vehicle.
However the problem is walls are static elements and their position cannot be changed at run-time. So is there any solution or a viable alternative for the problem described ?
UPDATE
If I model the vehicle as a pedestrian instead and use a large diameter, peds still manage to get inside it. Moreover, since vehicle is now a type of pedestrian its movement is not straight, and deviates from its path due to collision with others peds.
If you make pedSource and vehicleSource both flow into a single pedGoTo, the Agents they produce will bounce off one another regardless of their type.