-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow different values for the Trick software frame and least common time step for SpaceFOM #146
Comments
We were just trying to figure some of these relationships out so this is very timely! In addition, how does THLA_DATA_CYCLE_TIME and THLA_INTERACTION_CYCLE_TIME relate to software_frame and the other timing parameters? |
Because the S_define file including the job cycle rates are compile time and not set at runtime we are left with the user needing to set the THLA_DATA_CYCLE_TIME to the same time as the lookahead time. I made the cycle time for interactions (THLA_INTERACTION_CYCLE_TIME) independent of the cyclic data time to give users a better control over processing receive order (i.e. synchronous) interactions but still in a Trick job and thread safe way. The HLA Lookahead time sets the fastest rate you can send cyclic data updates and the THLA_DATA_CYCLE_TIME and THLA_INTERACTION_CYCLE_TIME values give you the opportunity to set the cyclic rate your federation needs to exchange data given the lookahead time as a constraint. Typically the THLA_DATA_CYCLE_TIME matches the lookahead time and THLA_INTERACTION_CYCLE_TIME matches or is an integer multiple faster than the lookahead time to better capture the async interactions. The relationship for these cycle times is the same as that for the lookahead time and the LCTS and Trick software frame. |
Because we will no longer automatically set a value for the Trick software frame for a simulation using SpaceFOM, you will now need to set a value for all your simulations even if they are not running realtime. Make sure you add this directive to your simulation input.py file trick.exec_set_software_frame( t ) and use an appropriate time. If your federates Trick software frame will not meet the constraints for the Least Common Time Step and Lookahead times and error message will be displayed and the simulation will terminate. |
Hopefully this will better show how everything is related given these constraints. We need the Trick Software Frame, LCTS and lookahead all land on the same frame boundary.
For this example, we can get frame boundary alignment with the following:
|
Currently, the Trick software frame and Least Common Time Step (LCTS) for SpaceFOM are locked together. This constrains the simulation to only have a Trick realtime software frame that matches the LCTS. If we apply some constraints we can allow more leeway in setting the Trick software frame, LCTS and lookahead values.
The following relationships between the Trick real-time software-frame, Least Common Time Step (LCTS), and lookahead times must hold True:
As an example, to run a Trick simulation at 20 Hz (i.e. 50 milliseconds) realtime, with HLA data exchanges at 80 Hz (i.e. 12.5 milliseconds) and an LCTS of 100 milliseconds for the time boundary for ExCO commands (i.e. freeze commands), we would use the following settings in the input.py file:
The text was updated successfully, but these errors were encountered: