Skip to content

Commit

Permalink
Update next_event unconditionally
Browse files Browse the repository at this point in the history
  • Loading branch information
Soroosh129 committed Apr 4, 2022
1 parent 8fe8d60 commit 54b31c8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/federated/RTI/rti.c
Original file line number Diff line number Diff line change
Expand Up @@ -807,9 +807,11 @@ void handle_time_advance_notice(federate_t* fed) {
LOG_PRINT("RTI received from federate %d the Time Advance Notice (TAN) %lld.",
fed->id, fed->time_advance - start_time);

// Update the completed tag to match the TAN.
// Update the NET to match the TAN. The NET is a promise that, absent
// network inputs, the federate will not produce an output with tag
// less than the NET.
tag_t ta = (tag_t) {.time = fed->time_advance, .microstep = 0};
fed->completed = ta;
fed->next_event = ta;
// We need to reply just as if this were a NET because it could unblock
// network input port control reactions.
// This is a side-effect of the combination of distributed cycles and
Expand Down

0 comments on commit 54b31c8

Please sign in to comment.