Individual Based Models 

Individual-based models (IbMs) are based in the view of the uniqueness of individuals in a system. In this models each individual has its own state of a set variables which depending on the phenomena under study can undergo a very complex computationally. This complexity relies in that simulation are heterogeneous in processes and interactions, and therefore increase the chances of programming errors and testing/validation time \citep{Gregory_2006}.
The ecological modeling with IbMs started with HERBY \citep{Devine_1997} a discrete grid based environment of plants with herbivores populating the grid, the algorithm includes  learning and moving costs and can be applied to sexual and not sexual populations.  The next step was the program COSMIC \citep{Gregory_2004} which aim was to simulate bacterial evolution in a multi-scale perspective in the sense of incorporating genes (and mutations), gene products and thus,  individuality which in time was affected by environment. At the same time RUBAM \citep{Vlachos_2004} was developed with the aim to simulate adaptive behavior using a grid based environments with nutrient gradients and introduced antibiotics. Than integrating both COMSMIC and RUBAM strategies came COSMIC-Rules \citep{Gregory_2006} this program works at three organizational levels : genes, cells and environment, the last one includes other cells and therefore could be used to study phages or plasmids.
COSMIC-Rules was used in a completely theoretical work to study the transmission of plasmids in a bacterial population \citep{Gregory_2008}.  Their experiments consisted on a comparison between invasions with conjugative plasmids bearer populations:  invading with two incompatible plasmids vs invading with two compatible plasmids, each plasmid carrying a different antibiotic resistance gene and then add both antibiotics to the environment  and analyze plasmid dynamics. In this work conjugation is based on proximity and metabolic state, that is, transconjugant cells have a waiting time before they can act as plasmid donors and so the donor cell before donating to a second recipient. Plasmid cost was taken into account as 1% growth rate and were not specific for double transconjugants. Selection with antibiotics was boolean and assumed 100% vertical transmission. it also incorporates a parameter for surface exclusion so the same cell can not act as receiver of the same plasmid type to model plasmid incompatibility.
In this spatially structured study they found that the optimal conjugation rate was 1x10-3 ,  which is rather high. From incompatible plasmids invasion experiment they concluded that this property is a limiting factor  for the spread of plasmids. From the compatible plasmids experiment they concluded that both are able to be transferred and maintained in the entire population. The major contribution is to state a prove of concept of this approach to study gene transfer by conjugation.
The above model presents a general overview of plasmid dynamic behavior with major plasmid properties, a more property-specific model  is proposed in \citep{Merkey_2011}, with the motivation of understanding poor plasmid spread in deeper biofilm layers the authors postulate an IbM consisting in three agents: cells, extracellular polymeric substances (EPS) and plasmids. Considering plasmids as another agent they can simulate different plasmid types. They also take into account plasmid burdens and metabolic reactions,  a segregation probability, conjugation, conjugation lag times  and conjugation specific parameters  such as pilus reach distance and pilus scan speed. They also introduce the concept of growth dependence of HGT throughout the pilus scan speed parameter modeled as piece-wise linear function dependent a growth tone parameter with specific cut-offs. With this model they explore the influence  of the growth tone during invasion experiments and were "able to reproduce observed dynamics of plasmids in biofilms, including cases of complete invasion and invasion limited to the biofilm surface". They also found that timing parameters, distance between neighbors  as well as plasmid burden have a stronger influence in the invasion success than the growth rate of the receivers or the segregational loss rate. The relevance of this works relies on the insights of explaining the limited spread of conjugational plasmids in some  biofilm communities by the growth dependence of the HGT process.
Latter in a work by the group of Michael Brockhurst \citep{Harrison_2016} they postulate an enigmatic IbM with the aim to simulate the dynamics of the pQBR103 mega  plasmid that carries a mercury resistance cassette within a transposon and a fitness cost of 25%. With their model they explore a mutation rate  parameter that compensates the fitness cost to 99% and transposition rates and conclude that the stability of plasmids is a race between incorporation of the accessory genes into the chromosome and the appearance of compensatory mutation. And that in the absence of selection mutations must have large fitness effects and occur at high rate.
In the search for resolving the plasmid paradox,  a great contribution was made in the work made by \citep{Werisch_2017}. Using an IbM they propose a mechanism to maintain non-transmissible plasmids. The model contemplates two types of plasmids non-transmissible and transmissible, the last ones with two states: able to transfer or not. Segregational loss and incompatibility only occurs when the two types of plasmids are present in the same cell, and is modeled as per-type segregation probability, accounting that two incompatible plasmid types are unable to persist in the same cell due to cross reactions between replication control mechanisms. They resume their finding in the following : "non-transmissible plasmids can be maintained along with co-occurring, incompatible conjugative plasmids, although non-transmissible plasmids provide no advantage t the host and will be lost in the absence of this plasmid composition".
The last model to analyze is namely an individual-based model in the sense that it is constructed based on individual assumptions but consist in a walkthrough  all the modelling approaches revised. In the work presented in \citep{Billiard_2016}, the authors consider two clonal populations of haploid individuals each carrying a different 'trait', which can be interpreted a conjugative plasmid. They also consider natural death of individuals, competition between trait subpopulations. The model is constructed under general horizontal transfer without the possibility of coexistence of both traits, and thus, there is conversion of individuals occurring at different rates. By considering that horizontal transfer is stochastic they formulate an equation for an infinitesimal generator of a Markov process in which each populations are scaled by a specific parameter K, when K tends to infinity, the sequence of the stochastic process converges to the solution of a system of ODEs similar to a Lotka-Volterra. By analyzing the phase diagrams of this ODEs system they find they could be stable coexistence of the traits. Then to see magtnitud of the fluctuations around the deterministic dynamics they construct an Ornstein-Uhlenbeck process to which solution is  stochastic differential equation with Brownian motions related to the birth  death processes of each population and to the horizontal transfer, then using some assumptions about later processes they construct a simpler stochastic differential equation that latter rewrite it as the Wright-Fisher diffusion approximation.
Then they use this last model to analyze the invasion (and fixation) of plasmids. The conclusions of this work can be summarized in that fixation becomes case specific and dependent on the transfer rates and costs, for example, in individuals with small birth rate, fixation is more sensitive to transfer rate than to selective value. At the end the take home message is that "horizontal transfer interacts with ecology (competition) in non-trivial ways. Competition influences individual demographics, and this in in turn affects population size, which feeds back on the dynamics of transfer".