Anylogic won't start simulation (stuck on "Please wait") - simulation

I've been developing a model for a car fleet service. I have the model ready and it works fine. The problem is when I try to put all the input trips it is supposed to do, during the course of a day, the simulation won't start, it will just get stuck on the white simulation window after I click play with the information "Please Wait". I have table in the database with all the trips (they are aggregated for simplicity, i.e. trips with same origin, destination and departure time only occupy one excel line, with the number of agents it represents, instead of one line for each agent), and while I was developing the model, I would have condition to only load the trips table until a certain departure time, so I could test the simulation quickly, this would correspond to about 100 lines of data. But now that I'm trying to load all the trips in the table (this corresponds to about 12000 lines of data), the simulation won't even start, it just gets stuck on the loading phase. I pressed play last night and it's been 10 hours and it is still stuck on the same windows with the info "Please wait".
What should I do ?
Any help would be really appreciated.
Thank you for your time.

Related

Measuring system time of specific agent in anylogic

I've got 3 different product types of agent, which each go it's individual path within the fabric. How can i measure the average time the product type spends in the system?
My logic looks like this , and i wanted to implement the measurement in the first service, like this:, it will be completed in the last service like this :
Now I get some really high numbers, which are absolutely wrong. The process itself works fine, if you run the measurement with the code "//agent.enteredSystemP1 = time()", you will get a mean of 24 minutes, per product. But how can i get the mean per product type?
Just use the same if-elseif-else distinction in the 2nd service block as well.
Currently, any agent leaving the system adds time to any systemTimeDistribution

The simulation model time slows down in virtual mode

I am currently building a model on a manufacture process line and the simulation was running fine without errors. Suddenly when I entered in virtual mode to run quickly the simulation, the model started to slow down although the step is high. I am trying to identify where the issue is but nothing is working. At a certain time , the simulation just stops while the step is still running.
This is a picture of the pallete, maybe the experiment is causing this.
You created an infinite loop, this can be triggered by various things in your model.
Likely, you have a ' while' loop not finishing, could also be a condition-based transition.
You need to find this yourself, though. 3 options:
(easy): Check the model logic yourself and find the problem
(easy): nudge yourself to where it stops with traceln commands (see where they stop showing, getting you closer to the culprit)
(harder): Use a profiler (google "AnyLogic profiling" or similar if you are not familiar)
Benjamin is correct, you have created an infinite loop. Click on the "Events" tab in the developer panel and see which events are scheduled to occur at about the time that your model slows down to 0 days/sec. You can also pay attention to the "Step: " counter at the bottom of the developer panel and see where the step count spikes - e.g., if your model has roughly 10k steps per day, and suddenly starts climbing to 400k steps around 25.99 days, you can pay attention to which things are happening in your logic at that time and narrow down where the infinite loop is created. traceln will also help immensely

Increasing model simulation speed with big number of agents/transporters Anylogic

I've a question. In my model I want to model patients/employees in a hospital environment as agents. Due to the big amount of patients/employees in the hospital (>4000), my model runs very slow (which is logical, I know). Because I want the patients employees to block eachother and AGVs, I let them move by a transporterfleet (which has >5000 capacity), by doing this method I can make it possible to let them block eachother.
Now what I want is that when the patient or employees arrive to the location departments they disappear for hours/minutes as long as there appointment or workschedule is saying to them. The most perfect is to just delete them for example 4 hours of runtime, so that I will only have the moving agents in my model, is there a way to do this? So that when a patient/employee arrives at an appointment, the agent and transport disappears for 4 hours and returns after this delay, keeping in mind that it should speed up the run-speed of my simulation (otherwise I just can use a delay block, but than my model keeps very slow). The transporters are making the model really slow.
Or perhaps another method will be better to model the patients and employees with the feature that they are blocking AGVs? An option which I should think of is that an moving agent is constantly checking if there is an agent close to him every second, but I do not know if this will be speed up the runtime or just will slow it down even more with >4000agents.
Or another option is that I only let the AGVs check if there are agents around them every second just by coding(this will only be around 40 agents).
Also you see that it is only using 5% of my memory data..
Thanks.

Is there a way to not start an Anylogic simulation from scratch every time?

Good day
I'm a new user trying to find my with Anylogic.
Any help with the following question will be appreciated.
Is it possible to start a model with initial values/quantities given to certain blocks/sections in a model? In other words not have the model start from 0 but from the values given.
You can run a "warmup" period manually and save that as a model snapshot. In future runs, you can start off from that snapshot by loading it. See the help on model snapshots
This is the general problem of model initialisation (e.g., if you're modelling a manufacturing facility, you may want the run to start with the facility at the state it would be at on 9am next Monday morning). There is no generic answer: what initialisation you need is 100% model-dependent (as is how easy/hard this is).
In particular, process models make this difficult because entities (agents) are expected to have flowed through the process up to the point they 'start' in. You can use things like extra initialisation-only Source/Enter blocks to 'inject' agents into the appropriate process points, but in most models it's not this easy: you will have all kinds of model state that needs to be made consistent with this (e.g., the agents flowing through the process might have attributes which have changed based on what's happened to them so far, so this would have to be made consistent).
That's why warm-up periods (letting the model run 'from empty' for a period until its state is qualitatively what you want as your starting point) is a common approach. Model snapshots can help you here (see Ben's answer) but they're not the only way of doing it. (You can also just 'reset' all your metrics/output gathering at the point when you determine the warm-up period has ended --- i.e., you are effectively establishing a new 'time zero' --- but, again, exactly what you need to do is 100% model dependent.)

What code should I write in Drop off? ANYLOGÄ°C

What code should I write in Drop off?
The Simulation Scenario is as follows: There are 7 passenger stroke riding stops in total. There are also passenger arrivals to all 7 stops. Every two minutes a bus arrives and takes the passengers from the stop, lowering the passengers who want to get off. My problem starts exactly here. For example, how will I determine the passengers to land at the 3rd stop? I want 10% of passengers boarding at the first stop to drop 30% of passengers boarding at the second stop.
I did not know what to write in the drop off section to do so.
I tried this way. I have appointed passengers from each stop as agents separately. Maybe I could write it that way, but it gave an error when writing to drop off.
general view error location
Thanks for the clarifications.
Easiest way would be to store where pedestrians were picked up. Add a variable "myPickUpStation" to your pedestrian agent type (ensure to have a custom type).
Also, add a collection "myPedestrians" to your bus agent type. Fill it in the pickup so the bus knows who he has.
Then at dropoff, you can first query all peds in the bus who were picked up at station 1:
findAll(container.myPedestrians, p -> p.myPickUpStation == 1) (1 is just an example)
And then, take 10% of that group's size:
0.1 * findAll(container.myPedestrians, p -> p.myPickUpStation == 1).size()
Obviously, you will need to round that to a proper int