[Solved] Increasing or decreasing simulation time manually.

Requests regarding how to set up experiments in ARGoS.
ToshbI4
Posts: 3
Joined: Tue Jun 28, 2022 9:38 am

[Solved] Increasing or decreasing simulation time manually.

Postby ToshbI4 » Tue Jun 28, 2022 3:52 pm

Hello!

I have checked all questions, and answers in this forum on the topic of simulation time in ARGos, but unfortunately, I couldn't find the answer to my question.

My question is: how can I increase or decrease simulation time in ARGos relative to real time?
In other words, I want to speed up my simulation, for example, exactly 2 times by changing some of the parameters or other stuff.

I have tried to change ticks_per_second parameter of the experiment in .argos file, or number of threads in different combination for diffusion_10.argos and trajectory.argos examples and nothing has changed for either 10 or 1000 robots. :(

Sorry, if I missed something in tutorial or in answers on this forum.

Thank you for your answer!
Last edited by ToshbI4 on Wed Jun 29, 2022 7:10 am, edited 1 time in total.

pincy
Site Admin
Posts: 640
Joined: Thu Mar 08, 2012 8:04 pm
Location: Boston, MA
Contact:

Re: Increasing or decreasing simulation time manually.

Postby pincy » Tue Jun 28, 2022 4:11 pm

how can I increase or decrease simulation time in ARGos relative to real time?
In other words, I want to speed up my simulation, for example, exactly 2 times by changing some of the parameters or other stuff.
In general (and this is valid for any piece of software), it is impossible to know in advance how much speedup you can get by changing parameters and/or code. So if your aim is a specific amount of speedup, it's not possible to know what to change in order to achieve it.

However, you can make ARGoS run faster. That depends on several things:
  1. What your experiment does. Without details on that, there isn't much that can be suggested to make things better. Optimizing your code is the most important thing.
  2. Compiling your code (and ARGoS) in Release mode speeds up execution considerably.
  3. Using threads often helps when the number of robots involved is large and/or the robot controllers execute expensive code.
  4. Using multiple physics engines helps when the environment is large and when the number of robots is also large.
  5. Configuring the media to have a cell size roughly as large as the communication/sensing range of the most common robot in the simulation also speeds things up considerably.
I made ARGoS.

ToshbI4
Posts: 3
Joined: Tue Jun 28, 2022 9:38 am

Re: Increasing or decreasing simulation time manually.

Postby ToshbI4 » Tue Jun 28, 2022 10:23 pm


In general (and this is valid for any piece of software), it is impossible to know in advance how much speedup you can get by changing parameters and/or code. So if your aim is a specific amount of speedup, it's not possible to know what to change in order to achieve it.

Thank you for your answer!

I understood you, but I think, we are talking about different things.
Maybe I phrased it a little wrong about specific amount of speedup.
I don't want to speed up the software, just want to speed up simulation time.

For example, in stage ros it's possible by clicking "faster", "Slower", or "RealTime" in the menu.
ros-stage-screen.jpg
ros-stage-screen.jpg (176.5 KiB) Viewed 45832 times
And as I know from the articles, ARGos can work faster than real time. But any of examples, that I was running, work exactly in real time. :C

Sorry for bothering you, but time scalability is too important for me!

pincy
Site Admin
Posts: 640
Joined: Thu Mar 08, 2012 8:04 pm
Location: Boston, MA
Contact:

Re: Increasing or decreasing simulation time manually.

Postby pincy » Wed Jun 29, 2022 12:57 am

ARGoS can be run both with a graphical user interface and without. When it runs without interface, it runs at full speed. When it runs with the user interface, there are two buttons to execute the simulation: the "play" button and the "fast forward" button. The second button also comes with a number that indicates how many graphical frames to drop between drawing two frames; this makes ARGoS run even faster.

Comparing Stage and ARGoS is not obvious. If all you need is kinematic models, circle-shaped robots and basic sensing models, Stage is appropriate. ARGoS is a general-purpose simulator that offers quite a bit more.
I made ARGoS.

ToshbI4
Posts: 3
Joined: Tue Jun 28, 2022 9:38 am

Re: Increasing or decreasing simulation time manually.

Postby ToshbI4 » Wed Jun 29, 2022 7:09 am

ARGoS can be run both with a graphical user interface and without. When it runs without interface, it runs at full speed. When it runs with the user interface, there are two buttons to execute the simulation: the "play" button and the "fast forward" button. The second button also comes with a number that indicates how many graphical frames to drop between drawing two frames; this makes ARGoS run even faster.

Comparing Stage and ARGoS is not obvious. If all you need is kinematic models, circle-shaped robots and basic sensing models, Stage is appropriate. ARGoS is a general-purpose simulator that offers quite a bit more.
Thank you very much, it's exactly what I was looking for!
And thank you for your patience and openness to communication! :)


Return to “How to... ?”