Skip to content

bioinformatics-ua/SmartMobilitySimulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Smart Mobility Simulation

Smart Mobility Simulation is an end-to-end indoor mobility pipeline with two stages:

  1. A C++ discretizer that converts multi-floor GeoJSON inputs into a navigable graph.
  2. A CuPy-based GPU simulation that generates agent trajectories and RSSI observations.

Repository Layout

discretization/
  CMakeLists.txt
  main.cpp
simulation/
  cuda_simulation.py
  precompute_nearest_outdoor.py

Components

Component Stack Purpose
discretization C++20, CMake, OpenMP Build pruned indoor graph and POI set from floor geometry
simulation/precompute_nearest_outdoor.py Python, NumPy, Pandas, joblib Precompute nearest outdoor node index for each node
simulation/cuda_simulation.py Python, CuPy, SciPy Run GPU agent simulation and emit positions/RSSI shards

Prerequisites

C++ Stage

  • CMake >= 3.28
  • C++20 compiler
  • OpenMP
  • Zlib
  • Osmium (find_package(Osmium REQUIRED))

The repo already vendors:

  • discretization/vendor/raylib
  • discretization/vendor/nlohmann

Python Stage

  • Python 3.10+
  • CUDA-capable GPU and matching CuPy build
  • Python packages: numpy, pandas, scipy, tqdm, joblib

Data Layout

All runtime files should live in simulation/data/.

Required inputs:

  • simulation/data/combined_layers.geojson
  • simulation/data/ext_doors.geojson
  • simulation/data/selected_aps.txt

Generated graph artifacts:

  • simulation/data/indoor_map_pruned_nodes.csv
  • simulation/data/indoor_map_pruned_edges.csv
  • simulation/data/indoor_map_pruned.poi

Simulation dependency:

  • simulation/data/nearest_outdoor_nodes.csv

Quick Start

1. Build the discretizer

From repository root:

cmake -S discretization -B discretization/build
cmake --build discretization/build -j

2. Generate graph files

Run from simulation/ so the discretizer resolves data/... correctly:

cd simulation
mkdir -p data
../discretization/build/discretization

This writes:

  • data/indoor_map_pruned_nodes.csv
  • data/indoor_map_pruned_edges.csv
  • data/indoor_map_pruned.poi

3. Precompute nearest outdoor mapping

python precompute_nearest_outdoor.py

Then place the output where the simulator expects it:

mv nearest_outdoor_nodes.csv data/nearest_outdoor_nodes.csv

4. Run GPU simulation

python cuda_simulation.py

Primary outputs:

  • agent_positions.csv
  • data/rssi_shards/shard_*.csv

Configuration Notes

  • discretization/main.cpp reads from data/combined_layers.geojson and data/ext_doors.geojson.
  • simulation/cuda_simulation.py uses simulation/data/... relative paths by default.
  • simulation/precompute_nearest_outdoor.py currently defines NODES_FILE as an absolute path. Update that constant if needed before running.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published