01The problem
On 1 June 2021 Spain replaced its electricity access tariffs: CNMC Circular 3/2020 and Royal Decree 148/2021 changed network tolls, system charges and time periods for every supply point.
Fixed-price contracts signed before the reform ran past that date. Their prices were defined on the old tariffs and periods, and had to be translated to the new structure without changing what customers had agreed to pay.
02The solution
The portfolio management team mapped every old tariff to its new equivalent — the 2.0 and 2.1 families to 2.0TD, 3.0A to 3.0TD, 3.1A to 6.1TD or 6.2TD depending on voltage, and the 6.x tariffs to 6.xTD — and built a conversion matrix from 2019 hourly consumption profiles.
Prices were re-solved as a linear programming problem with economic-neutrality, tolerance and period-order constraints, over two horizons: to the end of each contract and for a 12-month renewal.
I worked in that team as Energy Portfolio Data Analyst; this case describes the team’s approach rather than a single owner.
The conversion
Key decisions
- 01
Keep every contract economically neutral.
New prices were constrained so the expected cost under the new tariffs matched what each customer had signed.
- 02
Price two horizons.
Re-pricing covered the remaining contract term and a 12-month renewal, so renewals did not need a second migration.
03Where AI fits
No AI component. Linear programming kept every converted price traceable to the original contract and its constraints.
04Results
- Converted prices delivered as SAP-ready parameters and Excel templates, with Shiny apps to review them and a Salesforce integration.
- Old and new tariffs reconciled across the B2B, B2C and public-tender portfolios.
Describes a tariff and contract-data transformation within a retailer, at team level. Internal identifiers, product codes and pricing parameters are omitted.