Linking Repast to another Java program
Repast is one of the leading software packages for agent-based simulation. It provides useful classes for building and controlling simulations and users can run their models using a graphic display or in batch mode. These functions are fairly straight-forward if you want to build a stand-alone Repast simulation but what if you want to integrate Repast within a larger modelling system? This tutorial will explain the problem and show a solution influenced by design patterns.
Results
This research project has now finished. The primary outputs are available below.
The complete thesis
- Behavioural responses to photovoltaic systems in the UK domestic sector – 4 MB PDF
- Abstract – one-page PDF
Short summaries
- Project description – 70 KB PDF
- PV household interviews – 0.9 MB PDF
- Industry interviews – 2.4 MB PDF
- Overall results – 1.4 MB PDF
Publications and submissions
- Keirstead, J (2007) “Behavioural responses to photovoltaic systems in the UK domestic sector”, Energy Policy. 35(8): 4128–4141
- Keirstead, J (2007) “The UK domestic photovoltaics industry and the role of central government”, Energy Policy, 35(4): 2268–2280.
- Keirstead, J (2006) “Evaluating the applicability of integrated domestic energy consumption frameworks in the UK”, Energy Policy, 34(17): 3065–3077.
- Keirstead, J., Darby, S., Boardman, B. (2006) Response to Ofgem consultation 20/06 on domestic metering innovation.
- Keirstead, J., Boardman, B. (2005) Response to Ofgem consultation 123/05 on the regulatory implications of microgeneration.
- Keirstead, J (2005) “Energy Matters: Power from the sun” Geography Review 19 (1).
- Keirstead, J (2005) “Photovoltaics in the UK domestic sector: a double-dividend?” in Proceedings of ECEEE Summer Study, 30 May–4 June 2005, Mandelieu, France.
- Keirstead, J (2005) “Household behavioural responses to PV-system monitoring devices” in Proceedings of World Renewable Energy Congress, 23 May–27 May 2005, Aberdeen, Scotland.
Independence Day!
I just handed in my thesis.

Fun with Pajek
I’m working on the conclusion chapter of my thesis at the moment. It’s meant to sum up the results presented in earlier chapters and then discuss wider questions in the literature and for policy. There are a couple ideas I’m working on, such as an ideal tariff for microgenerators and clarifying PV’s place within the context of other household energy conservation measures, but a basic concern is sorting out how PV households interact with other stakeholders within the PV industry.
I wasn’t really sure how to start answering this question until a friend told me about Pajek. It’s a bit of software that can be used to analyse large social networks and it will perform all sorts of calculations. The options can be a bit confusing though so I thought I’d start simple. I entered some data from my interviews and you can see the resulting plot below. The size of the dots represents the ability of each node to control the network (inverse of dyadic constraint if you’re interested).

This is only a first draft but reassuringly, some basic things like a strong connection between PV households, electricity suppliers and PV installers can be seen. It also seems to show that the DTI and Ofgem play a major role behind the scenes, framing the interactions of other stakeholders. This came out of the interviews as well but the advantage of the network graph is that it’s immediately clear that there is no direct link between households and these government agencies. So, for example, if we want PV households to become more active participants in the electricity network – i.e. exporting electricity at times when it’s good for the grid or generally reducing demand – then the graph suggests that perhaps a link between DTI, Ofgem and the households needs to be built. This might be achieved by developing a pilot programme with innovative metering and monitoring technologies, working in conjunction with the electricity suppliers and PV installers. As it happens, there has actually been talk of doing just that!
That’s a pretty rough sketch of course but I’m keen to play with Pajek a bit more and see what I else I might be able to find out.
Conferences
I will be presenting some of my early results at the World Renewable Energy Congress in Aberdeen next week, focusing on the monitoring aspects of domestic PV. The week after, I will be presenting some of the possible motivations for behavioural responses to PV at the European Council for an Energy Efficient Economy’s annual Summer Study in southern France. Copies of the papers are available in the results section.
HSQLDB
As I was saying last time, I’ve got quite a bit of configuration data used in the model and I couldn’t figure out a good way to access it quickly and without too much coding. After the EnumMap stuff (which works fine but gets a bit cumbersome if you try and do anything to fancy), I switched to a JDBC connection to Access. Again it works fine but because of how frequently the database needs to be checked, it ends up being really slow.
So I was poking around on the web trying to find a solution and came across HSQLDB. Bit of a mouthful I know, but it really is a fantastic solution to this problem. Why? Because it lets you create an SQL style internal database. That’s right – at the start of my model I load everything in from the Access database, make a copy of it in RAM using HSQLDB, and then use that copy for the rest of the model run. It’s really fast but any changes to the database are lost when the model finishes. At the moment that’s fine but I may add something to periodically write to file.
That’s another sub-version done. Things are coming along quite nicely.