# MCM paper
# question
While some animal species exist outside of the usual male or female sexes, most species are
substantially either male or female. Although many species exhibit a 1:1 sex ratio at birth, other
species deviate from an even sex ratio. This is called adaptive sex ratio variation. For example,
the temperature of the nest incubating eggs of the American alligator influences the sex ratios at
birth
The role of lampreys is complex. In some lake habitats, they are seen as parasites with a
significant impact on the ecosystem, whereas lampreys are also a food source in some regions of
the world, such as Scandinavia, the Baltics, and for some Indigenous peoples of the Pacific
Northwest in North America.
The sex ratio of sea lampreys can vary based on external circumstances. Sea lampreys become
male or female depending on how quickly they grow during the larval stage. These larval growth
rates are influenced by the availability of food. In environments where food availability is low,
growth rates will be lower, and the percentage of males can reach approximately 78% of the
population. In environments where food is more readily available, the percentage of males has
been observed to be approximately 56% of the population.
We focus on the question of sex ratios and their dependence on local conditions, specifically for
sea lampreys. Sea lampreys live in lake or sea habitats and migrate up rivers to spawn. The task
is to examine the advantages and disadvantages of the ability for a species to alter its sex ratio
depending on resource availability. Your team should develop and examine a model to provide
insights into the resulting interactions in an ecosystem.
Questions to examine include the following:
What is the impact on the larger ecological system when the population of lampreys can
alter its sex ratio?
What are the advantages and disadvantages to the population of lampreys?
What is the impact on the stability of the ecosystem given the changes in the sex ratios of
lampreys?
Can an ecosystem with variable sex ratios in the lamprey population offer advantages to
others in the ecosystem, such as parasites?
# Paper begin
# Summary
In this study, we first innovatively constructed a dynamic simulated ecological environment through the *Netlogo model*, and thoroughly investigated the multifaceted impacts of changes in the sex ratio of seven-gill eels on the entire ecosystem. Then we used a variety of models and methods to synthesize the analysis around research questions I to IV.
For problem 1: We use analytic Hierarchy Process (AHP) and LA model to quantify the relationship between various factors and study the multi-level impact of sex ratio change on the ecosystem. Through AHP, we derive the weight allocation of the impact of sex ratio changes on the ecosystem, while the LA model optimizes the decision-making process. The results show that changes in sex ratio significantly affect adaptation, resource utilization and species diversity, and provide a key ecological balance mechanism for the system.
For problem 2: Using a comprehensive evaluation method and genetic algorithm, we considered the advantages and disadvantages of the lamprey population in a comprehensive manner. Through the parameter optimization of the genetic algorithm, we gained a deeper understanding of the advantages of the dynamic adjustment of the sex ratio of the lamprey on its own reproductive growth. By cross-corroborating the two models, we conclude that the ecological advantages of dynamically adjusting the sex ratio far outweigh the disadvantages. The ecological adaptations and advantages demonstrated by lampreys through the flexible adjustment of sex ratios dominate in maintaining ecosystem balance and diversity.
For problem 3: Using the eigenvalue method of differential equation combined with Jacobian matrix, we deeply discuss the effect of sex ratio change on ecosystem stability. Eigenvalue analysis reveals the key role of sex ratio in maintaining ecosystem stability. Our conclusion emphasizes that the change of sex ratio is an important factor in the dynamic balance of ecosystems and provides scientific basis for ecological conservation and management.
For problem 4: Using system dynamics and ecosystem interaction models, we comprehensively consider the complex relationships between lampreys and other species. By simulating ecological interactions under different scenarios, we found that changes in sex ratios have positive effects on other species and maintain the relative balance of the entire ecosystem.
Sensitivity analysis: We conducted an in-depth sensitivity analysis of all models to verify the reliability of the models in different scenarios. The steps of sensitivity analysis involve a systematic study of changes in the key parameters of each model. In the AHP and LA models, we adjusted the weights and decision parameters and simulated different decision scenarios to assess the sensitivity of the models to changes in the sex ratio. For the comprehensive evaluation method and the genetic algorithm, we vary the operational parameters of the genetic algorithm, such as the crossover rate and the mutation rate, and observe the optimization results of the population under different parameter Settings. In differential equations combined with Jacobian matrix, system dynamics and ecosystem interaction models, we adjusted the key parameters in the equations to evaluate the model's response to changes in sex ratio by simulating ecological dynamic processes under different conditions. This series of sensitivity analysis helps to identify the key factors affecting the results in each model, and provides strong support for the reliability and robustness of the model.
Pros and cons evaluation and outlook: All models are comprehensively evaluated, and the advantages and disadvantages of each model are summarized. Despite some simplifications and assumptions, these models provide insights into understanding the combined effects of changes in lampreys' sex ratios on ecosystems. Looking to the future, the authenticity and reliability of the model can be further improved by introducing more ecological parameters and field observation data to support more accurate ecological management.
# Keywords
Lampreys, sex ratio change,Netlogo, Analytic Hierarchy Process, Lotka-Volterra model, Comprehensive evaluation Method, Genetic algorithm, Jacobian Matrix and eigenvalues, System dynamics, ecosystem interaction model
*Contents*
1.2 Problem Restatement and Analysis
4 Preliminary conclusions obtained by Netlogo simulation
4.2 Netlogo solves problem one, two, three, four
5 Effect of variable sex ratio in lampreys on bigger ecosystem
5.1 Analytic Hierarchy Process (AHP)
6 Advantages and disadvantages of variable sex ratio for lampreys populations
6.1 Integrated assessment method
7 Effects of variable sex ratio of lamprey on ecosystem stability
7.1 Not considering the prey of lampreys
7.2 Consider the prey of lampreys
8 Effects of variable sex ratio in lampreys on other species
8.2 Ecological Interaction Model
9.2 Lotka-Volterra sensitivity analysis
9.3 Comprehensive assessment sensitivity analysis
9.4 Sensitivity analysis of genetic algorithm
9.5 Sensitivity testing of eigenvalue models using differential equations
9.6 Sensitivity analysis of system dynamics
9.7 Sensitivity analysis of ecological interactions model
10 Model Evaluation and Further Discussion
# 1 Introduction
# 1.1 Background
*Sea lampreys* live in lake or sea habitats and migrate up rivers to spawn, which have unique position in the study of biology and ecology. Both predatory and parasitic relationships.
One of the most striking features for lampreys is that their sex can vary according to resource availability. In environments where food is plentiful and growing conditions are favorable, larvae are more likely to develop into larger females, while in environments where resources are scarce, larvae tend to develop into smaller males.This mechanism of sex change may be an adaptive evolutionary strategy that allows the lampreys to adjust its sex ratio to environmental conditions to optimize reproductive success and resource use efficiency.
The task focus the sex ratios of sea lampreys under resource availability can provide insights into biological adaptation, sex determination, and ecosystem management.
# 1.2 Problem Restatement and Analysis
*Problem One:* What are the overall effects of adjusting the sex ratio of lampreys populations on the entire ecosystem? This requires us to explore how changes in sex ratios shape the ecological role of lampreys in the wider ecosystem, and to fully understand ecosystem interrelationships through modeling and analysis.
*Problem Two:* What are the advantages and disadvantages of the changing sex ratio for Lampreys? This requires a systematic assessment of the effects of sex ratio adjustment, including advantages such as adaptation, population control and genetic diversity, as well as disadvantages such as fluctuations in reproductive rate and competition for resources.
*Problem Three:* How do changes in the sex ratio collectively affect the stability of the entire ecosystem? Differential equations and Jacobian matrices can be used to explore the effects of sex ratio changes on ecosystem stability, especially when considering factors such as parasites.
*Problem Four:* Do lamprey ecosystems with changing sex ratios have an overall advantage over other species, such as parasites? System dynamics and ecological interaction models can be used to further study the combined effects of sex ratio changes on other species, including advantages in terms of stability, adaptation and niche differentiation.
# 1.3 Overview of our work
To avoid complicated description, intuitively reflect our work process, the flow chart is show as the following figure:
*Picture 1 Our working flow chart*
# 2 Assumptions
*Assumption 1*: The growth of the lamprey population approximately follows the Logistic model, with a maximum number allowed by environmental conditions, i.e., the carrying capacity K. The environmental resistance to the lamprey population increases proportionally with population density.
*Assumption 2*: We only consider parasitic marine lampreys, whose juvenile lampreys feed on plankton and are preyed upon by fish and birds, and adults parasitize large fish, with parasitism actions reducing the survival and reproductive capabilities of the host fish.
*Assumption 3*: The sex of lampreys is directly influenced by the amount of food resources acquired during the larval stage in a linear manner.
*Assumption 4*: It is assumed that the number of male lampreys always exceeds that of female lampreys in the natural environment, and the birth rate is proportionally related to the female sex ratio. *Justification*: The data shows that the sex ratio of adult lamprey populations almost always has more males than females. Hadisty and Potter (1971) found that this ratio varies from nearly equal to males nearly five times that of females. Knowing that both male and female lampreys die immediately after mating and spawning, it suggests that lampreys mate only once in their lifetime. The higher the female ratio, the higher the birth rate.
# 3 List of Notation
Table 1: Notations used in this paper
*Symbol* *Description* A large ecosystem  Ecological balance, biodiversity, energy flow  Population characteristics of lampreys  Ecosystem impact factors W Composite for initial evaluation of question two_ Indicator  Question three: Interactions between predators and prey SR Sex Ratio FA Food Availability RR Reproductive Rate P Predtion HU    Habitat Utilizationpopulation size of the lampreysintrinsic growth rate of the lamprey populationcarrying capacity of the lamprey populationthe intrinsic growth rate of the parasite population # 4 Preliminary conclusions obtained by N****etlogo simulation
# 4.1 Preliminary setting
Our time was refreshed by 0.1s. In our analysis and solution, we found that netlogo virtual simulation software could be used to simulate a simplified version of the fish ecosystem to initially judge a series of effects of the changes in the sex ratio of lampreys. We first set a series of conditions on netlogo with code: the color of the male lampreys is pink, and the initial energy is a random number of 6 to 16. Female Lampreys are red in color and have an initial energy of a random number from 1 to 10. Male lampreys have a feeding efficiency of 35% and female lampreys have a feeding efficiency of 20%. The color of the lake trout is blue, the energy is set to infinity (relative to the lampreys), and the initial number is set to 1/5 of the total number of lampreys, which can continuously gain energy on the lake trout. We set the color of the bacteria to purple, the initial number to 200, the reproduction rate to 2000%, carrying energy 0.5. The algae are green in color, have an initial number of 50, a reproductive rate of 2500%, and carry energy 2. We set the lampreys to consume 0.5 per step, and they die when they reach negative energy. Lampreys can reproduce at a specified time (time lapse mod40=30~40), when any two lampreys of the opposite sex can mate and produce 12~18 small white fish, both parents die immediately after producing offspring. Baby Lampreys have a 75% chance of dying as they grow. If the baby lampreys survive mod40>10, they can be transformed into male or female lampreys depending on the amount of food resources around them. The specific rules are as follows:When there is plenty of food around (algae + fungi + lake trout more than 60% of the area), small fish are 56% more likely to become male.When there is not enough food around (algae + fungi + lake trout less than 30% of the area) the small fish are 78% more likely to become female lampreys.The proportion of small fish becoming males varies linearly between 56% and 78% according to the resource area.We also created human fishing rules, and we set the environment for lampreys to be able to sustain K.When the number of lampreys is greater than K of the square root of two fractions, humans catch 40-60% of lampreys at a time (of which 10% are juveniles, 60% are females, and 30% are males).
Based on this preliminary setting, the dynamic changes of lampreys are simulated to derive the initial trend.
# 4.2 Netlogo solves problem one, two, three, four
Picture 2 Dynamic simulation of each element with netlogo
As for problem 1, the larger ecosystem can be determined by the total resources and human predation. When lampreys can dynamically adjust their energy change according to the resource ratio, and when we adjust the sex ratio of lampreys from 56% to 78%, the curve shows that the total resources of the ecosystem are basically unchanged after 50 iterations.
For the analysis of problem 2, when we remove the effect that lampreys can dynamically adjust the sex ratio with respect to the surrounding resources, we find that the total resources of the ecosystem and the total amount of lampreys both show a downward trend. It turns out that lampreys' ability to adjust their sex ratio helps them grow and compete.
For question 3, we found that when lampreys were able to adjust their sex ratio, the human catch would first remain at a stable value. Secondly, the total energy of the ecosystem will remain basically consistent, and the stability of species diversity will be effectively guaranteed.
In response to question 4, we found that changes in the sex ratio of lampreys populations not only ensure the adaptability of host populations and the diversity of ecological niches, but also provide opportunities for parasite populations to stabilize and grow. Therefore, we can reasonably infer that this change in sex ratio does provide ecological advantages to other species such as parasites, especially in terms of stability and adaptability. This advantage may be critical to maintaining the overall health and diversity of the ecosystem.
# 5 E****ffect of variable sex ratio in lampreys on bigger ecosystem
# 5.1 Analytic Hierarchy Process (AHP)
# 5.1.1 Model Establishment
In hierarchical analysis, we hierarchized the problem as influencing the macroecosystem in terms of orientation (A), ecological balance (B1), biodiversity (B2), energy flow (B3), population size (C1), changes in sex ratios (C2), birth mortality rate (C3), natural and anthropogenic influences (D1), food abundance (D2), hatchery environmental conditions (D3), the waters of the effects of other organisms (D4), seasonal variation (D5), water quality conditions (D6), and temperature effects (D7). At the same time, we establish the hierarchical diagram as follows:
Created a judgment matrix B=
C=
We calculate the weight vector of B from the code as [0.93103448 0.03448276 0.03448276]
A hierarchical general ordering table for B and C is then created as follows.
Table 2 A hierarchical general ordering table for B and C
Also we get the judgment matrix of D under C1~3
Table 3 The judgment matrix of D when C1, C2, and C3 are fixed respectively
# 5.1.2 Model solution
For *C**1**, C**2**, and C**3* fixed we compute the weight vectors D****1~7**** to get the following table.Multiplying the weights of criterion layer 2 by the coefficients, i.e., multiplying the individual influences by the criterion layer weights, yields:
*Table 4* *table of total weights*
*Picture 4* *Various factors affect the heat map*
# 5.1.3 Results and Analysis
As can be seen from the above table:
(i)The population dynamics of lampreys were greatly affected by the change of sex ratio, followed by the population size. Changes in the sex ratio may directly affect the growth and dynamics of the population. At the same time, species such as lampreys may have complex social structures and behavioral patterns, including courtship behavior and breeding seasons. In these social structures, changes in the sex ratio may cause changes in behavior patterns and dynamics within the population, thus affecting the stability and dynamics of the entire population. Changes in lamprey population size can be relatively stable, as ecosystems usually have a certain carrying capacity. It can be seen from the weight table that the weight of gender ratio in layer C is the highest (1.137930), so the influence of gender ratio on many levels cannot be ignored.
(ii)It can be seen from the heat map that the sex ratio has the largest or larger influence on the other seven factors, so the sex ratio can affect the population dynamics of lampreys by influencing, for example, the population size of lampreys, the population size of lampreys and the birth mortality rate of lampreys. The change of lampreys population dynamics not only has an impact on the ecological balance and energy flow of the ecosystem, but also has a strong impact on the activities of other organisms. In our view, this effect is positive for the larger ecosystem, which is conducive to improving the stability of the larger ecosystem. In order to keep the energy of the large ecosystem in a specific range, and dynamically regulate the ecological balance and biodiversity to maintain a stable range.
# 5.2 Lotka-Volterra model
# 5.2.1 Model Assumptions
Our model is predicated on the ecological premise that the sex ratio of marine lamprey populations is a variable trait influenced by environmental factors such as food availability. In our assumptions, we consider the following variables:
Sex Ratio (SR): A continuum from 0 (all male) to 1 (all female), affecting reproductive rates and predation dynamics.
Food Availability (FA): A key factor influencing the sex ratio and growth rates within the lamprey population.
Reproductive Rate (RR): Tied to the sex ratio, determining the potential for population increase.
Predation (P): Reflecting the food chain's impact, with humans as a primary predator, influencing lamprey survival rates.
Habitat Utilization (HU): The lampreys' response to environmental conditions, which may affect their migratory and spawning behaviors.
These factors form the basis of our ecological simulation, where we seek to understand how adaptive changes in sex ratio can affect the broader ecosystem in terms of resource allocation, population dynamics, and overall ecological balance.
# 5.2.2 Model Establishment
For codes 1.1 to 1.6, we utilized polynomial fitting to model the impact of sex ratio changes on various ecological variables. The polynomial fitting is an analytical approach used to model relationships between variables in a system where linear assumptions are inadequate. In our case, we use a 3rd degree polynomial to fit the relationship between the gender ratio and food supply, which can be expressed as:
Where:
N is the prey population (lampreys), P is the predator population (humans),r is the intrinsic growth rate of the prey,K is the carrying capacity of the prey,
α is the predation rate coefficient,
β is the growth rate coefficient of predators,
 is the death rate of predators.
