Network¶
-
class
NetworkSim.architecture.base.network.Network(length=120, num_nodes=100, direction=1)[source]¶ Constructor of the network architecture
- Parameters
length (float, optional) – The length of the ring in meters. Default is
120.num_nodes (int, optional) – The number of nodes in the network. Default is
100.direction (int, optional) – Direction of travel of the signals (
1or-1). Default is1, indicating a positive direction.
- Variables
interval_length (float) – The interval length between two neighbouring nodes.
-
get_distance(start, end)[source]¶ Obtain the interval between each node in meters.
- Parameters
start (int) – The start node ID.
end (int) – The end node ID.
- Returns
distance – The calculated distance between the two nodes in meters.
- Return type
float