Graph showing prevalence against time
Graph showing number of live and dead agents against time


FastSTI is an open source framework for implementing agent-based models of sexually transmitted infection epidemics.

It is designed to handle up to tens of millions of agents on a mid-range laptop, or run many smaller simulations quickly in parallel. On a high performance computer it can run dozens of large simulations or thousands of small ones in parallel.

This page demonstrates what FastSTI can do. We've had to limit how you use it because we use a low-powered server. Read more about how FastSTI works ...

FastSTI takes a configuration file as input. This tells it how many simulations to run, and how to run each simulation. It also takes data as input in files that we call datasets. And optionally, it takes a file of agents, though the agents can be generated by FastSTI itself, via instructions in the configuration file.

In the demonstration on this page, the number of simulations is set to 1 (so that our server isn't overloaded). By modifying the form below, you are simply changing the configuration file that is generated as input to FastSTI. Once the demonstration simulation on this page has run, you can go to the bottom of the page to click on the configuration file.

The outputs are a report of simulation results, and the agents. Once the demonstration simulation on this page has run, you can go to the bottom of the page to click on the output files.

Diagram showing FastSTI's inputs and outputs

A simulation continuously iterates over sets of agents, executing events on the agents on each iteration (which we call a time step). The structure of a FastSTI simulation is:

Execute events before simulation runs
for each time-step
  for each event E
      for each agent A
          if E should be applied to A
              apply E to A
Execute events after simulation runs

The number of agents and the specific events to execute are specified in a configuration file. FastSTI’s configuration file uses the .ini format, which are the standard simple configuration format used on MS Windows and the GTK framework popular on Linux systems.

You can configure the number of agents, the events and the order of events that execute upon them, the size of the time step (default 1 day), the number of time steps (default 10 years) and much else (see Configuration file parameters).

FastSTI has a number of useful built-in events useful for modelling STI epidemics (see Events). These include agent ageing, death, matching agents in sexual relationships, infection with the STI, disease advance, co-infection, and breakups.

There are also useful supporting events that read in agent files or generate the agents, write the agents to a CSV file, and write basic statistics to a CSV file.

If you need more events, the framework has been designed with extensibility in mind. You can define new events in C, identify them to FastSTI, quickly recompile the code and use them.

To explore the full potential of FastSTI you'll need to download and run it on your own computer, or a high-performance one that you have access to.

The documentation explains how to use FastSTI.


The demonstration here very roughly models a disease like HIV. It has the following characteristics:

Advanced parameters

These parameters indicate the proportions of agents who are infected at the beginning of the simulation.

These parameters indicate the risk of infection per iteration for an uninfected agent in a sexual relationship with an infected one.

These parameters indicate the risk of an agent dying per iteration.