NS-3 PDR Calculation Fix

Заказчик: AI | Опубликовано: 27.09.2025
Бюджет: 30 $

The simulation I have is already computing Energy, Delay and Node Lifetime perfectly, but the Packet Delivery Ratio is wrong. Instead of the expected 0 – 1 range it currently prints whole numbers such as 3 or 8. Your task is to step into the existing NS-3 code, locate the fragment that counts packets and adjust the logic so that PDR = (packets received) / (packets sent) is calculated as a floating-point value and reported between 0 and 1 every time the program runs. Everything else in the simulation must remain untouched. You will receive the full project folder after we start. The code is in the usual NS-3 style (C++ with helper scripts), so familiarity with ns-3 or any custom counter classes will help you move quickly. Deliverables • Updated source file(s) with clear inline comments on the fix • A brief note or diff showing exactly what changed • One sample run (command line and output) where Energy, Delay, Node Lifetime stay identical to the current results while PDR shows a normalized value Acceptance criteria: the project compiles with waf, runs without warnings, and produces a PDR strictly between 0 and 1 for all test runs. If you have any quick questions about how metrics are gathered just let me know—otherwise the goal is simply to make that single ratio accurate.