These equations allow us to model the dynamic feedback loop where the prey's growth is limited by the carrying capacity and predation, while the predator's growth is fueled by the successful capture of prey but tempered by their own mortality.
In your code for code 1.7, the variables are adjusted to reflect the influence of food availability on gender ratio and its subsequent impact on reproductive success and food resource sustainability. The simulation captures how the lamprey population, when considered as prey, is affected by the changing sex ratios and how this, in turn, affects the predator population over time.
*Picture 5 Simulated Gender Ratio in Response to Food Availability Picture 6 The effect of sex ratio on different variables*
# 5.2.3 Conclusions
Our model suggests that the marine lamprey's capacity to modify its sex ratio is a significant evolutionary adaptation with profound implications for the ecosystem. An optimal sex ratio can enhance reproductive success, fortify the species' position in the food chain, and improve the sustainable use of food resources. However, these benefits are not without their drawbacks; imbalances may expose the population to increased predation pressure and reproductive challenges, particularly in the face of environmental stressors such as overfishing and habitat degradation.
In conclusion, the marine lamprey's ability to alter its sex ratio in response to environmental conditions underscores a delicate ecological dance of adaptability and vulnerability. This balancing act is critical to the maintenance of ecosystem health, offering a window into the complex interdependencies that govern life within our waterways. Our findings shed light on the pivotal role that sex ratio variability plays in ecological resilience and resource management, providing key insights for the conservation and management of these unique species.
# 5.3 Conclusion
Combining the results of the two models, we conclude that the species has the adaptive sex ratio adjustment ability, which has a profound impact on the ecosystem. An optimal sex ratio enhances reproductive success, strengthens the position of species in the food chain, and enhances the sustainable use of food resources. However, this adaptation also brings challenges, and an unbalanced sex ratio can increase predation pressures and reproductive challenges faced by populations, especially in the presence of environmental pressures such as overfishing and habitat degradation.
Overall, the ray population shows a delicate balance between adaptability and vulnerability in the ecosystem through sex ratio adjustment. This balance is critical to maintaining ecosystem health and provides a window into the complex interdependencies of life in our waters. Our study reveals the key role of sex ratio variation in ecological resilience and resource management, providing important insights into the conservation and management of these unique species.
# 6 Advantages and disadvantages of variable sex ratio for lampreys populations
# 6.1 I****ntegrated assessment method
# 6.1.1 Model Estabilishment
According to the Netlogo fitting results in point 4 we can see the advantage of the seven-gill eel that can dynamically regulate its sex ratio:
*Adaptable:* the ability to adjust the sex ratio to environmental conditions improves the ability to survive and reproduce in resource-limited environments.
*Population control:* By adjusting the sex ratio, lampreyeels are able to control their population size more effectively and reduce excessive competition.
*Genetic diversity:* changing sex ratios may promote genetic diversity and thus increase the adaptive capacity of populations.
The disadvantages are:
*Fluctuations in reproductive rates:* If one sex is too dominant in a given environment, this may lead to a reduction in reproductive opportunities, affecting the long-term stability of the population.
*Competition for resources:* Changing sex ratios may exacerbate same-sex competition, especially if food or mates are limited.
Through academic search on google, we built a comprehensive evaluation model after borrowing the paper of William D. Swink.[1]: firstly, we set up the number of initial predators, reproductive success, reproduction process, predation rate, and food resources, and then we set up the parameters to simulate the different sex ability and species change of the lampreyeel, and to simulate the population change of predators and so on.
The initial evaluation indicator is obtained in our code by W = 0.4 * gender_ratio[gen] + 0.3 * predator_population[gen] + 0.2 * reproductive_success[gen] + 0.1 * food_resources[gen].
The probability of predation on lampreyP = 0.2*(1-gender_ration[gen ]) to represent the effect of the gender shift on the lampreypopulation.
The following code iterates the W loop 50 times.
Then set the weights of the eight variables, i.e.Predation Control=0.2*、Food Chain Role=0.3、Adaptability=0.1、Predation Threat=0.1random(0.1,0.2)、Reproduction Threat=0.2random(0.2,0.5)、Overfishing Risk=0.4random(0.4,0.8)、Environmental Pressure=0.1(0.1,0.5),ecosystem_provider=0.2*
Data Setting Analysis:We set the weight of transitional predation by humans to 0.4 and used a random function (0.4,0.8) for the parameter settings, this is due to the fact that human fishing is the main cause of mortality in lampreyeels. Then we set the weight of reproductive threat to 0.2 and the random number set to (0.2,0.5), this is due to the fact that the juvenile mortality of the lampreyeel is also to important cause. And according to William's article, setting Adaptability to the standard deviation of W is necessary. Setting the role of the lampreyeel in the food chain as the maximum value of W, which can reflect the status of the lampreyeel. And his Predation Control set to the mean value of W also responds well to the function of the seven-gill eel. Here the total energy provided by the ecosystem is recorded as the cumulative sum of W.
The final comprehensive evaluation equation is overall_score=
,X for the factors mentioned above.
# 6.1.2 Results and Analysis:
The results demonstrated that with the output of the model, we output the sex ratio in the 21 cases of (0,1,0.05) which is overall_score with the specific values of the eight factors and plotted the heat map between the models.
*Picture 9 Thermal map representation of the relationship between the influencing factors*
Through comprehensive evaluation, we can see that, first of all, we observe picture 7, where the food Chain Role increases with the increase of male proportion, which is caused by the fact that males of lampreys have a stronger ability to obtain resources than females. When lampreys have fewer resources or are attacked by predators, increasing the male ratio helps them reduce mortality and improve their status in the ecological chain. Secondly, we pay attention to the change of predation control. In the range of male possibility value (greater than 50%) of lampreys, the threat of predation slowly decreases with the increase of male proportion. Finally, we pay attention to the change of environmental pressure, and we can see that the environmental pressure decreases with the increase of male proportion after 50%, which also means that the environmental pressure on lampreys decreases with the increase of male proportion. And as you can see from Picture 8, the total resources of the ecosystem do not change as the proportion of male lampreys increases, which means that the ecological balance will not be affected, but the adaptability of lampreys will be enhanced.
So let's look at the last line of the heat map. It can be seen that the male ratio of lampreys is correlated with all factors, with the strongest correlation for favorable factors, which is shown in red in the figure. However, the association with adverse factors was small, suggesting that an increase in the sex ratio of lampreys can effectively enlarge its beneficial effects and reduce its adverse effects.
According to our analysis, the most important advantage of regulating the sex ratio of lampreys is to increase the net birth rate: when food is scarce, an increase in the proportion of males reduces the competition for food and improves the success of mating, and when food is abundant, an increase in the proportion of females increases the number of eggs laid and thus the number of offspring.
Possible disadvantages include: Reduced fertility: When the proportion of males is too high, it may lead to a lack of females, thereby reducing reproductive rate and genetic diversity. When the proportion of females is too high, it can lead to excessive consumption of food, which can affect their growth and health. [Note, this is not inconsistent with advantage, but in a different dimension of thinking about the problem] or over-parasitical other species, resulting in resource damage, population increase, overfishing, disruption of ecological balance, affecting population diversity
# 6.2 [Genetic Algorithm](javascript:)
# 6.2.1 Model Assumptions
Our genetic algorithm-based model is founded on the premise that adaptive sex ratio variability is a response to environmental pressures. In the case of the marine lamprey, whose sex determination can be influenced by factors such as food availability during larval development, this adaptability may provide a distinct survival advantage. We assume that in environments where food is scarce, a higher proportion of males could reduce intraspecific competition for resources, while in resource-rich settings, a balanced sex ratio could maximize reproductive opportunities. Nonetheless, these adaptations are not without their trade-offs, as a skewed sex ratio could lead to decreased breeding options and heightened vulnerability to environmental stressors.
# 6.2.2 Model Establishment
Our modeling process begins by initializing a population of potential solutions, represented by binary-encoded DNA. The DNA_LENGTH is set to 24, indicating that each individual solution comprises 24 'genes'. The POP_SIZE of 200 specifies that we will simulate 200 potential sex ratio strategies within the lamprey population. CROSSOVER_RATE at 0.8 and MUTATION_RATE at 0.005 are probability thresholds dictating how often genetic mixing and random mutations occur, respectively, throughout our generations of evolution.
In the context of lamprey populations, we are particularly interested in how the sex ratio—ranging from 0 (all male) to 1 (all female)—and food availability—also scaled from 0 (lowest) to 1 (highest)—affect the overall fitness of the population. Fitness is a measure of how well each strategy copes with environmental conditions and is calculated by the simulate_environment function, which considers the deviation from an expected sex ratio based on food availability.
*Picture 10 Genetic algorithm design flow chart*
# 6.2.3 Results and Analysis
*Picture 11~16 Food Availability, Food Chain Status, Adaptability, Overfishing, Reproduction threatened and ambient pressure were taken as the y axis, and sex ratio was taken as the x axis. The calculation is a 3D scatter plot of the z axis*
Our simulations reveal that the marine lamprey's ability to adjust its sex ratio confers several advantages. It allows the population to adapt to varying levels of food availability, improves its position in the food chain by optimizing resource allocation, and exhibits remarkable adaptability to environmental conditions. However, the disadvantages become apparent when reproductive opportunities are threatened, or the population faces environmental pressures such as overfishing, which leads to a decrease in fitness. Thus, while the adaptive sex ratio variability of the lamprey population provides certain ecological benefits, it also poses significant risks, underscoring the delicate balance this species maintains within its ecosystem.
# 6.3 Conclusion
Lampreys show multiple ecological advantages by dynamically regulating the sex ratio. First, increasing the proportion of males increases their position in the food chain, and males are better at resource access, especially when resources are scarce or threatened by predation, which helps to reduce mortality and improve survival competitiveness in the ecological chain. Secondly, adjusting the sex ratio makes lampreys more adaptable, able to flexibly respond to environmental changes, and improve the success rate of survival and reproduction. In addition, an increased male ratio could help reduce predation threats to lampreys, reducing predation pressure and maintaining a more stable population. Finally, the model showed that environmental stress was significantly reduced when the proportion of males was more than 50%, suggesting that the presence of lampreys helped to reduce ecosystem pressure on them and promote the maintenance of ecological balance.
But sex-ratio adjustment comes with some potential disadvantages. One of these is that it can lead to reduced reproductive opportunities, when the proportion of males is too high there may not be enough females, reducing reproductive rate and genetic diversity. In addition, if the proportion of females is too high, it can lead to overpredation and resource consumption, negatively affecting the growth and health of lampreys. At the same time, factors such as overfishing and environmental pressure may also cause resource damage, excessive population growth, overfishing and other problems, destroy the ecological balance and affect the diversity of the population. Therefore, while enjoying the multiple advantages brought about by sex ratio adjustment, it is also necessary to carefully deal with some disadvantages that may be triggered in order to maintain the balance and stability of lampreys in their ecosystem.
However, for lampreys, the ecological advantages shown by dynamically adjusting the sex ratio far outweigh the disadvantages. This ability to adjust allows lampreys to respond flexibly to different environmental conditions, improving their survival and reproductive success. By optimizing their position in the food chain, mitigating the threat of predation, and reducing environmental stress, lampreys are able to better adapt to complex ecological environments and maintain their balance in the ecosystem. Despite some potential disadvantages, such as reduced reproductive opportunities and increased environmental pressures, the benefits of sex ratio regulation can be better realized through careful management and integrated consideration of the complexity of ecosystems. Thus, overall, lampreys' ecological adaptations and advantages, demonstrated through flexible regulation of sex ratios, dominate in maintaining balance and diversity in their ecosystems.
# 7 Effects of variable sex ratio of lamprey on ecosystem stability
We use differential equation - Jacobian matrix to find eigenvalues to judge the stability of ecosystem. Select the points whose derivative or partial derivative is equal to zero, and analyze these points to calculate the Jacobian matrix near the stable point, and analyze its eigenvalue. We calculate the Jacobian matrix at two stable points (origin and non-zero stable point) and solve their eigenvalues. These eigenvalues can be used to analyze the stability of the system at these points. The real parts of the eigenvalues tell us how the system behaves around these points: if the real parts of the eigenvalues are all negative, then the system is locally stable at that point; If the real part of at least one eigenvalue is positive, the system is unstable at that point.。
# 7.1 Not considering the prey of lampreys
We use the Rottka-Volterra model differential equation, namely:
The stability of the ecosystem is understood here as a stable population of lampreys and their natural predators. Initialize Natural_Growth_Rate = 0.5+0.5* (gender_ratio[gen] -0.5), make the probability of predation of lampreys β=0.4* (1-gender_ratio), initialize the number of lampreys and the number of predators, and iteration 200 times. According to the output model of the Jacobi equation, the ecosystem is stable when the male proportion is 55% to 81%, and unstable at the rest of the time.
*Picture 17 Population dynamics of lampreys and their predators*
# 7.2 Consider the prey of lampreys
At this point we call the ecosystem differential model:
Where G is the number of prey, R is the number of prey, and E is the number of predatorsSimilar to 7.1, we added that the predation ability of lampreys increases with the increase of males. Then we performed the Jacobian operation on these three equations, and we were surprised to find that the ecosystem was stable within the range of 50% to 82% males.
# 7.3 Conclusion
Based on the results of the study, the change in the sex ratio of lampreys has a positive effect on maintaining the stability of the ecosystem. Without taking into account parasitism, studies have shown that the ecosystem is relatively stable at a male ratio of 55% to 81%. This suggests that lampreys have the ability to promote a relatively balanced ecosystem within a specific range of male ratios by dynamically adjusting the sex ratio. In the case of lampreys as parasites, the ecosystem remained relatively stable in the 50 to 82 percent range, even with the increased male ratio. This indicates that the regulation of the sex ratio of lampreys can maintain the relative balance of the ecosystem in a wider range, so that the ecosystem shows a certain resilience to the change of sex ratio.
Combining the two models, we can see that lampreys show positive effects on ecosystem stability by adjusting the sex ratio, providing a regulatory mechanism for ecological balance. This regulation of ecosystem stability may be related to lampreys' ecological roles in resource utilization, predation control and adaptation, contributing to their relative balance in a complex ecological environment. The excess of the interval constructed by the model indicates that even when lampreys are hit by sudden shocks or sudden natural disasters, the sex ratio breaks through the normal interval, they can still maintain their relative stability.
# 8 Effects of variable sex ratio in lampreys on other species
# 8.1 System Dynamics
# 8.1.1 Model Assumptions
Our model is predicated on the assumption that the sex ratio of marine lamprey populations, represented as R(T)=F(T)/M(T), can significantly affect ecological dynamics within their habitat. Given the dependence of parasites on their hosts, any fluctuations in the lamprey population—attributable to changes in the sex ratio—could provide an ecological advantage to these parasites. Specifically, we hypothesize that:
A higher reproduction rate, facilitated by an abundant food supply P(t), will lead to an increase in the lamprey population, subsequently benefiting the parasite population due to increased host availability.
Parasites might exhibit resilience by maintaining or even increasing their population in the face of fluctuating food supplies, suggesting an advantage in their life cycle and infection strategies that allow survival and propagation when host numbers vary, as expressed by the dynamic
, where represents the survival rate of parasites.
# 8.1**.2** Model Creation Process
In constructing our model, we employed a systems dynamics approach to articulate the complex interplay between lamprey populations, parasite populations, and the food supply. The core parameters of our model include:
The lamprey population over time, **N(t)**, influenced by the birth rate **b** related to the female lamprey population **F(t)** and the death rate **d**, as well as the external food supply **P(t)**.
The parasite population over time, *P(t)**, which depends on the lamprey population as its host and is subject to the survival rate *s** and death rate *d***p****.
The food supply, **P(t)**, which directly impacts the reproduction rate of lampreys, thereby influencing the availability of hosts for parasites.
The model is expressed through differential equations that delineate the growth or decline of both the lamprey and parasite populations, incorporating the variables of birth **b**, death **d**, and survival **s** rates
These equations represent the core of our dynamic model, capturing the interdependencies and feedback loops within the ecosystem influenced by the sex ratio of the lamprey population.
# 8.1.3 Results and Analysis
*Picture 19~20 Population changes of LamPrey and Parasite under High Food Supply(19) and Low Food Supply(20)*
Figure 19 and Figure 20 show that :
Under high food availability, both lamprey populations and parasite populations show an increasing trend . This may be due to the fact that high food availability increases the reproduction rate of lamprey, which in turn provides more hosts for the parasites. Under low food availability, the growth rate of the lamprey population was slower, but the parasite population was still able to grow. Despite the slowdown in lamprey growth, this did not appear to prevent the expansion of the parasite population. These observations suggest that parasitoids show some advantage in this model in that they are able to maintain and even grow populations in spite of changes in lamprey populations. This advantage may stem from their life cycle and infection strategy that allows them to survive and reproduce when host populations fluctuate.
In conclusion, the model suggests that parasites can leverage variations in the sex ratio of the lamprey population to their advantage, as they are able to grow under various food supply conditions. The ability of parasites to thrive even when food supplies are low, potentially due to a higher number of females during times of resource abundance, points to a significant ecological advantage.
# 8.2 Ecological Interaction Model
# 8.2.1 Model Assumptions
In our Ecological Interaction Model, we begin by hypothesizing that variations in the sex ratio of the marine lamprey population can significantly affect reproductive success rates and survival strategies. This, in turn, may have cascading effects on the growth patterns of associated parasitic populations. We postulate that:
The sex ratio can shift dynamically in response to environmental pressures.
These shifts can lead to differentiated reproductive roles and success rates between genders.
Parasites will respond indirectly to these changes due to their dependence on the host population's structure and density.
For the lamprey population dynamics:

