Modelling the New Zealand electricity market

University of Auckland researchers are applying computational game theory to analyse competition levels.

Research background

Researchers Marcus Jude San Pedro and Erwann Sbai from the University of Auckland are applying computational game theory to analyse competition levels in the New Zealand Electricity Market (NZEM). Their work aims to model how market participants, such as electricity generation firms, formulate bidding strategies and how pricing structures can be adjusted to assess incentives to utilise market power while improving efficiency.

The project focuses on solving a symmetric and asymmetric auction model under the independent private values paradigm, which captures strategic interactions between participants. By simulating multiplayer games, the researchers can explore how changes to market rules - pricing formats, bid structures, and auction mechanisms - affect overall market outcomes and participants’ expected utility.

The Constrained Strategic Equilibrium (CSE) approach is of particular interest because it provides a practical way to approximate the Bayesian Nash Equilibrium (BNE) in cases where closed-form solutions are not available. CSE is computationally tractable, flexible enough to handle different bidding strategies, and can be adapted to test how market rule changes influence equilibrium outcomes.

Power lines along a road near Castle Hill, New Zealand.

Power lines along a road near Castle Hill, New Zealand. Photo by Equilateral on Unsplash.

Project challenges

The researchers have a reference code for computing the Constrained Strategic Equilibrium (CSE) but it is implemented in Fortran and depends on IMSL, a proprietary numerical library for optimisation. This results in challenges related to portability, accessibility, and collaboration, and an open-source alternative would be preferable.

Another challenge is that the research team has limited experience with Fortran but needs to be able to continue development of the code to add more features. For example, the reference code has many hard-coded parameters that limit its applicability and would need to be generalised. Converting the implementation to a more modern and widely used language, such as Julia, would help here.

What was done

Chris Scott and Dinindu Senanayake, Research Software Engineers with New Zealand eScience Infrastructure at the time, worked with the research team to address these challenges. The reference Fortran code was ported to Julia, a modern language known for its ease of use and high performance. During the conversion the dependency on IMSL was removed and open-source Julia libraries were used instead.

An open-source Julia package has been released containing the converted CSE code and is available for anyone to use: https://mjpsanpedro1222.github.io/ConstrainedStrategicEquilibrium.jl/dev/

The new Julia code supports three forms of the CSE: piecewise linear and polynomial approaches for the symmetric case (where all players share the same distributions), as well as an asymmetric case. It also offers greater flexibility in specifying the number of bidders and their underlying value distributions.

In addition, the project supported the researchers in developing skills with version control tools such as Git and GitHub. These tools improve the development workflow and make it easier to collaborate with others on code development.

Main outcomes

Researcher feedback

We greatly valued the support of NeSI’s Research Software Engineers, whose expertise and collaborative approach made working with them a smooth and rewarding experience. Their contributions were instrumental in helping us clarify our research objectives and improve the efficiency of our overall research process.

Marcus Jude San Pedro, Faculty of Business and Economics, University of Auckland

 


 

This case study shares some of the technical details and outcomes provided through our Consultancy Service. This service supports projects across a range of domains, with an aim to lift researchers’ productivity, efficiency, and skills in research computing. Get in touch to discuss how our Research Software Engineers and specialist support could help advance your project.

 

Find anything about our products, services, and more. Enter a query in the search input above.