IEEE 802.11 DCF Simulator
Project description
IEEE 802.11 Multi-AP Distributed Coordination Function (DCF) Simulator
mapc-dcf is an implementation of the IEEE 802.11 Distributed Coordination Function (DCF) with support for Multi-Access Point operation. It is a SimPy-based Discrete Event Simulator (DES) that models the channel and frame exchange.
Features and Assumptions
- Supports Multi-AP operation.
- Supports the Spatial Reuse (SR) mechanism introduced in the IEEE 802.11ax standard.
- Supports the AMPDU aggregation mechanism.
- Models collision probability by calculating the interference matrix for each device.
- Monitors and logs the history of frame exchanges.
- Outputs a summary of the simulation.
- Supports scenarios with walls.
- Assumes instantaneous and error-free acknowledgments.
- Assumes an ideal MCS selection mechanism.
Installation
The package can be installed using pip:
pip install mapc-dcf
Usage
It is best to be used with scenarios defined as in our other repository. In the following example, we show how to use the simulator with a small_office_scenario defined in the mapc_research package.
from typing import Dict
import simpy
import jax
import numpy as np
from mapc_research.envs.scenario_impl import *
from mapc_dcf import AccessPoint, Channel, Logger
# Define the simulation parameters
SIMULATION_LENGTH = 0.1 # seconds
WARMUP_LENGTH = 0.1 # seconds
RESULTS_PATH = "./results" # Path to save the results (without extension!)
SEED = 42
# Set the random seed
key = jax.random.PRNGKey(SEED)
# Create the SimPy environment
des_env = simpy.Environment()
# Create the logger
logger = Logger(SIMULATION_LENGTH, WARMUP_LENGTH, RESULTS_PATH)
# Define the scenario
scenario = small_office_scenario(d_ap=20, d_sta=2, n_steps=1000)
# Create the channel
key, key_channel = jax.random.split(key)
channel = Channel(
key=key_channel,
sr=True, # Spatial reuse enabled
pos=scenario.pos,
walls=scenario.walls # Scenario with walls
)
# Define the access points
aps: Dict[int, AccessPoint] = {}
for ap_id in scenario.associations:
key, key_ap = jax.random.split(key)
clients = np.array(scenario.associations[ap_id])
tx_power = scenario.tx_power[ap_id].item()
aps[ap_id] = AccessPoint(
key=key_ap,
id=ap_id,
position=scenario.pos,
tx_power=tx_power,
clients=clients,
channel=channel,
des_env=des_env,
logger=logger
)
# Start the simulation
for ap_id in aps:
aps[ap_id].start_operation(run_number=1) # Run number can be convenient in case of multiple runs
des_env.run(until=WARMUP_LENGTH + SIMULATION_LENGTH)
# Dump the results to the results file
logger.dump_accumulators(run_number=1)
logger.shutdown(config={"scenario": "Optional JSON description of the scenario"})
# Clean up the environment
del des_env
Repository Structure
The repository is structured as follows:
mapc_dcf/: The main package of the tool.channel.py: Implementation of theChannelclass with the moset important methods:is_idle(),send_frame()andis_tx_successful().constants.py: Physical and MAC layer constants used in the simulator.dcf.py: Logic of the DCF schema which uses the simpy interface to manage time intervals.logger.py: Logging module that monitors the frame exchange, dumps results to the output CSV files and summarizes loggs in a compact JSON format.nodes.py: Access Point abstraction and traffic generation.utils.py: Utility functions, including the function for calculation of the path loss from node positions using the TGax channel model.
How to reference MAPC-DCF?
@article{wojnar2025coordinated,
author={Wojnar, Maksymilian and Ciężobka, Wojciech and Tomaszewski, Artur and Chołda, Piotr and Rusek, Krzysztof and Kosek-Szott, Katarzyna and Haxhibeqiri, Jetmir and Hoebeke, Jeroen and Bellalta, Boris and Zubow, Anatolij and Dressler, Falko and Szott, Szymon},
title={{Coordinated Spatial Reuse Scheduling With Machine Learning in IEEE 802.11 MAPC Networks}},
year={2025},
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mapc_dcf-0.2.5.tar.gz.
File metadata
- Download URL: mapc_dcf-0.2.5.tar.gz
- Upload date:
- Size: 21.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1b26ff4c1bc35311f7bfbb87a6dae047e37619aa4409520e3e2ab6254e34522
|
|
| MD5 |
b74b82d09c2c9a9185d20dfbff6a802e
|
|
| BLAKE2b-256 |
b706e6c9017c2ec95270fb5869c5b40197ecb9e5d895046725ebba5173ad94c9
|
File details
Details for the file mapc_dcf-0.2.5-py3-none-any.whl.
File metadata
- Download URL: mapc_dcf-0.2.5-py3-none-any.whl
- Upload date:
- Size: 20.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3bebe7a8d0584e607a07b0d99ececc10e895f54752bae501315c0e8a5c940c7c
|
|
| MD5 |
edef143481b9bcc09c24ef735929c9f1
|
|
| BLAKE2b-256 |
ca2b4cf32ce7420df4ff77215775641f69924907cd562d030a8990b4db9c2968
|