A discrete event system specification (DEVS)-based model of consanguinity

Consanguinity or inter-cousin marriage is a phenomenon quite prevalent in certain regions around the globe. Consanguineous parents have a higher risk of having offspring with congenital disorders. It is difficult to model large scale consanguineous parental populations because of disparate cultural issues unique to regions and cultures across the globe. Although consanguinity, as a social problem has been studied previously, consanguinity from a biological perspective has yet to be modeled. Discrete Event System Specification (DEVS) formalism is a powerful modeling formalism for the study of intricate details of real-world complex systems. In this article, we develop a DEVS model to get an insight into the role of consanguineous marriages in the evolution of congenital disorders in a population. As proof-of-concept, we develop a consanguinity simulation model in Simio simulation software. Our results show the effectiveness of DEVS in the modeling of consanguinity effects in causing congenital defects.


Introduction
A consanguineous or inter-cousin marriage is a cultural tradition in many societies around the world [1]. Consanguineous marriage is formally defined as "a marriage which is solemnized among persons descending from the same stock or common ancestor with close biological relations" [2]. Although consanguinity can have positive effects such as increase in general population fitness and a reduction in breast cancer [3,4], at the same time, it has also been known to lead to an increased rate of birth defects, manifesting as severe recessive disorders [5][6][7][8]. Various studies have pointed out that consanguinity, a cultural trait, at times lowers certain population fitness factors [9][10][11]. Despite this, inter-cousin marriages are prevailing and in fact spreading because of their socioeconomic usefulness amongst diverse populations.
Outside its social and cultural context, consanguinity from a biological perspective has not been modeled in the past. Computational Modeling and simulation techniques have previously proven useful in developing insights and understanding of the dynamics of complex biological systems [12,13]. Large scale consanguineous parental population is in essence, a possible domain for the application of simulation. However, its emergence in societies within the same geographic area, despite cultural, linguistic and religious heterogeneity [14,15] make its modeling a challenging problem. Discrete Event System Specification (DEVS) formalism [16], a formal modeling and simulation framework, has been successfully used as a framework for modeling complex systems. Although DEVS has been used to model certain natural and biological systems [17,18], it has not been used to model consanguinity to the best of our knowledge.
The purpose of the present study was to examine the role of consanguineous marriages in causing congenital defects using a modeling and simulation approach. With a dearth of modeling and simulation studies in the domain of consanguinity, there is need to develop formalism for modeling this complex system. In this paper, we focus on the development of a DEVS framework for the formal modeling of consanguinity. As a proof-of-concept, we further demonstrate conversion of this model to an actual simulation model using Simio simulation software [19]. Our results show that DEVS can be used effectively to model biological problems.

Background
The widespread practice of consanguineous marriages has conventionally been attributed to its multiple social benefits, such as aggregation of economic wealth, better treatment of spouse, increased family stability and security [20,21]. However, it has also been well demonstrated that consanguineous marriages have a relatively higher risk of producing offsprings with genetic disorders than that of the general population [22,23]. These include diabetes mellitus, cancers such as that of the cervical, brain, etc. and coronary artery disease as discussed in several articles [8,11,24,25]. Consanguinity has even been considered to contribute to an increase in incidents of hypertension [26,27]. The detrimental health effects associated with consanguinity are caused by the expression of recessive genes inherited from a common ancestor(s) [2]. This applies to rare single gene conditions as well as to multigene disorders with multifactorial inheritance. Therefore, it is often proposed that consanguineous marriages should be discouraged on medical grounds.
The degree of relationship involved in consanguineous marriages affects the rate of birth defects proportionally. Three relationship degrees are considered to have deleterious effects on human health that include first, second and third degree cousins as shown in Figure 1. First-cousin marriages are the most common type of consanguineous union because they share twice the consanguinity (four times the degree of consanguinity of second cousins) as any other degree relationship and are used as prototypical examples in studies of consanguinity [14]. On the other hand, first cousins once removed have half the shared DNA as full first cousins. Sometimes, even half-fourth cousins cannot be detected at the DNA level [28].
Due to the complexity of the population interactions regarding consanguinity and large number of components involved, it is difficult to effectively study the behavior of consanguineous population along with congenital disorders. Many statistical studies have been conducted to study these interactions, but these studies have provided limited information regarding the resultant effects of consanguinity on a given population [15,29,30]. A few studies regarding simulation of consanguinity networks exist [31,32], but they have treated consanguinity as a social problem rather than a biological one. Since modeling and computer simulation techniques have previously proven useful for developing an understanding of the dynamics of complex biological systems [33,34], therefore this approach has been used to study consanguinity here.

