Consider a simple scenario with agents Sender and Receiver. If both are in
mode Ready then Sender passes a value to Receiver who stores it at
location
. The transaction is atomic (that is, indivisible), but
the Sender does not have access to
and the Receiver does not have
access to
, and thus neither agent is able to perform the transaction.
A special auxiliary agent is needed to do the job, and it may be convenient
to view the auxiliary agent as a team with members Sender and Receiver.
Using functions Member1 and Member2 to specify the members of the
team, we may write the following rule for the team, where Us is an alias
for Self:
if Mode(Member1(Us))=Mode(Member2(Us))=Ready then:=
endif
In a similar way, one may have larger teams. Depending on need, teams may or may not be ordered.