How amuthavanmoorthi/iot-ris-bs-ao-with-imperfect-csi works
Purpose and execution entry points
This repository is a Python simulation/optimization codebase for communication, computation, caching, offloading, beamforming, and RIS resource allocation. It contains a baseline implementation at the repository root and an SCA-FP variant under SCA-FP/.
Primary run entry points are:
• Baseline experiment driver: main.py
• SCA/fractional-programming experiment driver: SCA-FP/main.py
• Result regeneration/plotting drivers: replot.py, SCA-FP/replot.py
• Specialized diagnostic and regime studies: SCA-FP/diagnose_ao.py, SCA-FP/find_regime.py, SCA-FP/worst_case_sweep.py
Shared system model and metrics
The physical/network model is separated from optimization stages:
• Channel generation and propagation inputs: channels.py, SCA-FP/channels.py
• Communication-rate evaluation: rate.py, SCA-FP/rate.py
• End-to-end latency evaluation: latency.py, SCA-FP/latency.py
• Central simulation parameters and scenario dimensions: config.py, SCA-FP/config.py
These modules form the numerical boundary between scenario definition/model evaluation and decision optimization. Optimizers consume channel/state data and produce allocations whose feasibility and objective values are evaluated through rate and latency calculations.
Alternating-optimization orchestration
The top-level solver coordinates coupled decision blocks using alternating optimization (AO):
• Baseline coordinator: ao_solver.py
• SCA-FP coordinator: SCA-FP/ao_solver.py
• Baseline executable workflow: main.py
• SCA-FP executable workflow: SCA-FP/main.py
Control flow is expected to initialize a scenario, iteratively optimize one block while holding others fixed, recompute rate/latency/objective metrics, test convergence, and serialize figure-oriented outputs. The SCA-FP branch adds successive-convex-approximation/fractional-programming treatment around this same block-decomposed structure.
Optimization subproblems
Five subproblem modules define the architecture’s principal decision boundaries:
• Beamforming: sp1_beamforming.py, SCA-FP/sp1_beamforming.py
• Caching: sp2_caching.py, SCA-FP/sp2_caching.py
• Task offloading: sp3_offloading.py, SCA-FP/sp3_offloading.py
• Joint communication/computation allocation: sp4_commcomp.py, SCA-FP/sp4_commcomp.py
• RIS configuration: sp5_ris.py, SCA-FP/sp5_ris.py
The AO solver is the owner of cross-subproblem state and iteration order; individual sp* modules should remain responsible for their local optimization formulation and returned decision variables.
Experiment, analysis, and result boundary
Experiments write precomputed CSV and JSON datasets rather than serving results through an application API. Baseline artifacts are in baseline_result/, including baseline_result/fig2_convergence.json and parameter sweeps such as baseline_result/fig3_vs_N.csv.
The SCA-FP workflow stores analogous studies in SCA-FP/scafp_result/, with alternate seed-count and fix variants in SCA-FP/scafp_result_20seeds/, SCA-FP/scafp_result_1000seeds/, and SCA-FP/scafp_result_1000seeds_hrbfix/. This establishes file-based output as the boundary between optimization runs and visualization.
Visualization and runtime/infrastructure
Plot production is isolated in plots.py and SCA-FP/plots.py; replot scripts consume persisted experiment outputs without necessarily rerunning optimization. The repository is a local Python numerical research workflow with no indicated web service, database, cloud infrastructure, or external API integration. Its material runtime dependencies are implied numerical/optimization and plotting libraries, but dependency manifests are not present in the supplied tree.
Main entry points: ao_solver.py AO coordinator · SCA-FP/ao_solver.py SCA-FP AO coordinator · main.py Experiment driver · SCA-FP/main.py Experiment driver
Components 20
Baseline workflow
- Experiment driver
main.py - System model · Configuration, channels, rate, and latency evaluation.
- AO coordinator · Owns coupled state, block order, convergence, and objective evaluation.
ao_solver.py - Beamforming
sp1_beamforming.py - Caching
sp2_caching.py - Task offloading
sp3_offloading.py - Comm/compute allocation
sp4_commcomp.py - RIS configuration
sp5_ris.py - Plot production
plots.py
SCA-FP workflow
Successive-convex-approximation and fractional-programming variant.
- Experiment driver
SCA-FP/main.py - System model · Configuration, channels, rate, and latency evaluation.
- SCA-FP AO coordinator · Coordinates block updates with SCA and fractional-programming treatment.
SCA-FP/ao_solver.py - Beamforming
SCA-FP/sp1_beamforming.py - Caching
SCA-FP/sp2_caching.py - Task offloading
SCA-FP/sp3_offloading.py - Comm/compute allocation
SCA-FP/sp4_commcomp.py - RIS configuration
SCA-FP/sp5_ris.py - Plot production
SCA-FP/plots.py
Persisted results
File-based boundary between experiments and visualization.
- Baseline datasets · Figure-oriented convergence and parameter-sweep data.
- SCA-FP datasets · Includes standard, seed-count, and fixed-variant studies.
Connections 18
- Experiment driver → AO coordinator: runs
- System model → AO coordinator: scenario and metrics
- AO coordinator → Beamforming: optimizes
- AO coordinator → Caching: optimizes
- AO coordinator → Task offloading: optimizes
- AO coordinator → Comm/compute allocation: optimizes
- AO coordinator → RIS configuration: optimizes
- AO coordinator → Baseline datasets: serializes
- Baseline datasets → Plot production: replot input
- Experiment driver → SCA-FP AO coordinator: runs
- System model → SCA-FP AO coordinator: scenario and metrics
- SCA-FP AO coordinator → Beamforming: optimizes
- SCA-FP AO coordinator → Caching: optimizes
- SCA-FP AO coordinator → Task offloading: optimizes
- SCA-FP AO coordinator → Comm/compute allocation: optimizes
- SCA-FP AO coordinator → RIS configuration: optimizes
- SCA-FP AO coordinator → SCA-FP datasets: serializes
- SCA-FP datasets → Plot production: replot input