Thinking global, living local

How to use india-omc-fuel-fleet-model: ethanol blend scenarios and OMC pump income in pure Python

October 19, 2026

Small, dependency-free Python models for what India's oil marketing companies earn at the pump, how that changes at E20, E25 and E30 ethanol blends, and how many vehicles are actually on the road burning fuel.

Open-Source Tools · How-To · Energy & fuels models

How to use india-omc-fuel-fleet-model: ethanol blend scenarios and OMC pump income in pure Python

Skip to article content
Text Size

Revised · v1.0.0 · what changed

₹46,449 crbase OMC retail gross per year (petrol plus diesel), illustrative
₹757 / 1,057 / 1,367 crextra pump income at E20 / E25 / E30
0.05 srun time of the main model (standard library only)
24.5 croreestimated actively driven vehicles from fuel sales

Code: github.com/herrrickshaw/india-omc-fuel-fleet-model

Watch the walkthrough

Watch on YouTube: youtu.be/vRj87yeDMew

Why it is useful

  • Energy analysts, students and journalists get a transparent, editable model of an argument that is usually made in prose: blended fuel has less energy per litre, so vehicles buy more litres, and per-litre margins and taxes scale with it.
  • It replaces a spreadsheet nobody can audit: the main model is one readable script using only the standard library, and every assumption is in the code.
  • Evidence from the run: omc_model.py, fleet_from_fuel.py and energy_blend_comparison.py all ran in a fresh clone with no installs and printed the headline numbers the README quotes, and the extra-litre figures in two different scripts reconcile (2.16 billion litres at E20).
  • The run also surfaced a modelling choice worth knowing: the OMC model uses a 4% mileage drop at E20, while the pure energy-content table implies about 7%. The post explains the difference.

What it is for

The repo models India's oil marketing company (OMC) retail margin on petrol and diesel from PPAC reference data, and what changes when petrol is blended with 20, 25 or 30 percent ethanol. The key mechanism is that a mileage penalty makes drivers buy more litres, which raises pump throughput and so OMC income.

Other scripts estimate how many vehicles are actively driven from fuel sales, compare energy content of blends, test price-parity scenarios and sketch CBG, distillery, DME and isobutanol investment cases. This post focuses on the blend-scenario model and the fleet estimate.

Who it is for

  • Students and analysts studying India's ethanol blending policy
  • Journalists and researchers who want to test assumptions rather than quote headlines
  • Developers extending a small, readable fuel-economics model
Not for.
  • Investment advice: this is not investment advice, and the OMC margin is an assumption, described by the README as the key lever
  • Policy or tax decisions without checking inputs against current official figures
  • Detailed engineering or project-finance design; the pitch models are conceptual

What you need

RequirementWhyHow to get it
Python 3 (standard library only for the main scripts)requirements.txt notes omc_model.py, fleet_from_fuel.py and the Vahan analysis are pure standard librarypython.org, or brew install python on macOS
openpyxl (optional)Only the Excel builder (build_xlsx.py) needs itpip install -r requirements.txt
Node.js (optional)Only the slide and document builders (build_*.js) need it; not used in this demonodejs.org
A terminal and gitTo clone and runTerminal on macOS/Linux, or Git Bash/WSL on Windows
No API keys or accountsInputs are embedded in the code and repo filesNone needed

Get the code and an AI assistant

You do not have to be a programmer. Get the repository, give it to an AI assistant, and ask in plain language. Any of these routes works:

ToolWhat you needBest for
GitHubFree account to fork or star; git to clone, or the green Code button, then Download ZIP, or open in CodespacesGetting the code and keeping up with updates
Claude CodeClaude subscription or API key; run claude inside the cloned folderLetting the AI read and run the whole repo
Gemini CLIGoogle account; run gemini inside the cloned folderThe same hands-on workflow with Gemini
Claude.ai, Gemini or ChatGPT in the browserA chat account; upload README.md and the files you care about (or paste the output of git ls-files)Understanding the project and asking questions without installing anything
Other tools (Copilot Chat, Cursor, Codex CLI)Open the cloned folder in the tool and point it at README.md firstEditing and extending the code
git clone https://github.com/herrrickshaw/india-omc-fuel-fleet-model.git
cd india-omc-fuel-fleet-model
claude      # or: gemini

