Skip to content

Commit e35e444

Browse files
committed
Passing LoopDistributedCentralized.lf and PingPongDistributedPhysical.lf
To make LoopDistributedCentralized.lf, a dummy event is enqueued when receiving PTAG in case there is no scheduled reaction at the ptag and the federate should send ABS messages. For passing PingPongDistributedPhysical.lf, a federate that doesn't have any upstream nor downstream is now can advance its tag itself.
1 parent 19cdec2 commit e35e444

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/core/federation.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1381,6 +1381,7 @@ export class FederatedApp extends App {
13811381
() => `Adding dummy event for time: ${physicalTime}`
13821382
);
13831383
this._addDummyEvent(new Tag(physicalTime));
1384+
this.sendRTINextEventTag(new Tag(physicalTime));
13841385
return false;
13851386
}
13861387
}
@@ -1787,8 +1788,10 @@ export class FederatedApp extends App {
17871788
this._requestImmediateInvocationOfNext();
17881789
Log.debug(this, () => {
17891790
return (
1790-
`Granted tag ${nextTag} because the federate has neither upstream` +
1791-
`nor downstream federates.`
1791+
"Granted tag " +
1792+
nextTag +
1793+
" because the federate has neither upstream " +
1794+
"nor downstream federates."
17921795
);
17931796
});
17941797
return;
@@ -2047,9 +2050,12 @@ export class FederatedApp extends App {
20472050
)}.`;
20482051
});
20492052
// Update the greatest time advance grant and immediately
2050-
// wake up _next, in case it was blocked by the old time advance grant
2053+
// wake up _next, in case it was blocked by the old time advance grant.
2054+
// Add a dummy event to send port absent messages if there is no scheduled
2055+
// reactions at the given tag.
20512056
this.greatestTimeAdvanceGrant = ptag;
20522057
this._isLastTAGProvisional = true;
2058+
this._addDummyEvent(ptag);
20532059
this._requestImmediateInvocationOfNext();
20542060
});
20552061

0 commit comments

Comments
 (0)