Details
Technical description of the FMD simulation web tool, development stack, exports, and deployment.
FMD simulation web tool
The Foot-and-Mouth Disease (FMD) simulation is implemented as an interactive, browser-based decision-support dashboard. Users enter population, vaccination, infection and program/control parameters; the application computes disease trajectories and key indicators (e.g., R₀ and HIT) and visualizes outputs as epidemic curves.
Development environment & tools
- Visual Studio Code — IDE for PHP/HTML/CSS/JS.
- XAMPP (Apache + PHP) — local server for testing .php pages.
- Browser dev tools — JS debugging, DOM inspection, performance profiling.
Languages & frameworks
- PHP — serving pages/headers/footers.
- HTML + CSS — layout and styling.
- JavaScript — simulation engine, indicators, charts, exports.
- Tailwind CSS (CDN) — responsive UI cards/grids/typography.
- Chart.js — plotting epidemic curves on canvas.
Implementation steps (end-to-end)
- UI + parameter entry: card-based input panel + validation + help bubbles.
- Simulation engine: client-side iterative update; re-run on input change; no page reloads.
- Derived indicators: compute and display R₀ and HIT (HIT = 1 − 1/R₀ if R₀>1 else 0).
- Visualization: Chart.js renders time series; synchronized with export arrays.
- Exports: results CSV, parameters CSV, chart+summary PNG, printable HTML report.
How it works in the browser
- Inputs → JS validation → derived computations.
- Simulation loop generates arrays (S[t], E[t], I[t], …).
- Chart.js renders arrays on canvas.
- Downloads via Blob (CSV), canvas export/compositing (PNG), generated HTML string (report).
Deployment (practical)
- Upload
fmd_simulation.php+ assets to web directory. - Ensure JS/CSS dependencies load (CDN or local copies).
- Verify routing from Simulation portal to dashboard page.
- Test downloads (CSV/PNG/HTML) on the live domain in multiple browsers.