This repository contains an implementation of distributed matching algorithms for IoT-based resource allocation. The project simulates a complex environment of users, access points, and cloudlets to study the efficiency of different resource allocation strategies in terms of delay tolerance, energy efficiency, and computational load.
The key components of the system include:
- Network Simulation: Models users, access points (APs), and cloudlets.
- Bipartite Graph Reduction: Reduces the network to a bipartite graph for matching.
- Distributed Matching Algorithms: Implements both greedy and maximum weight matching algorithms.
- Performance Metrics: Utility calculation, delay analysis, and statistical evaluations.
- Simulation of IoT environments with customizable parameters.
- Distributed maximum weight matching for resource allocation.
- Greedy matching algorithm for baseline comparisons.
- Statistical analysis of performance metrics including delay, utility, and resource efficiency.
- Visualization tools for network topology, task distributions, and matching results.
- Python 3.8+
- Required libraries:
pip install numpy pandas matplotlib seaborn networkx scipy
python simulation/simulation.py
This will run simulations based on the parameters specified in NetworkSimulatorRunner
and save the results in simulation_results.csv
.
w
: Area widthn
: Number of usersm
: Number of access pointsp
: Percentage of APs with cloudletsu_sample
: Percentage of users sampled for matchingdist_type
: Task distribution type (uniform, normal, log-normal, exponential, beta, mixture)
Modify the generate_combinations
method in NetworkSimulatorRunner
to adjust the range of parameters for simulations.
The core algorithm focuses on distributed maximum weight matching using:
- Fractional Matching Stage: Computes initial fractional matches.
- Reduction to Multigraph: Converts fractional matches to multigraph for gradual rounding.
- Gradual Rounding: Converts fractional solutions to integral matchings.
A baseline greedy algorithm is implemented to compare against the maximum weight matching algorithm.
- Utility: Measures the efficiency of resource allocation.
- Delay Analysis: Identifies tasks exceeding delay tolerance.
- Resource Utilization: Compares allocation efficiency across algorithms.
- Network Topology: Displays user and AP deployment.
- Bipartite Graph: Shows matching between users and cloudlet-enabled APs.
- Performance Metrics: Graphs for task distributions, uplink/downlink statistics, and utility analysis.
Simulation results are saved in simulation_results.csv
, containing:
- Utility values
- Percentage of tasks above delay tolerance
- Maximum delay miss
- Statistical analysis of missed tasks
- Fork the repository
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request
Distributed under the MIT License. See LICENSE
for more information.
For issues, please raise an issue in the repository or contact the maintainer.