*Picture 21 Dynamics of Lamprey and Parasite Populations*
The variable sex ratio of lamprey populations do offer an advantage to other species in the ecosystem, such as parasites. This advantage is reflected in several key aspects:
l Sex ratio changes and population stability:
The graph shows that although the lamprey population declined rapidly initially, it stabilised over time. This stabilisation may be a direct effect of the sex ratio change on the ecosystem, providing a stable host population for the parasites, allowing their population to expand and remain stable. Stable host populations provide a continuous resource for the parasites, allowing them to not only survive, but to reproduce.
l The ability to adapt to the environment:
Changes in sex ratios may lead to increased adaptability of lamprey populations to different environmental conditions. For example, during periods of food scarcity, an increase in the proportion of males may help to reduce competition for limited resources, which provides a more stable environment for the parasite as the host population does not collapse due to food shortages.
l Ecological niche occupancy:
Changes in sex ratios may mean that male and female lampreys have different roles in the ecosystem. This may lead to changes in ecological niches that provide new or underutilised resources for the parasites, thus increasing their chances of survival and reproduction.
l Long-term symbiotic relationships:
The steady growth of parasite populations in the charts suggests that, despite the limited number of hosts, the parasites have adapted to the conditions and have developed a long-term symbiotic relationship with their hosts. This relationship may be caused by changes in sex ratio, as such changes help to limit the growth of parasite populations and prevent them from causing excessive damage to their hosts.
# 8.3 Conclusion
In conclusion, our two models demonstrate that variable sex ratio of lamyprey offer significant ecological advantages its parasitic counterparts.
These changes in sex ratio not only promote population stability but also enhance adaptability to environmental variations, offering a consistent resource base and food supply for parasites. They are able to grow under various food supply conditions and when food supplies are low, potentially due to a higher number of females during times of resource abundance.
Additionally, the alterations in sex ratio lead to ecological niche differentiation, thus providing new opportunities for parasitic population expansion. The establishment of long-term symbiotic relationships also suggests that prudent adjustments in sex ratio can maintain a balance between hosts and parasites, which is essential for the health and diversity of the entire ecosystem.
# 9 Sensitivity Analysis
# 9.1 AHP sensitivity analysis
# 9.2 Lotka-Volterra sensitivity analysis
The sensitivity analysis of model parameters is a critical step in understanding the dynamics of ecological system models. In our Lotka-Volterra model, we conducted a sensitivity analysis on the predation rate (r) and the predation efficiency (beta). These parameters directly affect the interactions between prey and predator populations over time.
The sensitivity analysis results indicate that the prey population (lampreys) is highly sensitive to changes in the predation rate (r) and predation efficiency (beta). As r and beta increase, there is a significant decrease in the prey population. This sensitivity suggests that even slight variations in predation pressure can significantly impact prey numbers.
Conversely, the predator population (humans) showed a contrasting trend under certain parameter combinations. With higher rates of r and beta, predator populations initially surge but then stabilize. This may indicate that predators can adapt to changes in food supply by increasing predation activities.
The sensitivity analysis allows us to conclude that in the Lotka-Volterra model, the impact of the predation rate (r) and predation efficiency (beta) on prey populations is pronounced. The prey population exhibits high sensitivity to these changes, whereas the predator population displays greater adaptability. These findings emphasize the importance of considering these key parameter variations when devising strategies for ecosystem management and conservation.
*Picture 22* *Sensitivity analysis plots for predation rate (r) and predation efficiency (β) for the LV equation*
# 9.3 C****omprehensive assessment sensitivity analysis
We obtained the gender through records_ The line chart of the ratio overall score shows that within the achievable male proportion range, the overall score remains relatively stable. After deducing the third question, the models of the second and third questions are mutually confirmed, and the model is established.
Picture 23 Line graph of total IMRT score as a function of gender ratio
# 9.4 Sensitivity analysis of genetic algorithm
This sensitivity analysis evaluates how changes in sex ratio and food availability affect the fitness of a simulated lamprey population within a genetic algorithm framework. The analysis aims to determine the model's sensitivity to these two parameters by observing the variations in fitness outcomes.
The genetic algorithm's population was initialized with a range of sex ratios from 0 (all male) to 1 (all female) and food availability from 0 (lowest) to 1 (highest). For each combination of sex ratio and food availability, the model calculated the corresponding fitness, which represents the population's viability under those conditions.
The resulting surface plot demonstrates that fitness is highly sensitive to changes in sex ratio when food availability is low. In contrast, the model shows less sensitivity to variations in food availability when the sex ratio is near the extremes (0 or 1). The steepest gradient occurs when transitioning from a male-dominant population to a balanced or female-dominant one, particularly in environments with limited food resources.
The model displays significant sensitivity to sex ratio changes, particularly in scenarios of low food availability, suggesting that the sex ratio is a critical factor in the population's adaptability. Conversely, the population's fitness is less sensitive to food availability, especially when the sex ratio is balanced. These findings highlight the importance of sex ratio management in conservation and resource allocation strategies for the lamprey species.
*Picture 24 Sensitivity analysis of sex ratio and food availability*
# 9.5 Sensitivity testing of eigenvalue models using differential equations
When we adjust the sex ratio and parameters, within the allowable error range (5%), the stability of the ecosystem output of the code is not affected, and the model is valid.
# 9.6 Sensitivity analysis of system dynamics
This report examines the sensitivity of the total population size to variations in birth and death rates within a population model. By altering these parameters, the trends in population changes over time are observed.
The findings indicate that the population size is significantly sensitive to changes in both the birth and death rates. An increase in the birth rate leads to an upward trend in population size, while an increase in the death rate results in a downward trend. Within the parameter range analyzed in this study, the effect of the birth rate appears to be more pronounced, suggesting that it is a critical control parameter for population growth. On the other hand, an increase in the death rate decreases the population size, but the population can still sustain growth when the birth rate is sufficiently high.
In conclusion, the birth and death rates are sensitive parameters in the population model, exerting direct and significant influences on the population size. Therefore, changes in these parameters should be closely monitored in population management and conservation efforts.
*Picture 25 Sensitivity analysis of birth and death rates by system dynamics*
# 9.7 Sensitivity analysis of ecological interactions model
This report presents the findings from a sensitivity analysis conducted on a population model concerning birth and death rates. Our objective was to determine how variations in these parameters influence the overall population growth over time.
The sensitivity analysis was performed by systematically varying the birth rate between 0.01 to 0.1 and the death rate between 0.005 to 0.02. A total of 40 simulations were run, combining different levels of birth and death rates to observe their effects on the population dynamics.
The model's output indicates a direct correlation between the birth rate and population size, with higher birth rates resulting in greater population growth. Conversely, increased death rates dampen this growth, as expected. However, the population's sensitivity to changes in the death rate is less pronounced when compared to the birth rate.
The model demonstrates a high sensitivity to changes in the birth rate, with even slight increases leading to significant rises in population size. In contrast, the death rate's impact is noticeable but less influential. Therefore, we conclude that the population model is more sensitive to variations in birth rate than to changes in death rate.
*Picture 26 Ecosystem interaction modeling for sensitivity analysis of birth and death rates*
# 10 Model Evaluation and Further Discussion
# 10.1 Question One
The Analytic Hierarchy Process (AHP) offers a comprehensive analysis of multiple factors, facilitating weight calculation and intuitive insights. However, it is subjective and may not always yield precise conclusions. On the other hand, the Lotka-Volterra model allows dynamic simulation, ecosystem interactions, and adaptive analysis, albeit with the drawback of simplification and parameter uncertainty. In essence, these two models can complement each other. AHP can provide weights and relationships for broader ecosystem impacts, while the Lotka-Volterra model delves deeper into species interactions. Future development should focus on constructing a more realistic and comprehensive ecosystem model by leveraging the strengths of both.
# 10.2 Question Two
The advantage of the Comprehensive Evaluation Method lies in its ability to conduct a thorough analysis, set reasonable weights, and offer multiple perspectives. While it visually displays relationships through heatmaps, it suffers from subjective parameter setting and complexity. Genetic algorithms, with their adaptability and global search capabilities, are well-suited for complex ecosystem problems. In summary, both models have distinct advantages, and combining them allows for a more holistic understanding of the European eel's impact on the ecosystem. Future research can enhance model reliability and practicality through optimization, improved data quality, and enhanced field observations.
# 10.3 Question Three
The Ecosystem Stability Model exhibits several merits: it is built on a mathematical framework employing differential equations and Jacobian matrices, providing a scientific and systematic analysis tool. The model compares two scenarios, considering and not considering parasitism, forming a foundation for a more comprehensive understanding. By applying the model to real cases, such as changes in the gender ratio of European eels, it enhances the credibility of practical applications and offers valuable quantitative results to decision-makers. Nevertheless, the model relies on simplified assumptions and may not fully capture all factors impacting real ecosystems. Future efforts could refine algorithms and the model itself for increased precision.
# 10.4 Question Four
The System Dynamics model, based on system dynamics, comprehensively addresses the complex interactions between European eel populations, parasite populations, and food supply. Core parameters and equations are well-defined, and ecological interactions are explicitly considered. However, both models simplify other factors, such as interactions with other species. These two models complement each other, suggesting the potential for an integrated ecosystem dynamic model in the future to better understand the impact of gender ratio changes on the entire ecosystem.
# 11 R****eference
[1] William D. Swink. Host Selection and Lethality of Attacks by Sea Lampreys (Petromyzon marinus) in Laboratory Studies (2003). Journal of Great Lakes Research, 29, 307-31
[2] RYAPOLLOVA N I, PARSHUTA V V, MINTAS A R. Fish industry lamprey larvae breeding-keeping. SU1565441-A. BALTIISK FISH ECON. 2023-08-10. DIIDW:1991034673.
[3] DAVIS W A. Sea lamprey population control method. US4934318-A; CA2007417-A; CA2007417-C. DAVIS W A. 2023-08-10. DIIDW:1990208774.
[4] MAURINSH O K, EGGERTS B V. Lamprey fry rearing method. SU1355200-A. TSARNIKAVA KOLKHOZ. 2023-08-10. DIIDW:1988167501.
[5] WU F, XU A, ZHANG T. Performing artificial breeding of wild Siberian lamprey, by selecting matured northeast lamprey as parent, performing artificial insemination, washing and incubating fertilized egg, separating hatched eggs, and feeding hatched ones. CN104137799-A; CN104137799-B. UNIV SUN YAT-SEN. 2023-08-10. DIIDW:201505012A.
[6] ZHANG J, CHEN D, MO W, CUI J, SUN S, WANG G. Method for farming river lamprey, involves feeding eel, Penaeus white shrimp and carp into pond followed by feeding and daily management including aeration, disinfection, microbial agent application, water exchange and disease control. CN103416337-A; CN103416337-B. NINGBO CHUANGHUI VEGETABLES ENG & TECHNO; NINGBO DAQIAO ZOOLOGY AGRIC CO LTD; CIXI VEGETABLE DEV CO LTD. 2014-01-03. DIIDW:2014C16110.
[7] OpenAI.(2023)Chatgpt3.5 http://openai.com/chatgpt
*Artificial Intelligence Usage Report*
Question 1: "Please explain the Analytic Hierarchy Process (AHP) and its application in assessing the impact of gender ratio changes in ecosystems."
Output: "Analytic Hierarchy Process (AHP) is a decision analysis tool that decomposes complex problems into several factors and sub factors by establishing a hierarchical structure, and then evaluates the importance of each factor through pairwise comparison and weight allocation. In the study of gender ratio changes in ecosystems, AHP can help quantify different factors (such as resource utilization, species diversity, etc.)" The importance of impacts on ecosystems in order to optimize decision-making processes. “
Question 2: "Please provide a simplified genetic algorithm example for optimizing the simulation of adjusting the sex ratio of lampreys."
Output: "Genetic algorithm is a search heuristic algorithm used to solve optimization and search problems, imitating the process of natural selection. Simplified examples include defining a fitness function to evaluate the reproductive growth advantage of the lamprey population, and then generating a new generation of population through selection, crossover, and mutation operations, iterating continuously to find the optimal gender ratio configuration."
Question 3: "How to use system dynamics models to simulate ecological interactions between lampreys and other species?"
Output: "The system dynamics model simulates system behavior by constructing causal diagrams and differential equations between variables. In the simulation of interactions between lampreys and other species, variables including lampreys population size, gender ratio, resource quantity, and other species population size can be defined, and their changes over time can be described through a system of equations to study the impact of gender ratio changes on other members of the ecosystem."
Question 4: "Explain the application of difference equations and Jacobian matrices in evaluating ecosystem stability."
Output: Differential equations are used to describe the process of variable discrete changes over time, while Jacobian matrices are a mathematical tool used to analyze the local stability of nonlinear systems. In ecosystem stability assessment, differential equations can be constructed to simulate the dynamic changes of populations in the ecosystem. Jacobian matrices can be used to analyze the impact of gender ratio changes on system stability, identify the equilibrium state of the system, and its sensitivity to disturbances Sex. “
Question 5: "What are the advantages of using the NetLogo model to simulate the ecological impact of gender ratio changes in lampreys?"
Output: "NetLogo is a multi-agent simulation software that can simulate interactions between individuals in complex systems. The advantage of using NetLogo to simulate changes in the sex ratio of lampreys is that it can intuitively demonstrate how individual behavior accumulates and affects the dynamics of the entire system, allowing researchers to adjust model parameters and observe ecosystem responses in real-time under different conditions, thereby gaining a deeper understanding of the multidimensional effects of gender ratio adjustments on the ecosystem."
Question 6: "How to determine key parameters when conducting model sensitivity analysis?"
Output: "In model sensitivity analysis, the process of determining key parameters typically involves evaluating the sensitivity of model output to changes in various input parameters. By changing parameter values one by one and observing their impact on model results, the parameters that have the greatest impact on model prediction results can be identified. This helps to understand the sources of uncertainty in the model and which parameters are the key factors determining model behavior."
Question 7: "How can existing data be used to validate the accuracy and reliability of the model?"
Output: "Verifying the accuracy and reliability of a model can be achieved by comparing its predicted results with actual observation data. This includes testing the model's predictive ability for known events using historical data, and conducting cross validation to evaluate the model's generalization ability on unknown data. Through this approach, the model's predictive accuracy can be evaluated, and deviations or inaccuracies in the model can be identified and adjusted."
# 美赛代码
# 层次分析法
1 | import numpy as np |
# 计算一致性比例 CR
1 | import numpy as np |
# 遗传算法
1 | import numpy as np |
# intgr
1 | from scipy import integrate |
# 遗传模型
1 | import numpy as np |
# 元胞自动机
1 | import numpy as np |
# 层次权重
1 | import numpy as np |
# 热力图生成
1 | import seaborn as sns |
# calculate the maximum eigenvalue (求最大特征值)
1 | import numpy as np |
# 第二问雷达图
1 | import pandas as pd |
#
1 | import matplotlib.pyplot as plt |
# 雅克比矩阵
1 | import numpy as np |
# 雅克比矩阵 MATLAB
1 |
|