Communication
bsk_rl.comm provides methods of communication for multisatellite environments.
Communication methods are used to induce collaborative behavior between satellites.
While the GlobalReward acts as a global critic for the environment,
individual satellites may not have complete environmental knowledge; for example, in a
target imaging scenario, individual satellites do not know what requests have already
been fulfilled by other satellites. With communication, satellites can share data to
improve decision-making.
Communication works by sharing data between satellites, updating each other’s local
knowledge of the scenario. After each environment step,
CommunicationMethod.communication_pairs is evaluated to determine which pairs
of satellites should share data. Then, each local DataStore is
updated with the other satellite’s data.
Configuration
Communication methods can be configured by passing an instance of CommunicationMethod
to the communicator field of the environment constructor.
env = ConstellationTasking(
...,
communicator=LOSMultiCommunication(),
...
)
Types of Communication
NoCommunication: No communication between satellites.FreeCommunication: Free communication between all satellites. This method is cheap to evaluate, and in scenarios with many satellites or tightly clustered satellites, it is often functionally equivalent to more complex models.LOSCommunication: Line-of-sight communication between satellites. This method evaluates whether a direct line of sight exists between two satellites. If so, they can communicate.MultiDegreeCommunication: This allows for “paths” of communication between satellites linked by some other method.LOSMultiCommunication: A combination ofLOSCommunicationandMultiDegreeCommunicationcommunication. This method allows for instantaneous communication by satellites that are obscured from each other but have a path of connected satellites acting as relays between them.
- class CommunicationMethod(min_period: float = 0.0)[source]
Bases:
ABC,ResetableThe base communication class.
Subclasses implement a way of determining which pairs of satellites share data at each environment step.
- Parameters:
min_period (float) – Minimum time between evaluation of the communication method.
- abstractmethod communication_pairs() list[tuple[Satellite, Satellite]][source]
List pairs of satellite that should share data, in the form (sender, recipient).
To define a new communication type, this method must be implemented.
- class NoCommunication(*args, **kwargs)[source]
Bases:
CommunicationMethodImplements no communication between satellites.
This is the default communication method if no other method is specified. Satellites will maintain their own
DataStoreand not share data with others.
- class FreeCommunication(*args, **kwargs)[source]
Bases:
CommunicationMethodImplements free communication between every satellite at every step..
- class LOSCommunication(*args, **kwargs)[source]
Bases:
CommunicationMethodImplements communication between satellites with a direct line-of-sight.
At the end of each step, satellites will communicate with each other if they have a line-of-sight between them that is not occluded by the Earth.
Satellites must have a dynamics model that is a subclass of
LOSCommDynModel. to use this communication method.- communicate() None[source]
Clear line-of-sight communication logs once communicated.
- Return type:
None
- communication_pairs() list[tuple[Satellite, Satellite]][source]
Return pairs of satellites that have line-of-sight visibility.
- class MultiDegreeCommunication(*args, **kwargs)[source]
Bases:
CommunicationMethodCompose with another communication type to propagate multi-degree communication.
If a communication method allows satellites A and B to communicate and satellites B and C to communicate, MultiDegreeCommunication will allow satellites A and C to communicate on the same step as well.
- class LOSMultiCommunication(*args, **kwargs)[source]
Bases:
MultiDegreeCommunication,LOSCommunicationCompose with another communication type to propagate multi-degree communication.
If a communication method allows satellites A and B to communicate and satellites B and C to communicate, MultiDegreeCommunication will allow satellites A and C to communicate on the same step as well.
- class BroadcastCommunication(min_period: float = 0.0)[source]
Bases:
CommunicationMethodThe base communication class.
Subclasses implement a way of determining which pairs of satellites share data at each environment step.
- Parameters:
min_period (float) – Minimum time between evaluation of the communication method.