Skip to content

A modular simulation framework for resource allocation in 5G-enabled smart city environments using Multi-Agent Reinforcement Learning (MARL). Includes substrate and virtual network modeling, request generation, and scalable agent-based allocation strategies.

License

Notifications You must be signed in to change notification settings

fekri600/eSlice

Repository files navigation

eSlice

ReSA-MARL: Resource Scalable Allocation via Multi-Agent Reinforcement Learning

This repository provides a modular simulation framework for dynamic resource allocation in 5G-enabled smart city infrastructures. It leverages Multi-Agent Reinforcement Learning (MARL) to allocate computing and network resources efficiently across heterogeneous service types like eMBB, URLLC, and mMTC.


Overview

The simulation framework includes:

  • A substrate network representing physical infrastructure.
  • Virtual network hierarchical slices for samrt city applications.
  • Smart city service request generation.
  • Multi-agent Deep Q-Learning (DQN) based resource allocation.

It is designed for research and experimentation in intelligent network management, network slicing, and edge computing.


diagram

Project Structure

File Description
main.py Entry point that initializes and runs the simulation.
ReSA-MARL.py Core MARL environment and training loop.
SubstrateNetworkManager.py Physical infrastructure and substrate topology.
VirtualNetworkManager.py Virtual slices, CNFs/SCFs, and hierarchical smart city services.
RequestManager.py Smart city service request modeling and traffic profiles.
ResourcesManagement.py Assumptions for CPU, RAM, storage, PRBs, and bandwidth needs.
AllocationManager.py (or Placement Manager) Resource mapping logic from virtual to substrate nodes.

Setup

Ensure you have Python 3.8+ installed.

pip install -r requirements.txt

Usage

Run the full simulation using:

python main.py

This will:

  • Generate a substrate network and virtual slices.
  • Simulate smart city request traffic.
  • Train DQN agents to perform multi-agent resource allocation.

Customize

This framework is modular and fully customizable:

  • Modify hierarchical slices and virtual node setup in
    VirtualNetworkManager.py

  • Adjust the substrate network's topology and resource capacities in
    SubstrateNetworkManager.py

  • Simulate different service request types and traffic demands in
    RequestManager.py

  • Tune QoS-based resource requirement formulas (CPU, RAM, Storage, PRBs, Bandwidth) in
    ResourcesManagement.py

This design allows you to simulate a wide range of 5G and smart city deployment scenarios.


Outputs

  • Trained models: model_weights/
  • Logs and events: logs/
  • Simulation results and resource mappings: json_files/

Future Work

  • Real-time visualization of virtual-to-substrate mappings.
  • Graph theory based arguments for configurable topologies and resource allocation patterns.
  • Pre-trained models for benchmarking.

License

This project is licensed under the MIT License.


Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss your ideas.


Citation

F. Saleh, A. O. Fapojuwo, and D. Krishnamurthy, “eSlice: Elastic Inter-Slice Resource Allocation for Smart City Applications,” IEEE Transactions on Network and Service Management, Early Access, pp. 1–1, 2025, doi: 10.1109/TNSM.2025.3604352.

About

A modular simulation framework for resource allocation in 5G-enabled smart city environments using Multi-Agent Reinforcement Learning (MARL). Includes substrate and virtual network modeling, request generation, and scalable agent-based allocation strategies.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages