Skip to content

Commit

Permalink
Prevent addition of microstep delay for a networkMessage action.
Browse files Browse the repository at this point in the history
  • Loading branch information
hokeun committed Dec 29, 2021
1 parent 3a738fd commit bd1dffe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/core/reactor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,9 @@ export class Action<T extends Present> extends ScheduledTrigger<T> implements Re
tag = tag.getMicroStepLater();
}
}

if (this.action.origin == Origin.logical && !(this.action instanceof Startup)) {

if (this.action.origin == Origin.logical && !(this.action instanceof Startup)
&& this.action._getName() != "networkMessage") {

This comment has been minimized.

Copy link
@lhstrh

lhstrh Dec 30, 2021

Member

Probably better to create a type for these kinds of actions rather than rely on name matching...

This comment has been minimized.

Copy link
@hokeun

hokeun Jan 2, 2022

Author Member

Addressed this in b162f45. Now it uses a new subclass called FederatePortAction. Do you think this is better?
Please let me know if you have any suggestions!

This comment has been minimized.

Copy link
@Soroosh129

Soroosh129 Jan 2, 2022

Contributor

I don't think I understand what is happening here. If the action is logical, a microstep is always added?

I think in any case it's better to create something akin to a schedule_at_tag(tag) function here to be used in the federated execution, since microstep is part of the intended tag field of a tagged message and it should be honored for correctness.

This comment has been minimized.

Copy link
@hokeun

hokeun Jan 3, 2022

Author Member

Yes, it looks like a microstep is always added when the action is logical, although I'm not sure why.
@lhstrh Marten, would you know why this is the case? Do you think it's ok if we remove this condition for adding a microstep for logical actions?
@Soroosh129 Soroush, is this intended tag also applicable to centralized coordination, or is it only applicable to decentralized coordination?

This comment has been minimized.

Copy link
@Soroosh129

Soroosh129 Jan 3, 2022

Contributor

It is applicable to centralized coordination. The RTI makes decisions based on the entire tag, not just the time value.

This comment has been minimized.

Copy link
@hokeun

hokeun Jan 3, 2022

Author Member

Ah, you're right. Btw, I believe that is already taken care of by 81edfb2 as now we use the entire tag from the tagged messages. So I guess this logic of adding an additional microstep is not needed anymore and I can delete this logic, right?

This comment has been minimized.

Copy link
@hokeun

hokeun Jan 4, 2022

Author Member

Sorry Soroush, I misunderstood your comments. I'll work on the code change so that we can schedule the network message action at the tag given by the RTI!

This comment has been minimized.

Copy link
@hokeun

hokeun Jan 7, 2022

Author Member

Fixed thisn in 53d9f30. Could you guys take another look?

tag = tag.getMicroStepLater();
}

Expand Down

0 comments on commit bd1dffe

Please sign in to comment.