You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the header, replace int __LABS_t with an array unsigned int clock[MAXCOMPONENTS]. Change the now() function so that it takes the agent's id as an argument.
Inside init(), increase clock[0] when initializing stigmergic variables. At the end, set all elements of clock to the value of clock[0].
Change confirm and propagate with a tie-breaking rule.
Feasible tie-breaking rules
Agent with lowest id "wins"
✅ original solution from Lamport,
✅ also the one used in Buzz
❌ requires to keep track of the id with another array Lid[MAXCOMPONENTS][MAXKEYL]
Smaller or equal Lvalue wins
✅ No changes to the data structures
❌ Requires some theoretical justification (eg. will the stigmergy be stable?)
The text was updated successfully, but these errors were encountered:
int __LABS_t
with an arrayunsigned int clock[MAXCOMPONENTS]
. Change thenow()
function so that it takes the agent's id as an argument.init()
, increaseclock[0]
when initializing stigmergic variables. At the end, set all elements ofclock
to the value ofclock[0]
.confirm
andpropagate
with a tie-breaking rule.Feasible tie-breaking rules
Agent with lowest id "wins"
✅ original solution from Lamport,
✅ also the one used in Buzz
❌ requires to keep track of the id with another array
Lid[MAXCOMPONENTS][MAXKEYL]
Smaller or equal
Lvalue
wins✅ No changes to the data structures
❌ Requires some theoretical justification (eg. will the stigmergy be stable?)
The text was updated successfully, but these errors were encountered: