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 of LOSCommunication and MultiDegreeCommunication communication. 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, Resetable

The 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.

reset_overwrite_previous() None[source]

Overwrite attributes from previous episode.

Return type:

None

Link the environment satellite list to the communication method.

Parameters:

satellites (list[Satellite]) – List of satellites to communicate between.

Return type:

None

abstract communication_pairs() list[tuple[Satellite, Satellite]][source]

List pairs of satellite that should share data.

To define a new communication type, this method must be implemented.

Return type:

list[tuple[Satellite, Satellite]]

communicate() None[source]

Share data between paired satellites.

Return type:

None

class NoCommunication(*args, **kwargs)[source]

Bases: CommunicationMethod

Implements no communication between satellites.

This is the default communication method if no other method is specified. Satellites will maintain their own DataStore and not share data with others.

communication_pairs() list[tuple[Satellite, Satellite]][source]

Return no communication pairs.

Return type:

list[tuple[Satellite, Satellite]]

class FreeCommunication(*args, **kwargs)[source]

Bases: CommunicationMethod

Implements free communication between every satellite at every step..

communication_pairs() list[tuple[Satellite, Satellite]][source]

Return all possible communication pairs.

Return type:

list[tuple[Satellite, Satellite]]

class LOSCommunication(*args, **kwargs)[source]

Bases: CommunicationMethod

Implements 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.

Link the environment satellite list to the communication method.

Parameters:

satellites (list[Satellite]) – List of satellites to communicate between.

Return type:

None

reset_post_sim_init() None[source]

Add loggers to satellites to track line-of-sight communication.

Return type:

None

communication_pairs() list[tuple[Satellite, Satellite]][source]

Return pairs of satellites that have line-of-sight visibility.

Return type:

list[tuple[Satellite, Satellite]]

communicate() None[source]

Clear line-of-sight communication logs once communicated.

Return type:

None

class MultiDegreeCommunication(*args, **kwargs)[source]

Bases: CommunicationMethod

Compose 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.

communication_pairs() list[tuple[Satellite, Satellite]][source]

Return pairs of satellites that are connected by a path of communication through other satellites.

Return type:

list[tuple[Satellite, Satellite]]

class LOSMultiCommunication(*args, **kwargs)[source]

Bases: MultiDegreeCommunication, LOSCommunication

Compose 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.