Industrial electricity cost optimization engine with interactive analytics dashboard.
Analyzes 12 months of utility billing data to identify demand breaches, power factor penalties,
and quantify savings from APFC capacitor banks, VFD motor drives, and TOD load-shifting strategies.
Open index.html directly in any modern browser — no server required.
For full CSV loading: python3 -m http.server 8080 → visit http://localhost:8080
| Module | Description |
|---|---|
| Piecewise Tariff Parser | 4-slab progressive energy charge computation (MSEDCL HT-I inspired) |
| Demand Ratchet Calculator | Contracted vs. Recorded Max Demand with 75%–85% billing floors and over-demand penalty |
| TOD Load Shifting | Simulate moving peak consumption to off-peak hours with instant savings projection |
| APFC Capacitor Sizing | Reactive power compensation with THD derating and detuned reactor alert |
| VFD Energy Savings | Cubic affinity law estimator for centrifugal pump/fan motor speed reduction |
gridoptima-tariff-engine/
├── index.html # Dashboard entry (GitHub Pages root)
├── styles.css # Executive-grade responsive styling
├── app.js # All engine logic + Chart.js wiring
├── README.md # This file
├── data/
│ └── sample_12month_utility_bills.csv # 12-month industrial billing dataset
├── src/engine/
│ ├── TariffEngine.cpp # Standalone C++17 implementation
│ └── TariffEngine.java # Standalone Java implementation
└── docs/
└── SRS_Architecture.md # Star schema, formulas, architecture
Zero dependencies — no npm, no node_modules, no build step. Chart.js is loaded via CDN.
| Condition | Billed Demand | Penalty |
|---|---|---|
| MD > CD | MD | (MD − CD) × ₹500/kVA |
| MD < 75% × CD | 75% × CD | None |
| 75% ≤ MD < 85% × CD | 85% × CD | None |
| 85% ≤ MD ≤ CD | CD | None |
THD Derating:
⚠️ Detuned reactor required when THD > 5% to prevent harmonic resonance with capacitor banks.
Annual savings:
The billing dataset follows a Star Schema design:
Fact_Billing— 12 monthly billing records (the CSV)Dim_TariffZone— Tariff slab rates, TOD windows, demand chargesDim_Equipment— Motor ratings, VFD/APFC specifications
Full schema documentation: docs/SRS_Architecture.md
g++ -std=c++17 -O2 -o TariffEngine src/engine/TariffEngine.cpp -lm
./TariffEnginejavac src/engine/TariffEngine.java
java -cp src/engine TariffEngineBoth engines read data/sample_12month_utility_bills.csv and print a tabular analysis to stdout.
Double-click index.html — the dashboard uses an embedded fallback dataset so it works perfectly via file:// protocol without any server.
python3 -m http.server 8080
# or
npx serve .Visit http://localhost:8080 — this enables CSV file loading via fetch().
- Push the repository to GitHub
- Go to Settings → Pages → Source:
mainbranch, root/ - Access at
https://<username>.github.io/gridoptima-tariff-engine/
- 4 KPI Cards — Demand breaches, PF penalties, APFC recommendation, VFD savings
- 3 Interactive Sliders — Target PF (0.80–0.99), VFD speed reduction (0–30%), TOD shift (0–50%)
- 4 Chart.js Graphs — Demand bar chart, PF/THD dual-axis trend, TOD stacked bar, cumulative savings
- ROI Calculator — Real-time payback period in months based on slider values
- CSV Upload — Drag-and-drop custom billing data
MIT License — see LICENSE for details.