Modeling and Simulation
Modeling is the process of producing models for a simulation study [35]. The main focus of modeling is on the input and output signal relation instead of detailed dynamics within the system [36]. Simulation is a tool which is used to simulate an abstract model or generate behavior of a particular system. Simulations are implemented with the help of simulators. If a model is a set of mathematical instructions, then simulator is a software which is used to execute these instructions and generate the behavior of the system of interest [37]. The framework of modeling and simulation consists of four main entities [38] : • Experimental frame • Real/virtual source system to be simulated • The model • The simulator Experimental frame specifies environment or conditions under which the system is experimented with. The source system is the real or virtual environment that is to be modeled and data is gathered by observing it. The model is a mathematical representation of a system or structure for generating behavior claimed to represent the real world. The simulator is that computational system/software which obeys instructions of the model and generates behavior shown in Figure 2 [38].
The modeling and simulation entities become significant only when they are properly related to each other. "Modeling Relation" is concerned with how well the "Model" generates behavior and agrees with observed system behavior, while "Simulation Relation" ensures that the simulator carries the model instructions correctly [38]. The framework of modeling includes many system specification formalisms, such as differential equation system specification (DSS), discrete time system specification (DTSS), and discrete event system specification (DEVS). These formalisms help to model systems in the most appropriate and effective manner during the early development at the requirements and specification levels [38].
The modeling and simulation entities become significant only when they are properly related to each other. "Modeling Relation" is concerned with how well the "Model" generates behavior and agrees with observed system behavior, while "Simulation Relation" ensures that the simulator carries the model instructions correctly [38]. The framework of modeling includes many system specification formalisms, such as differential equation system specification (DSS), discrete time system specification (DTSS), and discrete event system specification (DEVS). These formalisms help to model systems in the most appropriate and effective manner during the early development at the requirements and specification levels [38].
Modeling and computer simulation techniques have previously proven useful for understanding the dynamics of complex biological systems [12]. Recently, DEVS formalism has been used as a framework to model natural or biological systems effectively, such as [18,39,40]. Therefore, in this study, we proposed use of the DEVS formalism to model the potential effects of consanguinity in causing congenital defects.

Discrete Event System Specification
DEVS is a formal mathematical framework which is used to design models for discrete event simulation [37]. DEVS models are usually described as either atomic or coupled models which are defined as tuples: Usually these DEVS models offer specifications like inputs (X), outputs (Y), set of states (S), time advance (ta) and functions for determining next states and outputs given current states and inputs, etc. The major scheme behind DEVS is that the model and simulator work separately and the simulator does not depend on model in a sense that it can run simulations regardless of what DEVS model represents [18].
DEVS formalisms are developed to improve system reliability, design time and comprehensibility. Therefore, DEVS formalism provides a good framework to model consanguinity as risk factor for many congenital disorders because it is a mathematical paradigm with well-defined concepts of coupling of components, hierarchical, modular construction, and support for discrete events [41]. The impact of consanguinity as a genetic risk factor is not modeled yet using formal methods. Therefore, our aim was to provide a DEVS framework to model consanguinity followed by conversion of DEVS model in simulation using Simio software.

