{"id":47776787,"url":"https://github.com/dragongr/lora-sim","last_synced_at":"2026-04-03T12:00:00.186Z","repository":{"id":345795737,"uuid":"1016282332","full_name":"dragonGR/lora-sim","owner":"dragonGR","description":"A reproducible LoRa network simulator for experimenting with radio behavior, gateway selection, collisions, retries, duty-cycle constraints, and confirmed uplinks.","archived":false,"fork":false,"pushed_at":"2026-03-20T17:58:00.000Z","size":36,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-21T09:10:39.442Z","etag":null,"topics":["adr","duty-cycle","gateway","lora","lorawan","network-simulator","packet-simulation","radio-network"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dragonGR.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-08T19:08:13.000Z","updated_at":"2026-03-20T17:58:04.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dragonGR/lora-sim","commit_stats":null,"previous_names":["dragongr/lora-sim"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/dragonGR/lora-sim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragonGR%2Flora-sim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragonGR%2Flora-sim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragonGR%2Flora-sim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragonGR%2Flora-sim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dragonGR","download_url":"https://codeload.github.com/dragonGR/lora-sim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragonGR%2Flora-sim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31349560,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T08:03:20.796Z","status":"ssl_error","status_checked_at":"2026-04-03T08:00:37.834Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adr","duty-cycle","gateway","lora","lorawan","network-simulator","packet-simulation","radio-network"],"created_at":"2026-04-03T11:59:59.494Z","updated_at":"2026-04-03T12:00:00.181Z","avatar_url":"https://github.com/dragonGR.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LoRa Simulation Toolkit\n\n`lora-sim` is a deterministic LoRa network simulation toolkit for repeatable scenario runs, collision analysis, ADR behavior, and structured reporting. The original repository was a single demo script; it is now organized as a real package with a simulation engine, scenario files, results export, and automated tests.\n\n## What it does\n\n- Runs event-driven LoRa simulations with fixed seeds\n- Models nodes, radios, channels, retries, airtime, and ADR behavior\n- Supports multi-node scenarios and collision pressure\n- Tracks per-node radio energy for transmit, receive, and idle phases\n- Supports Monte Carlo runs for repeatable benchmark aggregates\n- Supports multi-gateway reception and gateway-level accounting\n- Models confirmed uplinks with RX1 ACK timing\n- Adds RX2 fallback handling for confirmed traffic\n- Applies duty-cycle and channel-guard scheduling constraints\n- Produces structured JSON or CSV outputs for analysis pipelines\n- Generates lightweight HTML reports for sharing run results\n\n## Project layout\n\n```text\nsrc/lora_sim/\n  app/          CLI, runner, report rendering\n  domain/       packets, nodes, radios, metrics, channel model\n  io/           result writers\n  models/       propagation, ADR, corruption, interference, retry policy\n  simulation/   scenario loading, event queue, engine\nscenarios/      example scenario definitions\ntests/          regression and unit tests\n```\n\n## Quick start\n\n```bash\npython3 -m pip install -e .\nlora-sim run scenarios/simple_link.json\n```\n\nCompatibility entrypoint:\n\n```bash\npython3 simulator.py run scenarios/simple_link.json\n```\n\n## Example commands\n\nRun a scenario and print a text report:\n\n```bash\nlora-sim run scenarios/simple_link.json\n```\n\nOverride the seed and save structured results:\n\n```bash\nlora-sim run scenarios/multi_node_collision.json --seed 99 --out results.json\n```\n\nWrite a CSV packet log:\n\n```bash\nlora-sim run scenarios/multi_node_collision.json --out results.csv\n```\n\nGenerate an HTML report during a run:\n\n```bash\nlora-sim run scenarios/simple_link.json --report report.html\n```\n\nGenerate a report from saved results:\n\n```bash\nlora-sim report results.json --out report.html\n```\n\nRun a parameter sweep:\n\n```bash\nlora-sim sweep scenarios/simple_link.json --param nodes.gateway.x_m --range 500:3000:500\n```\n\nCompare two scenarios with the same seed:\n\n```bash\nlora-sim compare scenarios/simple_link.json scenarios/multi_node_collision.json --seed 42\n```\n\nRun a Monte Carlo batch:\n\n```bash\nlora-sim monte-carlo scenarios/multi_node_collision.json --iterations 20 --seed 100\n```\n\nRun a multi-gateway confirmed-uplink scenario:\n\n```bash\nlora-sim run scenarios/multi_gateway_ack.json\n```\n\nRun a duty-cycle constrained scenario with RX2 fallback:\n\n```bash\nlora-sim run scenarios/duty_cycle_rx2.json\n```\n\n## Scenario format\n\nScenario files are JSON documents that define:\n\n- simulation metadata such as `name`, `duration_seconds`, and `seed`\n- channel behavior such as `noise_floor_dbm`, `path_loss_exponent`, interference settings, and gateway demodulation capacity\n- ACK behavior through `ack_model`, including RX1 delay and downlink interference probability\n- channel-level MAC constraints through `duty_cycle_fraction` and `channel_guard_seconds`\n- retry policy with `max_attempts` and `backoff_seconds`\n- nodes with coordinates, role, radio settings, power profile, and optional traffic profiles\n  `traffic.confirmed_messages` controls whether a node waits for gateway ACKs before the uplink attempt is considered successful\n\nSee [simple_link.json](scenarios/simple_link.json) and [multi_node_collision.json](scenarios/multi_node_collision.json) for working examples.\nUse [gateway_capacity.json](scenarios/gateway_capacity.json) to stress-test the gateway demodulation path limit with overlapping uplinks.\nUse [multi_gateway_ack.json](scenarios/multi_gateway_ack.json) to exercise gateway diversity with confirmed uplinks and ACK timing.\nUse [duty_cycle_rx2.json](scenarios/duty_cycle_rx2.json) to validate duty-cycle scheduling and RX2 ACK recovery.\n\n## Development\n\nRun the test suite:\n\n```bash\npython3 -m pytest\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdragongr%2Flora-sim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdragongr%2Flora-sim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdragongr%2Flora-sim/lists"}