This repository contains an asynchronous Python simulation framework that models multi-agent negotiation for resource allocation in 5G/6G network slicing.
It simulates a negotiation process between two autonomous agents representing:
- 📶 eMBB (Enhanced Mobile Broadband)
- ⚡ URLLC (Ultra-Reliable Low-Latency Communication)
These agents leverage a local Large Language Model (LLM) to:
- Reason about network conditions
- Propose bandwidth allocations
- Generate counter-proposals
All decisions are guided by a Digital Twin predictor, with the goal of:
✅ Minimizing energy consumption
✅ Strictly adhering to Service Level Agreements (SLAs)
- Uses a local LLM for reasoning and negotiation
- Dynamic proposal generation with concession pressure modeling
- Tailored for small, fast local models
- Handles quirks of low-parameter LLMs
- M/M/1 queueing model
- CVaR (Conditional Value at Risk) for tail latency prediction
- Estimates:
- Latency
- Energy consumption
- Built with
asyncio - Enables parallel LLM calls
- Reduces simulation runtime significantly
- Regex-based parsing for malformed outputs
- Handles:
- JSON failures
- Schema hallucinations
- String-to-number conversion issues
- Prevents:
- Deadlocks
- Overshooting
- Uses PID-like adjustments based on SLA violations
- Tracks:
- Latency
- SLA violations
- Utility degradation
- Energy savings
- Generates CDF plots using
matplotlib
Ensure you have Python 3.8+ installed.
Install dependencies:
pip install numpy matplotlib openai