Reputation: 31
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?
Upvotes: 3
Views: 1797
Reputation: 12793
Many factors can slow your model, here are just some ideas:
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
Upvotes: 5