Waveflow: wireless propagation, waveform, and RIS-assisted network simulator
Project description
Waveflow v2.0
Wireless propagation, waveform, and RIS-assisted network simulator with modular architecture, beam sweeping algorithms, spatial channel modeling, and ML-guided optimization.
What is Waveflow?
Waveflow simulates adaptive wireless networks, including passive RIS panels that reflect signals from an Access Point (AP) to User Equipment (UE). It models link budget, path loss, RIS array gain, phase quantization, fading, FOV constraints, waveform-level channels, and ML-guided control.
Waveflow is the forward-looking package name for the project formerly known as RISNet. The risnet import path and CLI command remain available as compatibility aliases.
Quick Start
git clone https://github.com/nqmn/waveflow
cd risnet
pip install -e .
waveflow
Full installation options and troubleshooting: INSTALL.md
Step-by-step tutorials from basic to advanced: TUTORIAL.md
Features
| Category | Capability |
|---|---|
| Physics | FSPL, atmospheric loss, Rician fading, RIS array gain, phase quantization |
| Beam sweeping | Linear, adaptive, DE, ML-guided, hierarchical, PRIME |
| Pathfinding | Dijkstra, A*, Greedy, Exhaustive |
| Channel | OFDM waveform, multipath, per-subcarrier SNR |
| ML | Random Forest, XGBoost, SVR, KNN, LGBM beam predictors |
| Interface | Interactive CLI, REST API (Flask), Python API |
| Feedback | UE→AP SNR feedback loop with adaptive beam tracking |
Project Structure
risnet/
├── core/ # Physics, nodes, network, waveform
├── controller/ # Beam sweeping, pathfinding, ML, RL controller
├── app/ # Flask REST API and web UI
├── cli/ # Interactive shell
├── config/ # Configuration management
├── utils/ # Link budget, SNR, RSSI helpers
├── waveflow/ # New public package wrappers
├── risnet/ # Backward-compatible package root and high-level API
├── matlab_integration/ # MATLAB bridge and .m scripts
├── examples/
│ ├── script/ # Runnable Python examples
│ └── json/ # Topology fixture files
├── tests/ # Test suite
├── docs/ # Architecture notes and assets
├── INSTALL.md # Installation guide
├── TUTORIAL.md # Tutorials: basic to advanced
└── FUTURE.md # v3 architecture roadmap
Interfaces
Interactive CLI
waveflow
waveflow> add ap ap1 0 0
waveflow> add ris ris1 5 0 0 16 2
waveflow> add ue ue1 10 3
waveflow> connect ap1 ris1 ue1
waveflow> sweep ap1 ris1 ue1 60 10 --algo de
waveflow> help
Python API (low-level)
from core import RISNetwork
net = RISNetwork()
net.add_ap('ap1', 0, 0)
net.add_ris('ris1', 5, 0, N=16, bits=2, max_angle_deg=90)
net.add_ue('ue1', 10, 3)
result = net.connect('ap1', 'ris1', 'ue1', use_get_snr=False)
print(f"SNR: {result['snr_dB']:.1f} dB")
Python API (high-level)
from waveflow import RISnet
net = RISnet()
ap = net.addAP('ap1', position=(0, 0))
ris = net.addRIS('ris1', position=(5, 0), N=16, bits=2)
ue = net.addUE('ue1', position=(10, 3))
net.start()
result = net.ping(ap, ue)
print(f"SNR: {result['snr_dB']:.1f} dB, hops: {result['hops']}")
Web interface
waveflow --web
# Open http://127.0.0.1:5000
Beam Sweep Algorithms
# From CLI
waveflow> sweep ap1 ris1 ue1 60 10 --algo linear
waveflow> sweep ap1 ris1 ue1 60 10 --algo adaptive
waveflow> sweep ap1 ris1 ue1 60 10 --algo de
waveflow> sweep ap1 ris1 ue1 60 10 --algo ml-guided --ml-predictor rf
| Algorithm | Key | Notes |
|---|---|---|
| Linear brute-force | linear |
Uniform steps, coarse→fine |
| Adaptive center-out | adaptive |
~30% faster than linear |
| Differential Evolution | de |
Population-based global search |
| ML-guided | ml-guided |
RF/XGBoost/SVR/KNN/LGBM predictor + refinement |
| Hierarchical | hierarchical |
Multi-resolution |
| PRIME localization | prime |
Localization-assisted |
Testing
# Compile check
python3 -m compileall core controller cli risnet waveflow app config utils
# Physics regression
PYTHONPATH=. python3 tests/test_physics_fixes.py
# Full suite (requires dev install)
pip install -e ".[dev]"
pytest tests/ -v
Roadmap
See FUTURE.md for the full v3 architecture migration plan (phased arrays, spatial channels, runtime kernel, AI-native interfaces).
License
Apache 2.0 — see LICENSE
Project details
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 waveflow_sim-2.0.0.tar.gz.
File metadata
- Download URL: waveflow_sim-2.0.0.tar.gz
- Upload date:
- Size: 346.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e4f7e81088963eb76bd2134a5864e77b76f4ae1175ebc340059da5a1ae1f238
|
|
| MD5 |
9d0a1f36a244f9ef25fbea772394dc0f
|
|
| BLAKE2b-256 |
a1e86532eed579ee7a909121a750dad10461f483ca1d013558d121f448696682
|
File details
Details for the file waveflow_sim-2.0.0-py3-none-any.whl.
File metadata
- Download URL: waveflow_sim-2.0.0-py3-none-any.whl
- Upload date:
- Size: 420.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffe05bb880ff0e48f5e3081c9dc21b627a5cbbcdbd5cd44545735461206f5eb9
|
|
| MD5 |
0d21b0155379b4b893540c5a52e372ae
|
|
| BLAKE2b-256 |
6945a0e8aeab439431b901cb260bf36cabda94842e1d2b3b24c8721a704f5af1
|