# Manufacturer Channel Encroachment and Evolution in E-Platform Supply Chain: An Agent-Based Model
## 3 Model
### GA Progress  
The problem discussed in this study is a multi-stage and multi-subject problem. In a single stage, manufacturers have to make pricing decisions under different channels. In  
Figure 4: Consumers’ statechart.  
multi-period, manufacturers have to make channel choices according to previous operating conditions. In this model, consumers each choose a certain number of products for comparison, and finally generate demand. Thus, there is randomness in the generation of demand, which leads to the fact that the manufacturer's profit function cannot be calculated easily. Therefore, the manufacturer's price decision cannot be solved by traditional mathematical methods in operations research. A genetic algorithm is a probabilistic search and optimization technique based on the principle of evolution, which can simulate natural evolution to find the optimal solution [47]. The manufacturer's abandonment of dual-channel operations in this model can be seen as a process of elimination over time, and the combination of genetic algorithms and multi-agent simulation can restore the evolution of this e-commerce supply chain model. Similar to our study, [PERSON] et al. also used a genetic algorithm to find the optimal solution when discussing similar problems [4]. [PERSON] and [PERSON] used a genetic algorithm when discussing the supply chain network design problem under multi-product competition [48]. [PERSON] et al. also adopted a genetic algorithm in the optimization design of enterprise network [49]. It can be seen that the use of genetic algorithms can help solve complex optimization problems in supply chains.  
In this study, the genes of each individual in the genetic population are the four prices at which decisions need to be made, i.e., gene = \(\{RP_{H},RP_{L},DP_{H},DP_{L}\}\). The individual's fitness is profit defined in Section 3.1, and the goal is to find the genetic values that maximise the profit.  
The main solution steps are as follows.  
1. Initializing the population. A random function is used to randomly generate individuals to form the initial population.
2. Individual evaluation. Fitness, i.e., profit value, is calculated for each individual.
3. Selection. A roulette wheel algorithm is used to select the parents of the population, first by deriving the probability of each individual being selected based on fitness, and then using a random number to determine the position and to select the individuals.
4. Crossover. The crossover operator is applied to the selected parent to produce two offspring.
5. Mutation. The mutation operator is applied to the resulting offspring, which mutates with a certain probability to give a new offspring.
6. Sorting. The population is sorted after each new generation is produced, the less adapted individuals are eliminated and the selection-crossover-mutation cycle begins again.
7. Termination. When enough generations have been iterated, the computation stops, and the best individuals and genes are output.  
At the end of each period, the manufacturers use the genetic algorithm to calculate the optimal prices and apply it in the next period, enabling a continuous cycle of optimisation. When a manufacturer exits the direct sales channel, only the retail prices remain for the individual genes and the fitness is adjusted so that no more decisions are made about the direct sales prices. These are the _GAsc_ and _GAdc_ states in Figure 2.