Install

  1. Clone and enter the repo
    git clone https://github.com/herrrickshaw/india-omc-fuel-fleet-model.git
    cd india-omc-fuel-fleet-model
  2. Optional: install openpyxl for the Excel builder only
    python3 -m venv .venv && source .venv/bin/activate
    pip install -r requirements.txt

Quick start: commands and what you should see

Run the OMC profitability and blend-scenario model

python3 omc_model.py

Five lines: base OMC gross, extra pump income at E20/E25/E30, mix scenarios S0 to S4, the YoY projection, and the files it wrote under outputs/.

Estimate the actively driven fleet from fuel sales

python3 fleet_from_fuel.py

Totals by fuel and a segment table; about 24.5 crore actively driven vehicles.

Compare blends by energy content and who collects the extra spend

python3 energy_blend_comparison.py

An energy table for E10 to E30, isobutanol and biodiesel blends, then consumer spend, excise, VAT, dealer and OMC shares per blend.

Sample outputs

Real output from a run on the date shown in the sources line; trimmed to fit.

omc_model.py (run 19 Oct 2026, 0.05 s)

python3 omc_model.py
Base FY24-25: OMC retail gross ≈ ₹46,449 cr/yr (petrol ₹18,919 + diesel ₹27,530)
Ethanol extra pump income:  E20 ₹757 cr | E25 ₹1,057 cr | E30 ₹1,367 cr
Mix scenarios (OMC petrol income ₹cr): S0 ₹18,881 | S1 ₹18,919 | S2 ₹19,017 | S3 ₹19,153 | S4 ₹19,322
YoY projection FY25-26→FY29-30: ₹46,449 → ₹56,560 cr

All rupee figures in crore (₹ crore = ten million rupees) per year.

Blend scenario table (outputs/scenarios.csv, billion litres)

cat outputs/scenarios.csv
scenario  blend  mileage_drop  petrol_MS  ethanol  extra_throughput  extra_OMC_cr
E0        0.00   0.000         51.89      0.00     0.00              0
E20       0.20   0.040         43.24      10.81    2.16              757
E25       0.25   0.055         41.18      13.73    3.02              1,057
E30       0.30   0.070         39.06      16.74    3.91              1,367

Pure petrol sold falls as ethanol rises, while total pump throughput rises.

Profitability projection (outputs/yoy_projection.csv)

cat outputs/yoy_projection.csv
fy       blend  outlets  omc_income_cr  yoy_growth_cr
FY25-26  E20    99,281   46,449         -
FY26-27  E20    103,749  48,591         2,142
FY27-28  E25    108,417  51,195         2,605
FY28-29  E25    113,296  53,606         2,411
FY29-30  E30    118,394  56,560         2,954

A model projection under the repo's assumptions, not a forecast.

energy_blend_comparison.py (excerpt)

python3 energy_blend_comparison.py
E20  29.92 MJ/L  energy −6.83%  extra litres +7.33%
E30  28.82 MJ/L  energy −10.25% extra litres +11.42%
E20  extra 2.16 bnL  consumer ₹22,703 cr  excise ₹4,303 cr  VAT ₹4,216 cr  dealer ₹886 cr  OMC ₹757 cr

The 2.16 billion litre E20 figure matches omc_model.py, so the two scripts reconcile.

Ways to use it

