Category Archives: Theoretical Aspects

Here you can find the theoretical aspects of our model.

Functional Structure of the Model – Matching Agents by intentions

After modeling the sexual behavior in partnerships the next challenge was to model the behavior of single agents.

The behavior of agents representing single persons is more complex as there are many potential partners. As the agents should be autonomous there is the need to implement an framework that seperates the intention from the actual sexual action. In a very basic model each agents builds an intention — in this case a simple 0 or 1 decision — and communicates this intention to potential partners. Furthermore for singles there is also a search or screening process involved in the behavior.

To model partner selection an agent posts not only its intention and sexual orientation but also a “matching score” as well as its location. Only if there is a “proper partner” with the same intention and in the same location those two agents engage in sexual activity. The interaction of the matching score and the intention-building process need to ensure that the number of sexual contacts in the model are in line with the empirical estimates.

In our first model we decided to use the ID as a pseudo-matching-score; agents that have IDs close to each other are matched. The random part enters via the location variable. Each agents draw a location at random but depending on its sexual orientation and age. Furthermore the agent calculates its intention. If the intention is positive the agent posts its location, sexual orientation.

Next the agents in a location have to be matched up. There are actually two ways to do this (see attached picture).Matching

First in a no-centralized solution each agent is doing its own calculation. Each agent may decide independently if it is a best match for a potential partner or if it will not realize a sexual contact. To know this the agent needs to rule out the possibility that another agent is a better match.  So the calculation needs have a unique solution realizing all minimum distance pairs. Everyone with some exposure to operations research will realize that after a distance matrix is computed this is a (simple) allocation problem solvable by the simplex method  [see for example the classic Dantzig (1963), Chap 15]. Eventhough there are special purpose algorithms [especially the hungarian method see Carpaneto et al. (1988)] it seems that letting millions of agents solve a linear program ‘everyday’ which even yields the exact same results when the agents are in the same location seems to be a huge waste of computing time.
Because we only want to use the ID as a matching score a second approach is based on random matching. When using a similar seed that is know to all agents within a location each agent is able to realize the exact same random matching. Basically a random sample of the sex with a ‘surplus supply’ is drawn to realize all possible contacts.  A shared seed might be the sum of all IDs in a location because that variable is observable by all agents within the location.

A drawback of the non-centralized solution is that its random. If – later in the model building process – a real matching-score is implemented it may be desirable to treat the matching process as the allocation problem sketched above. However because the solution to this problem is unique its the same for all agents within a location so the calculation may best be done by a centralized authority. In the second approach the StatAgent is this authority. It collects all ‘sex posts’ computes the optimal matches and returns the results to the agents. To model the disease spread the agents either post their infection status or the StatAgent has to keep track of the infections in its memory.

As we are foolish enough to assume that computing power is no problem, we will try the first option and see if it will work. If not we either need to buy a super-computer (preferrably) or switch to the second option.

References

Dantzig, GB (1963): Linear Programming and Extensions. Princeton: Princeton University Press.

Carpaneto, G; Martello, S; Toth, P (1988): Algorithms and Codes for the Assignment Problem. In: Annals of Operations Research (13): 193 -223.