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 (1 or -1). Default is 1, 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

get_interval()[source]

Obtain the interval distance between the consecutive two nodes.

Returns

interval – The interval length in meters.

Return type

float

summary()[source]

Obtain a summary of the network.

Returns

summary – A summary DataFrame containing the columns:

  • Network Length (m)

  • Number of Nodes

  • Interval Length (m)

Return type

pandas DataFrame