Wireless Scenario

class Scenario(seed=None)

Bases: hermespy.core.random_node.RandomNode, Generic[hermespy.core.device.DeviceType]

A simulation scenario.

Scenarios consist of several devices transmitting and receiving electromagnetic signals. Each device can be operated by multiple operators simultaneously.

Parameters

seed (int, optional) – Random seed used to initialize the pseudo-random number generator.

add_device(device)

Add new device to scenario.

Parameters

device (DeviceType) – New device to be added to the scenario.

Raises ValueError if the device already exists.

Return type

None

device_registered(device)

Check if an device is registered in this scenario.

Parameters

device (DeviceType) – The device to be checked.

Returns

The device’s registration status.

Return type

bool

property devices: List[hermespy.core.device.DeviceType]

Devices registered in this scenario.

Returns

List of devices.

Return type

List[DeviceType]

property num_devices: int

Number of devices in this scenario.

Returns

Number of devices

Return type

int

property transmitters: List[hermespy.core.device.Transmitter]

All transmitting operators within this scenario.

Returns

List of all transmitting operators.

Return type

List[Transmitter]

property receivers: List[hermespy.core.device.Receiver]

All receiving operators within this scenario.

Returns

List of all transmitting operators.

Return type

List[Receiver]

property num_receivers: int

Number of receiving operators within this scenario.

Returns

The number of receivers.

Return type

int

property num_transmitters: int

Number of transmitting operators within this scenario.

Returns

The number of transmitters.

Return type

int

property operators: List[hermespy.core.device.Operator]

All operators within this scenario.

Returns

List of all operators.

Return type

List[Operator]

property num_operators: int

Number of operators within this scenario.

Returns

The number of operators.

Return type

int

property drop_duration: float

The scenario’s default drop duration in seconds.

If the drop duration is set to zero, the property will return the maximum frame duration over all registered transmitting modems as drop duration!

Returns

The default drop duration in seconds.

Return type

float

Raises

ValueError – For durations smaller than zero.