My code works well under serial simulation, and with a large-scale network to study, I started exploring parallel simulation simulators in NS-3.
The dynamic nature of the network in my code is reflected in the following two aspects:
- Links between nodes are disconnected or connected with time
- The delay of the channel changes with the movement of nodes because the distance between nodes changes
I've adapted my code to use distributed simulation, and when I fix the channel delay between nodes everything works fine.
When I try to change the delay of the channel according to the time segment, it can be understood that the topology is constant within the time segment. However, the following problem remain when using parallel emulation: NS_ASSERT (next.key.m_ts >= m_currentTs); This means that the timestamp of the next event that needs to be executed is already greater than the current timestamp.
I have tried to locate this bug, and at present it may be related to the following two aspects: 1 Different system processes run at different speeds and take different time to execute channel delay update events, which may lead to different topologies among system processes; 2 Frequent changes in channel delay may not be compatible with the synchronization algorithm in distribution-simulator -impl.cc
Has anyone ever solved a similar problem? I would appreciate your advice.Thank you in advance.