DEVS in relation to other approaches:
For the specification of model frameworks various formalisms have been in use from decade.
For example Petri Nets, Discrete Time Specification, Finite state Automata and Queuing networks has been widely used to specify system properties. Choice of any of these formalisms is entirely based on the application domains, modeler's background, goals, or the available computational resources. In case of Discrete Time Specification formalism inconsistency in the system states specification is the major drawback because it treats time variable as a constant number whereas in contrast a real world system continuously change with time. DEVS formal model specification framework, which uses mathematical notations to specify a system's behavioral characteristics, overcomes this problem by mainly focusing on the time ''t" variable, whose value continuously changes like other variables in a system. It do so by separating the system states and constant states by using transition functions which calculate constant states from current system states. DEVS separately keep the simulators and models to handle system states and constant states complexity. In recent most years DEVS become quite supportive in specifying complex biological systems such as biological cell behaviors in cell networks and to capture the motion of deformable biological structures (specified in section 1). The reason which motivates researchers to use DEVS framework is that it offers a full range of computational means such as it provide an ease to the modeler to specify models directly in its terms and system managability when disintegrated model and simulators are required. In our study we used DEVS and SIMIO simulation software for modeling and simulation purpose. So in our opinion DEVS formalism is relatively useful to model consanguinity as it provides facility to handle complexity.

Development of the DEVS Model of Consanguinity
This section describes the DEVS model of consanguinity as a risk factor. As mentioned earlier, framework development of consanguinity system identifies the key elements or entities and their relationships. Therefore, first we specified the basic entities of modeling and simulation of consanguinity, i.e., source/real system along with the experimental frame, model and simulator.
The experimental frame included region, religion, arranged marriage or self commitment, % consanguinity, allelic frequency, consanguinity type (i.e., 1 st or 2 nd degree), and co-efficient of inbreeding. With consanguinity as the source system, the DEVS model and Simio simulator are shown in Figure 3.
After specifying the entities, the DEVS formalism of consanguinity was built which is described This allowed us to obtain male and female entities equally for marriage events. After combining both male and female populations, is the group was split into two, i.e. consanguineous and nonconsanguineous marriages. Consanguineous and non-consanguineous marriages event now occurred separately followed by population growth (births). At the end, we obtained a new population with the probability of consanguineous and non-consanguineous population with their rate of offspring growths.
Since the usefulness of a DEVS-based model design depends largely on the extent to which an implementation adheres to it; we therefore choose a simulation approach to implement the DEVS-based consanguinity model.

Simulation
In the previous sections, we presented basic entities and framework of consanguinity using DEVS formalism. This section will further describe the implementations of consanguinity using the simulation software Simio. Simio makes simulation easier for decision making and enables users to solve more problems, more easily than ever before. It is based on the model objectoriented framework and facilitates building of 3D models [48]. In Simio the basic concept of object oriented framework is that classes define the behavior of objects [19]. Those classes, when placed together in a model, result in the emergence of system behavior from previously defined object interactions. Objects can be user defined and can easily be added and extended in Simio.
The basic object types in Simio are [48]: • Fixed (a fixed location) • Source (generate entity objects) • Server (model a capacitated process) • Sink (destroy entities that have finished processing in the model) • Link (paths between objects) • Node (intersection between links) • Agent (unconstrained movement through free-space) • Entity (agent) it moves across links, enter objects • Transporter (entity) it carries entities To execute "Population Growth" event, a server is used within the "Add-On Process Triggers" section of "Properties", which adds a new logic named a 'Processed'. This directs the user to the "Processes" window with a new process called "Server1_Processed". Within this process, we can use a 'Create' step to create new entities (offspring) based on a distribution to determine the number of objects to create. When new entities are created, they are sent from the "Created Exit" of the "Create Step" and a "Transfer Step" step can be used to transfer them from freespace (where they are created) to a particular node -in this case, they can be transferred either to the Output@Server1, where they can exit with the parents, or they can be transferred into a "sink" where they can be counted.
In Simio simulation, for generating offsprings, a "children" entity object (similar to MP and FP) are added that are animated in such a manner that one can see the difference between children and parents. This is not required, but may be desirable at times. To create offsprings, within the "Processes" window, use the "Create Step" to change the "Object Instance Name" to "Children" and "Number of Objects" to "Random.Discrete" distribution based on information provided regarding how many children per couple to create. For example, Figure 7 shows that 10% of the population has 0 children, 20% has 1 child, 30% has 2 children, 30% has 3 children, 8% has 4 children and 2% have 5.
To graphically depict the children leaving the Server1 (population growth) with the parent (instead of them all leaving simultaneously on top of each other), one can change the "Path Allow Passing" property to "False" so they are shown in a line (Figure 8). Data collected from simulations can provide information regarding the number of off springs calculated. The parents are never split, as a separator object is not usedbut stay together with the animated parent entity.
This population growth submodel is further used in an expanded consanguinity model by splitting it into two submodels: consanguineous marriages and non-consanguineous marriages.
In the same way as in the population growth model, the male (MP) and female (FP) population is used followed by the separation of this population into two groups based on sex distribution: together. This distribution is based on average rates of marriages between first cousins among Saudi populations [50]. After reaching the queue of server named "Population Growth", birth events will occur and generate offsprings randomly. The same process takes place with nonconsanguineous marriages and birth events. The population is continuously updated based on marriages and generated offsprings ( Figure 10).

