@@ -1381,6 +1381,7 @@ export class FederatedApp extends App {
13811381 ( ) => `Adding dummy event for time: ${ physicalTime } `
13821382 ) ;
13831383 this . _addDummyEvent ( new Tag ( physicalTime ) ) ;
1384+ // Notify the NET to the RTI.
13841385 this . sendRTINextEventTag ( new Tag ( physicalTime ) ) ;
13851386 return false ;
13861387 }
@@ -1702,6 +1703,7 @@ export class FederatedApp extends App {
17021703
17031704 /**
17041705 * @override
1706+ * Do the steps needed for the new logical tag.
17051707 * Enqueue network port absent reactions and update max level for the new tag.
17061708 */
17071709 protected _startTimeStep ( ) : void {
@@ -2060,14 +2062,21 @@ export class FederatedApp extends App {
20602062 ptag
20612063 ) } .`;
20622064 } ) ;
2063- // Update the greatest time advance grant and immediately
2064- // wake up _next, in case it was blocked by the old time advance grant.
2065- // Add a dummy event to send port absent messages if there is no scheduled
2066- // reactions at the given tag.
2065+ // Update the greatest time advance grant and update MLAA.
20672066 this . greatestTimeAdvanceGrant = ptag ;
20682067 this . _isLastTAGProvisional = true ;
20692068 this . _updateMaxLevel ( ) ;
2070- this . _addDummyEvent ( ptag ) ;
2069+ // Possibly insert a dummy event into the event queue if current time is behind.
2070+ if ( this . util . getCurrentTag ( ) . isSmallerThan ( ptag ) ) {
2071+ this . _addDummyEvent ( ptag ) ;
2072+ Log . debug ( this , ( ) => {
2073+ return (
2074+ `At tag ${ this . util . getCurrentTag ( ) } , inserting the event queue a dummy event ` +
2075+ `with tag ${ ptag } .`
2076+ ) ;
2077+ } ) ;
2078+ }
2079+ // Wake up _next, in case it was blocked by the old time advance grant.
20712080 this . _requestImmediateInvocationOfNext ( ) ;
20722081 } ) ;
20732082
0 commit comments