Hi, i am trying to coupling two simulation tool with DCP methods. To understand DCP correctly, i was trying to run some examples (spring-damper-master/slaves) available in DCP source code. I found there, the time resolution for simulation is set up 100ms (numerator=1 and denominator=10). With this configuration every thing works fine. Then i treid to decrease the time resolution for simulation namely 10ms (numerator=1 and denominator=100), simulation ran perfectly. But afterwards i looked in to the output values, and found that the data are not sent correctly between these two slaves during simulation/running. In the doStep methods, some calculations are made in both slaves. The slave2 sends a variable (called Fc) in every doStep to the slave 1 (which is stored as Fe). If you look these attached screenshots, you can see the the slave 1 did not get the actual output (Fc) of slave2 in every doStep, while slave2 has calculated correctly. Often the slave1 has received the old output of slave2 and multiple times. However this behaviour is only, if i reduce the time resolution to 10ms. By time resolution of 100ms everything is fine (see attachment).
Could anyone help me to figure out, what is the reason behind it ?
Did i missed here some other parameters, which are important for exchanging variable accurately?
Figure 1: Output from doStep of slave2 with time resolution 10ms (numerator=1 and denominator=100)
Figure 2: Output from doStep of slave1 with time resolution 10ms (numerator=1 and denominator=100)
Figure 3: Output from doStep of slave2 with time resolution 100ms (numerator=1 and denominator=10)
Figure 4: Output from doStep of slave1 with time resolution 100ms (numerator=1 and denominator=10)
Hi, i am trying to coupling two simulation tool with DCP methods. To understand DCP correctly, i was trying to run some examples (spring-damper-master/slaves) available in DCP source code. I found there, the time resolution for simulation is set up 100ms (numerator=1 and denominator=10). With this configuration every thing works fine. Then i treid to decrease the time resolution for simulation namely 10ms (numerator=1 and denominator=100), simulation ran perfectly. But afterwards i looked in to the output values, and found that the data are not sent correctly between these two slaves during simulation/running. In the doStep methods, some calculations are made in both slaves. The slave2 sends a variable (called Fc) in every doStep to the slave 1 (which is stored as Fe). If you look these attached screenshots, you can see the the slave 1 did not get the actual output (Fc) of slave2 in every doStep, while slave2 has calculated correctly. Often the slave1 has received the old output of slave2 and multiple times. However this behaviour is only, if i reduce the time resolution to 10ms. By time resolution of 100ms everything is fine (see attachment).
Figure 1: Output from doStep of slave2 with time resolution 10ms (numerator=1 and denominator=100)
Figure 2: Output from doStep of slave1 with time resolution 10ms (numerator=1 and denominator=100)
Figure 3: Output from doStep of slave2 with time resolution 100ms (numerator=1 and denominator=10)
Figure 4: Output from doStep of slave1 with time resolution 100ms (numerator=1 and denominator=10)