Results and Discussion
We generate a comprehensive report to provide particular statistics regarding the consanguinity model. To report results, we run simulations of the consanguinity model for at least 10 runs and results were exported in an Excel sheet. Here, we will discuss results with the help of tables generated through Simio pivot grid or reports. Our results contain four main categories which are: objects name, data source, category and value. Object name indicates the names of objects we used in our model which help to interpret values of objects. Data source shows the quality of data and category identifier used for high-level categorizing of statistics in reports (e.g. throughput). Value shows the quantity of entities passing through different objects. Table. 1 demonstrates the total number of population entities created during the simulation runs as depicted in value column. Table 2 shows that the entities that enter are processed and exit the server object. The entities that individually pass through the paths which are 14 in numbers are also shown in Table 2. Table 3 shows the rest of object statistics such as total number of female and male population, consanguineous and non-consanguineous marriages, population growth and new population which is in process while passing through the server objects. Any model can be validating by importing and exporting data in Excel sheet through this SIMIO software.

Model Validation
As our main contribution is to provide a DEVS framework to model consanguinity and then demonstrate how a consanguinity model can be simulated in modern simulation software Simio, but the presented simulation model of consanguinity can easily be validated across the data available in different research studies. The data available in these studies are mostly presented in tables such as in 1974 a study was presented which provides quite uselful statistics regarding consanguinity [51], likewise M. Afzal, et al. has also provided a statistical based survey to access the "prevalence of consanguinous marriages, and the differentials by age at marriages,fertility and mortality experiences of the women who were married to their cousins and others" [52].
Another important study which can be use to validate our model was presented in 2001 by Rittler, M., et al. which was based on the statistical data obtained from Latin-American Collaborative Study of Congenital Malformations (ECLAMC) during the period from 1967 to 1997 to analyzed the association between parental consanguinity and congenital anomalies [53].
Similarly many other studies conducted in Saudia [54] and Norway [55] can also be useful in vatidating our model.

Conclusions and Future Work:
In this study, we have developed a DEVS model of a population and used to study the in silico emergence of consanguinity in the offsprings. The main idea of this study was to take the first steps towards answering questions such as: what are the rates of consanguinity which can cause an increasing impact on the emergence of birth defects in a population? Therefore, it is important to model consanguinity in order to acquire a complete picture of congenital defects trends. Our contribution is a DEVS-based model of consanguinity which reveals a new population with a probability of congenital disorders due to consanguineous and non-consanguineous marriages followed by simulation using the Simio simulation software. Our results show that DEVS can be used effectively to model biological problems. In the future, we plan on applying the DEVS formalism to specific congenital disorders due to consanguinity.  property which means that all of the objects generate dynamic entities. This assists in quickly viewing the total numbers of generated entities or individuals.     other. Experimental frame specifies the conditions or environment in which system is experimented with, source system is the real or virtual system which is to be modeled, model is a mathematical representation of any system or structure and data is usually gathered by observing it and simulator is a software which follows model instructions and generate particular behavior of a real system.     Step" for random offspring generation. This figure shows the Properties for creating offspring randomly. To create offsprings, within the "Processes" window, use the "Create Step" to change the "Object Instance Name" to "Child" and "Number of Objects" to "Random.Discrete" distribution based on information provided regarding how many children per couple to create. For example, this figure shows that 10% of the population has 0 children, 20% has 1 child, 30% has 2 children, 30% has 3 children, 8% has 4 children and 2% have 5.

Experimental frame
Population region, religion, cousin and consanguinity type, etc.

Modeling Relation
Simulation Relation