pydistsim.network.rangenetwork.SquareDiscRangeType
- class SquareDiscRangeType(environment: Environment)[source]
Bases:
RangeTypeSquare Disc channel type.
This class represents the Square Disc channel type. It determines if two nodes are within communication range based on their positions, communication range, and a probability of connection.
- Parameters:
environment (Environment) – The environment in which the channel operates.
Methods
__init__Check if two nodes are within communication range.
- in_comm_range(network: RangeNetworkType, node1: Node, node2: Node)[source]
Check if two nodes are within communication range.
Two nodes are in communication range if they can see each other, are positioned so that their distance is smaller than the communication range, and satisfy a probability of connection.