Simulation finishes prematurely

Discussions regarding ARGoS bugs. Report bugs here.
ooo
Posts: 4
Joined: Tue Jul 31, 2018 7:55 pm

Simulation finishes prematurely

Postby ooo » Mon Dec 03, 2018 8:33 pm

Hi Carlos,
My simulation works sometimes while other times it finishes prematurely for no reason with no error. It jumps to PostExperiment(). I'm not sure what exactly is the problem as it works perfectly sometimes.

Thank you.

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

Re: Simulation finishes prematurely

Postby pincy » Mon Dec 03, 2018 8:49 pm

Send me the code and I'll have a look. With the information you're giving me, I can't guess what the problem is. If the code is large, try to make a shorter version that shows the same problem. This way it will be easier for me to understand what's wrong.
I made ARGoS.

ooo
Posts: 4
Joined: Tue Jul 31, 2018 7:55 pm

Re: Simulation finishes prematurely

Postby ooo » Mon Dec 03, 2018 9:11 pm

Thank you so much. I've attached the shell code.
Attachments
footbot_omega_algorithm_loop_cpp.rtf
(35.11 KiB) Downloaded 5411 times

ooo
Posts: 4
Joined: Tue Jul 31, 2018 7:55 pm

Re: Simulation finishes prematurely

Postby ooo » Mon Dec 03, 2018 9:13 pm

Sorry, the other files did not attach.
Attachments
footbot_omega_loop_h.rtf
(12.43 KiB) Downloaded 4130 times
footbot_omega_controller_h.rtf
(18 KiB) Downloaded 5383 times
footbot_omega_controller_cpp.rtf
(28.68 KiB) Downloaded 5375 times
footbot_omega_argos.rtf
(6.46 KiB) Downloaded 5294 times

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

Re: Simulation finishes prematurely

Postby pincy » Mon Dec 03, 2018 10:25 pm

I found the problem. In your loop functions, you have:

Code: Select all

bool CEPuckOmegaAlgorithmLoopFunctions::IsExperimentFinished()
{

 }
This function must return either true or false. In your code, the return value is undefined. Make sure you return false and the problem will disappear.
I made ARGoS.

ooo
Posts: 4
Joined: Tue Jul 31, 2018 7:55 pm

Re: Simulation finishes prematurely

Postby ooo » Tue Dec 04, 2018 3:56 pm

Ahh. I see. Thank you so much for your help. Why is it that the simulation finishes normally on some runs?


Return to “Bugs”