Are there things that need to be done to have a simulation that repeats time after time?

24 views
Skip to first unread message

Vaillancourt

unread,
Feb 20, 2025, 1:07:34 PMFeb 20
to ode-users
Hello!

Say I have  X vehicles simulated, and every simulation run, each vehicle receives the exact same input as the previous simulation run; can I expect to have the same simulation result, or there are things that prevent this? 

Assume that:
- I'll repeat this on the same system, with the same executable
- I have hacked the int dRand() function to always return the same value (0)

Thanks!

- Alexandre Vaillancourt

Oleh Derevenko

unread,
Feb 20, 2025, 1:57:33 PMFeb 20
to ode-...@googlegroups.com
You can assign a specific seed for the dRand, you don't need to disable it.
If you use single-threaded mode then your simulation should yield the same results each time.


Oleh Derevenko

-- Skype with underscore

 



From: ode-...@googlegroups.com <ode-...@googlegroups.com> on behalf of Vaillancourt <alexandre.vai...@gmail.com>
Sent: Thursday, February 20, 2025 20:07
To: ode-users <ode-...@googlegroups.com>
Subject: [ode-users] Are there things that need to be done to have a simulation that repeats time after time?
 
--
You received this message because you are subscribed to the Google Groups "ode-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ode-users+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ode-users/a791e131-cf0a-4010-a82e-48101ef9cb29n%40googlegroups.com.



This e-mail may contain privileged and confidential information. If you are not the intended recipient, be aware that any use, disclosure, copying or distribution of this e-mail or any attachments is prohibited. If you have received this e-mail in error, please notify us immediately by returning it to the sender and delete this copy from your system. Thank you.

Vaillancourt

unread,
Feb 20, 2025, 2:54:00 PMFeb 20
to ode-users

You can assign a specific seed for the dRand, you don't need to disable it.

Yes, you're right; we're doing this normally but I wanted to make sure and "isolate" this aspect of the issue.
 
If you use single-threaded mode then your simulation should yield the same results each time.

Okay, we don't explicitly enable multi-thread right now and so it's not the issue.

Thanks for the answer, I'll keep digging!

- Alexandre

Vaillancourt

unread,
Feb 25, 2025, 10:18:59 AMFeb 25
to ode-users
I confirm that this appeared to be an issue with our code, not ODE's.

Thanks!

- Alexandre Vaillancourt

Reply all
Reply to author
Forward
0 new messages