Meter Point Reference Number
A Meter Point Reference Number is the unique number assigned to your gas connection and meter. It can be found on top of the gas bill and often stamped on the gas meter. It is also known as MPRN, M-number or end-point, and is a unique reference number of a variable length between 3 and 11 digits, used in Great Britain to uniquely identify the gas supply point in a premise, such as individual domestic residences, assigned by the Gas Transporter[1] to identify an offtake point (endpoint) of their gas network[2].
The electricity equivalent is the Meter Point Administration Number, and the water/wastewater equivalent for non-household customers is the Supply Point ID.
Xoserve
Xoserve[3] is the Central Data Service Provider (CDSP) for Great Britain's gas market, responsible for providing information to gas transportation companies from their central register, that holds information on all premises with a gas supply.
They also provide information about gas flows across the entire network.[4]
As CDSP, Xoserve holds[5]:
- A central register of 24 million gas premises
- The address, meter details, supplier identity, meter asset data and meter reading history of each of these premises
Check digits modulus of the MPRN number
The two final digits in the MPRN number are the check digits, and validate the previous numbers using a modulus 11 test.
The check digit is calculated thus:
- Multiply the first digit by {the length of the MPRN, minus 2 (the length of the total number without the check digits), minus the position of the digit (in this case 0 because it is the first digit)}.
- Multiply the second digit by {the length of the MPRN minus 2, minus the position of the digit (in this case 1)}.
- Repeat this for each digit until the last second digit is reached.
- Add up all these products.
- The check digits are the modulo 11 of that sum, padded with zero to two digits.
Example:
- MPRN number: 3938424403.
- Number to check: 39384244. Length = 8.
- Check digits: 03
- (3*(8-0)) + (9*(8-1)) + (3*(8-2)) + (8*(8-3)) + (4*(8-4)) + (2*(8-5)) + (4*(8-6)) + (4*(8-7)) = 176
- 176 % 11 = 3 (03 with padding)
- Check digits valid
def isvalidmprn(mprn):
"""Checks if an mprn is valid: it has to pass the validation for the last 2 digits (checksum)
Parameters:
mprn (int/str): an MPRN number
Returns:
bool: True if valid. False if invalid.
The final 2 digits in the MPRN are the check digits, and validates the previous using a modulus 11 test after an operation.
>>> isvalidmprn(3938424403)
True
>>> isvalidmprn(8890670807)
True
>>> isvalidmprn(8890670808)
False
"""
# assert type(mprn) == str
try:
mprn = str(mprn).strip()
if int(mprn[-2:]) == sum(factor * int(digit) for factor, digit in zip(list(range(len(mprn)-2,0,-1)), mprn)) % 11:
return True
else:
return False
except:
return False
References
- ↑ "Independent Gas Transporters". Ofgem. 2013-06-17. Retrieved 2021-02-03.
- ↑ "Frequently Asked Questions | Xoserve". www.xoserve.com. Retrieved 2021-02-03.
- ↑ "Central Data Service Provider for Britain's gas market | Xoserve". www.xoserve.com. Retrieved 2021-02-03.
- ↑ "What We Do | Xoserve". www.xoserve.com. Retrieved 2021-02-03.
- ↑ "What We Do | Xoserve". www.xoserve.com. Retrieved 2021-04-27.
Changes made to fix the page
This article "Meter Point Reference Number" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:Meter Point Reference Number. Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.