MethodHow it works
Command line scriptsRun omc_model.py, fleet_from_fuel.py, energy_blend_comparison.py and the others; results land in outputs/ as CSV and Markdown.
Edit the assumptionsChange blend shares, mileage drops or margins in the script and re-run; each run takes well under a second.
Excel and slide buildersbuild_xlsx.py (needs openpyxl) and the Node build_*.js scripts produce the workbook, papers and decks in docs/. Not run in this demo.
Through an AI assistantOpen the cloned folder in Claude Code or Gemini CLI and ask it to change an assumption and explain the result.

Sample prompts for your AI assistant

Copy, paste and edit the parts in [brackets].

  • Explain this repository in plain English: what does omc_model.py calculate and which assumptions drive the answer?
  • Run omc_model.py with a [percent] OMC margin instead of the default and show how the E20, E25 and E30 extra income change.
  • Why does omc_model.py use a 4% mileage drop at E20 while energy_blend_comparison.py implies about 7%? Which should I use and why?
  • Read fleet_from_fuel.py and list every assumption behind the 24.5 crore figure, then show the effect of changing two-wheeler daily fuel use by 20%.
  • Summarise the caveats in the README's CBG section in five bullet points for a non-specialist.

Limits and honest caveats

  • Not investment advice. The README itself calls the headline results illustrative and the OMC margin the key lever.
  • The mileage-drop assumption (4% at E20) is lower than the energy-content estimate (about 6.8% less energy per litre, 7.3% more litres). The scripts reconcile with each other, but the chosen real-world mileage drop drives the extra-income result.
  • The YoY table labels its first row FY25-26 while the base is labelled FY24-25 in the model output; both show the same 46,449, so read the first row as the base year.
  • Inputs are PPAC and other figures embedded in the repo; I did not re-verify them against the sources and they will age.
  • I ran only the Python models. The Excel builder, the Node slide and document builders and the investment-pitch models were not run.
  • The CBG, DME and isobutanol pitch models are conceptual and are not investment advice.
  • The README says CBG fed into CNG does not cut mileage, so the extra-throughput mechanism applies to ethanol in petrol only.

Sources: the india-omc-fuel-fleet-model README and the scripts omc_model.py, fleet_from_fuel.py and energy_blend_comparison.py, run on 19 October 2026 on a fresh clone.

Revision history.
  • v1.0.0 — 19 October 2026 — first published.

About this article: Researched, written and edited by Umashankar Triplicane Dwarakanathan, with AI research assistance; every figure is meant to trace to the primary source cited. See the Editorial Policy for how sourcing, AI use and corrections work.

Umashankar Triplicane Dwarakanathan
Contact Us
Umashankar Triplicane Dwarakanathan
Investment Promotion & Energy-Sector Leader · Chennai, Tamil Nadu, India
LinkedIn → GitHub → Email +91 78273 81696
How this site works

Data-led analysis of India's trade, currency and industrial policy. Every article is built from primary official sources, and every figure links back to the release, table or filing it came from.

Sources. DGCI&S TradeStat (imports/exports, HSN-wise) · PIB (government press releases, January 2017 to today, refreshed daily) · RBI (circulars, balance of payments) · MoSPI (CPI/WPI, IIP) · PARIVESH (environmental clearances) · CCIL (bond yields) · BIS (policy rates) · SEBI, NSE/BSE and SEC filings for company data.

Interpretation. Figures carry their vintage and retrieval date; estimates and press-reported numbers are labelled as such; where sources disagree, both are shown. Corrections are made visibly, never silently. Articles are written with AI assistance from the cited sources — AI-generated text can misstate figures even when working from real material, so verify any number that matters to a decision against the linked primary source.

footer

Browse all articles by topic

Every piece on this blog, grouped. Or read the full index.

Agriculture & FertilisersAI ToolsChemicalsClimate & CarbonEnergy & FuelsGas & LNGImport SubstitutionIndustrial PolicyMarkets & FinanceMobility & EVPrices & InflationTextilesTrade & Tariffs

Each topic is a live archive page that updates itself as pieces are labelled. It replaces a hand-kept list that had fallen 18 articles behind.