A novel simulation framework for crowd transportations

Purpose – With the development of the modern economy, vehicles are no longer a luxury for people, which greatly facilitate people ’ s daily life, but at the same time bring traf ﬁ c congestion. How to relieve traf ﬁ c congestion and improve its capacity is a hot research area. This paper aims to propose a new simulation frameworkforcrowdtransportations toeasetraf ﬁ c congestion. Design/methodology/approach – This paper establishes related simulation models such as vehicles, traf ﬁ c lights and advisers. Then the paper describes their relationships, gives their interaction mechanism andsolidi ﬁ estheabove into a softwareimplementationframework. Findings – This paperproposesa simulationframework forcrowd transportations. Originality/value – In this framework, traf ﬁ c lights are used as a control method to control the road network and road conditions are used as an Affecter to in ﬂ uence individual behavior. The vehicle passing rate is de ﬁ ned by the correlation between endowment and the start time of the traf ﬁ c lights. In this framework, members are related, dynamically adjusted according to road conditions and dynamically optimized member decisions. The optimal path is dynamic and real-time adjustments are made for each step forward. It is different from the traditional optimal path in which there is only one ﬁ xed one and it is different from themacroscopic optimal path that does notexist.


Introduction
At present, the construction of smart cities is actively progressing around the world such as smart transportation, smart medical, smart security, smart education and smart agriculture, which involve all aspects of people's public life. Among them, smart transportation uses modern technologies to gather traffic information, adjust and control road traffic efficiency, improve people's travel environment and effectively promote the informatization, intelligence and humanization level of traffic management and travel service.
Smart transportation emphasizes how to fully integrate the transportation systems into city development, it is not limited to the existing functions of the transportation systems. Instead, it excavates and analyzes massive amounts of traffic information and emphasizes the real-time performance of the systems, human-computer interaction and the wide range of service objects . It underlines people-oriented, intelligent decision-making analysis (Li et al., 2014) and promotes the development of transportation in a more advanced and harmonious direction.
Smart transportation combines traditional transportation and data-driven models in the era of big data to form theories and methods of smart transportation systems. An important direction of research on smart transportation is to further optimize traffic flow control. On the basis of scientific and reasonable complex network control theory, in-depth study of the practical modeling of traffic flow control can be more meaningful and efficient.
This paper proposes a new framework for smart transportation, that is, the elements participating in the transportation such as vehicles, traffic lights and other members are all regarded as a digital self and they have their own control mechanism, static properties and dynamic behaviors. Each member will be influenced by advisers and at the same time, its experience will constantly strengthen its own optimization ability according to its learning ability. The focus of the research is the contribution and influence of individual wisdom on group wisdom. Group wisdom mainly gathers individual wisdom through a certain mechanism and then approaches an optimal solution. The digital self is a self-centered subject and they all have the diversification and individualization of consciousness and behavior. To better describe the status and behavior of each member, this paper proposes the relevant definitions of pattern, member, network and describes the connection among them.

Related work
The network can describe a complex system in the real world. It means that the relationship among various elements can be expressed in the structure of some rules. Complex network is characterized by complex structures, diverse nodes, complex connections and network evolutions. Based on geographic information system and complex network theory, Hu et al. (2009) studied the complexity of transportation networks and analyzed their topological properties. Li et al. (2017) proposed a routing strategy based on traffic priority congestion control which can be used to solve different traffic congestion situations. Chen et al. (2019) proposed a collaborative optimization method of urban transportation networks based on a two-layer complex network, which could optimize the overall network efficiency and passenger transfer behavior. Based on the complex network theory, Sun et al. (2018) proposed a weighted cascading failure model based on a coupled mapping lattice, which provides theoretical support for alleviating traffic congestion.
Smart transportation is a huge composite system composed of many independent, interdependent, related and restrictive elements. Traffic conditions are affected by vehicles, traffic lights, intersections and real-time road conditions. Among them, the intersection of urban roads is a key location for traffic jams and accidents. Increasing road capacity can improve the accessibility of intersections. At present, there are three main research methods of traffic signal control: (1) Single point control. It mainly uses grade crossing as the research object and only considers a single intersection when carrying out traffic signal control, that is, the research only allows a signalized intersection to work and it does not establish a connection with other adjacent intersections. For the research of single-point control, Huang et al. (2015) proposed an urban traffic signal optimization control algorithm based on a pseudo-neural network; Xu et al. (2011) researched and designed a variable multi-phase traffic signal controller; Liao and Wang (2012) established a non-linear function model for optimization of two-phase signal timing at single-point intersections in the multi-objective city and solved it with genetic algorithm; In view of the dynamics and randomness of the traffic system, Zhu and Chen (2013) proposed an adaptive control model for signalized intersections.
(2) Arterial coordination control. That is, the adjacent intersections are connected to coordinate control. In terms of research results, Liu and Chang (2011) established an arterial signal optimization model to optimize the total travel time; Adacher (2012) extended the "agent problem" method to solve the synchronization problem of minimizing the total delay of traffic signals; Shen et al. (2012) optimized the timing design of multi-phase signals for trunk traffic and carried out simulation comparison before and after traffic flow control; Liu (2009) built a hierarchical multi-agent structure, through the game of Agent realizes the coordination between various intersections; Tang and Wang (2008) used game theory and social experience to coordinate the traffic signal control Agent numbers and establish small area signal control system based on multi-agent technology. The dynamic signal control can analyze the traffic flow data of the intersection entrance road collected by the detector, so as to make the phase switching decision at the right moment. The development of multi-agent technology makes the autonomous control capability of traffic signal controllers stronger and promotes the development of dynamic signal control applications (Yang et al., 2018). (3) Area coordinated control. It is based on line control. The control object is expanded from several adjacent intersections to multiple intersections in an area or the entire urban road network. By effectively dividing the entire control area into several independent sub-areas, centralized and coordinated control of the distribution of traffic signals in different sub-areas to improve road traffic efficiency (Shen and Yang, 2016). Area traffic signal control is different from single-point control and arterial coordination control. It has a wider control range and pays more attention to the coordination of control. For the study of area coordinated control, Chiou (1999) established a signal setting variable function as the objective function Nonlinear mathematical programming model for regional traffic control; Li et al. (2012) gave a method of determining the initial congestion area and a multi-layer congestion boundary control strategy. Zhuang et al. (2012) transform the traffic distribution model into a balanced path problem for user travel demand path allocation and a two-level programming model is established.

Key technologies
3.1 Member model The members of smart transportation-vehicles and traffic lights are all meta member models. All of their decision-making possibilities are represented as patterns. As shown in (Figure 1), it is an individual looking for a path or making a decision in the simulation pattern. It is composed of affecter, decider, executor, monitor and comparator. Among them, affecter refers to the influence of several adviser units on the decision-making of members and its influence is determined by the interconnection rules. Decider comprehensively considers the resource situation (the path is greater than or equal to the weight of the arc in the pattern), ability (an aspect of a number of rounds, depth of reflection and endowment that can be seen in a time series) and inclination (subjective willingness of members) to make decisions. Executor executes the decision based on the decider's decision and the affecter's suggestion. The ratio is affected by the level of self-confidence. In addition, it is also affected by self-degradation (the digital self always tends to degenerate in the direction that is the most beneficial to them, which is a major aspect of disturbance). Monitor corrects the deviation according to specific goal/ commitment. The self-discipline level represents the self-correction ability of the intelligence unit, the interference of the monitor represents the external correction ability and the monitoring intensity is determined by the interconnection rule. Comparator connects to other units related to the unit and learns from the behavioral results of other units. The result can be used as negative feedback in the next round of selection and its connection strength is also determined by the interconnection rules. The specific functions of each device of each type of member will are described in detail below.
3.1.1 Traffic light model. (1) Pattern As shown in (Figure 2), the pattern in the traffic light model is a single-step binomial pattern, which represents the behavior choices that traffic lights can make. Among them, nodes represent the state of the traffic lights, which are divided into red lights or green lights. When the traffic light is red, no vehicles can pass. When it is green, the vehicle can choose to go straight, turn right or turn left according to its own decision. The arc represents the behavior of the traffic light changing light. In this model, the weights of both nodes and arcs are regarded as zero, that is, there is no cost and benefit measurement for the decision made by a traffic light and the result of the decision.
(2) Affecter In this model, the actual road condition information will affect the traffic lights. Traffic lights record the position information of vehicles on adjacent road sections in real-time and count the number of vehicles on the adjacent road sections. There are many vehicles on the road section and the corresponding passage time of the traffic signal light is lengthened. On the contrary, there are fewer vehicles on the road section and the passage time period of the traffic signal light is short. When a traffic accident occurs on the current road section, the behavior of the traffic police acts on the affecter. At this time, traffic police are involved in How to decide the direction of traffic flow, the traffic police will subjectively make commands based on the current road conditions. At this time, the adviser's suggestion information obtained by the affecter is the command information of the traffic police and the affecter directly acts on the actuator for the executor.
(3) Decider As shown in (Figure 3), a signal light node represents a set of traffic light groups, that is, four traffic lights in four directions. Of course, there also be three forks, five forks, etc. Under normal circumstances, the system of traffic lights at each intersection has four different road segment identification signs. For example, four sections of W, E, S and N. The four road sections defined in the paper only represent the incoming lanes. Then, the outgoing lanes are the incoming lanes of the traffic lights at the next intersection. That is, the outgoing lanes are indicated by the next traffic lights. The adjacent traffic lights, respectively, indicate the four-way and eight-lane (There is no difference in the number of lanes here. One or more lanes in the same direction are regarded as one lane. That is, a road has only one incoming lane and one outgoing lane) road section.
The traffic problem is divided into three states: traffic jams, congestion and unblocked. This paper mainly studies two opposing states of traffic jams and unblocked; traffic jams are the condition in which one green light at the intersection is not enough to make all vehicles pass through the road section; the unblocked means that the traffic light can pass all vehicles at one time. The congestion state is a situation in between, that is, the current traffic capacity is close to the saturated state and is about to face the traffic jams problem; regarding the definition of the three states of traffic problems, the state of the incoming lanes of the traffic lights at each intersection is the traffic state of the road section.
As shown in (Figure 3), the green road is unblocked, yellow is congested and red is traffic jams; take the L 5 node as an example, the following description illustrates the function of the decider in the model: Model of a traffic light: As road section 5 is in traffic jams state, the traffic light can appropriately increase the duration of the green light to relieve traffic jams of the road section 5; If it is a traffic light L 2 road condition problem and road sections 3 and 4 are in a traffic jams state, then the linkage between traffic lights is needed to Novel simulation framework make a more reasonable and comprehensive decision on the transition and duration of the traffic lights. Model of vehicle: When a vehicle from the road section 5 chooses the passable route, it can turn right, go straight or turn left, but considering the traffic jams state of the road section 7, the congested state of road section 11 and the unblocked state of the road section 10, it will choose the road section 10 to turn left (If the vehicle member has an inclination, for example, although road section 7 is blocked, vehicle member insists on choosing road section 7, then decider will give priority to the member's inclination.); If the road sections 10 and 11 are both unblocked at this time, the decider will make further judgments through the interconnection and interaction attributes of all members connected by crowd networks.

(4) Executor
Executor executes the commands from the decider and the commands include the transition between traffic lights and the duration of traffic lights; for the traffic lights model, the executor does not have self-degradation and mutation behavior.
(5) Monitor Because the executor has no self-degradation behavior, there is no monitor in this model.
Comparator As shown in (Figure 4), each member in the traffic light model not only establishes contact with its neighbors but also establishes contact with other members who are not neighbors. The purpose is network members can better interact with other members and improve the intelligence of individual decision-making in a higher-level, larger-scale interactive system. In the interaction with other members in the specified area, the road conditions of other traffic light sections are obtained and the overall road conditions in the area are integrated to reasonably allocate the type and duration of the traffic light at the current location to achieve the highest traffic efficiency. The information obtained by the comparator as an important reference will be fed back to the next round of traffic signal decision-making and the final action is comprehensively judged by the decider on inclination, ability and resource conditions.
(1) Pattern The paper abstracts information of road traffic as a grid pattern, which is a directed graph arranged by road section information, which represents all possible behaviors that vehicles can make when making decisions and choices; As shown in (Figure 5), each node represents the state of the member (the current position of the vehicle) and the arc between the nodes represent the behavior of the member (the direction of the vehicle's choice); There is a globally optimal path in the pattern (the fastest way for vehicles to pass through this section), but due to resource constraints (the relationship between the duration of traffic lights and the vehicle throughput) and the limitations of individual decision-making (influenced by traffic lights, navigation and personal preferences), members' decisions can often only find the locally optimal path in the pattern, The local optimal path does not represent the globally optimal path.
(2) Affecter As shown in (Figure 6), vehicle members are related to each other in the network and the real-time location information of the vehicle members is shared with each other in the adjacent area so that the member can obtain how many vehicles are in their own area and whether the road is traffic jams; Then adviser members (navigation systems: Baidu Maps, AutoNavi Maps, Google Maps, etc.) to provide vehicle members with some guidance on their needs such as the shortest time, the closest distance, the least cost and other requirements. Vehicle members will also subjectively choose which adviser (navigation) for their own use. Both of these will provide reference information for the final decision-making of the vehicle members. The degree of influence of the adviser's suggestion information on the decisionmaking result of the decider is determined by its own intensity of influence.
(2) Decider Decider is affected by its own reasons and resource conditions to make decisions. It has a self-confidence level attribute. The higher the confidence level, the more inclined to its own decision-making behavior. Specifically, the decider is based on the current traffic lights' instructions and the degree of the crowdedness of the road ahead (referring to the road after the current traffic light and before the next traffic light) to make decisions (The relative optimal path will be dynamically updated following the road conditions. Every time the vehicle passes a traffic light, it will re-judgment and select the optimal path based on the current road conditions). First of all, the decision result follows inclination. The larger the inclination value is, the more inclined the decision is to inclination, even if the decision result chooses the congested road section. It is a decision that tends to choose the traffic lights to indicate and avoid the conditions of the congested road ahead. Second, it is a decision that tends to choose the traffic lights to indicate and avoid the conditions of the congested road ahead. Third, if it is judged for the first time that the section reached by the selected direction deviates too much from the destination, readjust it.
When the decider makes a decision, the influence of the suggestion information of adviser to the member obtained by affecter and the historical optimal decision of other members in the area obtained by the comparator. The final choice of the program should be made by comparing the inclination, influence coefficient, learning ability and confidence level of factors.
(4) Executor The function of the executor is to execute the decision result of the decider and choose the route according to the decision result. There is a self-degradation phenomenon here, so in the process of executing commands, the executor will always tend to the least costly way and path. This is a gradual accumulation process and self-degradation will appear after accumulation to a certain degree. At the same time, the executor is also accompanied by a mutation in the execution process and the direction of the mutation is uncertain.
(5) Monitor Monitor monitors the execution results of the executor. This is a self-correction process. For execution behaviors that deviate from the decider's command, the monitor will try to pull back the decider's will.
(6) Comparator As shown in (Figure 7), the shaded part is the connection of members within a certain area (referring to the geographical division of the range). The middle node is the current vehicle member model and has a connection relationship with other vehicles in the area. They obtain location information from each other to judge the basic situation of the current road section and learn the historical best decisions among other members for the decider's reference.
3.1.3 Adviser member model. For traffic lights, there is no adviser to provide advice, some just get the status of other neighboring members through the comparator and use this information to make scientific and reasonable decisions about themselves; for the vehicle model, the adviser is navigation such as Gaode Map, Baidu Map and Google Map.
Members subjectively choose a certain kind of navigation to provide guidance for themselves and choose different plans according to their own needs. For example: plan a reasonable travel plan based on the shortest distance, the shortest time and the lowest charge. The specific operation is to provide the adviser with inclination, the starting location or current location and the destination of the member. After choosing a different plan, the adviser will use these conditions to provide members with the most reasonable path planning.  (Figure 8), the vehicle model members choose different solutions and the adviser will provide specific suggestions to guide the members accordingly. The red path is the globally optimal path, the yellow path is the closest solution path, the green path is the shortest time path and the blue path is the lowest toll path.
3.1.4 Crowd network model. As shown in (Figure 9), the crowd network relationship for members is simply expressed as two layers: The bottom layer is the connection relation of the vehicle model members. Each member in the shaded area (a section of road where one traffic light or several nearby traffic lights  are responsible) in the figure is interconnected (get each other's location, etc.) and members not in the shaded area have no connection relationship. Obviously, there are overlapping areas in the figure, these members are connected to other members in this area, as well as other members in another area; that is, there is no absolute area in the global perspective. In addition, there is a part of advisers that will influence the decision-making of the members and the members subjectively choose which advisers to establish connections with them.
The upper layer is the connection relation of the traffic light model members. The traffic lights in the area are connected with each other through the complex network, which can collect road condition information of other sections of the adjacent or planned route and provide feedback to the Decider to make more reasonable and scientific commands. Then, a traffic light is connected to multiple vehicle models (to judge the road conditions of the road under its own area) and a vehicle model is also connected to multiple traffic lights (helping to make scientific and reasonable judgments and route planning). Is a many-to-many relationship.
3.2 Simulation advancement model 3.2.1 The process description. Throughout the entire simulation process, there is one generation method that contains multiple wheel methods, that is to say, in terms of the pattern, the vehicle moves one step per wheel and each step represents the choice of traffic lights and the traffic lights change in a cycle. It is the end of the simulation generation until the vehicle reaches its destination on the pattern. First, the simulations need to generate m vehicle member models and n traffic light models and their respective attributes are shown in (Table 1 member property list).
Second, when the vehicle model walks to the intersection (each wheel) in the simulation advancement, it is judged whether it can go straight, turn left or turn right. The judgment is The number of vehicles that can through in the period is measured according to the through rate of the intersection, that is, the maximum throughput. When this value is reached, even the green light will not allow vehicles to pass Capacity of the road section How many cars can stay on the road at most Notes: CID -ID of vehicle; IID -ID of traffic light Novel simulation framework based on the value of self-confidence level, intensity of influence and learning ability (normal distribution). Each step must update its own location information (lID.w\lID.s\lID.e\lID.n), the next step is to go straight, turn left or turn right to enter which section of the road, in turn, will depend on the existing location make changes to the information. The initial state position information of vehicles entering the road network is randomly distributed and the initial state destination information is also randomly distributed: Walk according to the self-confidence level.
The first judgment: judge whether the maximum throughput has been reached in the intersection cycle at this time. If it has not arrived, it can pass. Otherwise, it will stay here. The second judgment: if the member has an inclination, the inclination is given priority. Otherwise, member tends to choose the more unblocked road section.
Prefer to prioritize processes: The perception model perceives the attribute information of the digital self and other digital selves through its attribute collection and the current environment updates its knowledge system and strategy system based on the current information and finally sends the updated information to the mental module to perform calculations. After receiving the data from the perception module, the mental model first checks the accuracy of the information, confirms that it is correct, performs mental calculations and sends the results of the mental math to the decision-making module. Thereby affecting the decision-making module to make decisions. The decision-making module is under the influence of the perception module and the cognitive module. The decision-making module needs to make full use of the knowledge in the knowledge system and the strategies in the strategy system to make decisions. Finally, the decision-making module sends the decision-making results of various types of expertise to the execution module. The execution module receives the decision made by the decision module. It selects different components to perform other decision tasks, updating the intelligent entity's attribute set, knowledge system, strategy system and mental module.
The third judgment: the final choice will be made after comprehensive judgment and decision based on the second judgment of the traffic light reached in the selected section direction and the deviation from the destination: Follow the suggestion of the adviser. It is very simple to choose the route according to the instructions. When the adviser's route has deviated on the way, the suggested route of the adviser will re-plan the route according to the current position of the vehicle.
According to the optimal decision learned by the comparator. Each vehicle has location information (road section lID.w\lID.s\lID.e\lID.n), through the same or adjacent road section range to establish contact with other vehicles in the range and learn its decision-making. After a series of wheel methods, the destination is reached, a generation of simulation is completed, and the data is updated.
The traffic lights will update the road conditions according to the road section conditions of the current wheel during each wheel. At the same time, according to the connection interaction with other traffic lights, the traffic lights in the cycle will be considered through the comprehensive consideration of the road conditions of the own road section and other road sections. The duration is adjusted to improve the congestion of the road. Through the complex traffic light system under the network connection, the overall traffic light can be adjusted from a macro perspective, which can improve the road through rate more scientifically, rationally and efficiently. In this process, each vehicle changes its location information as passing a road section, so the traffic light traffic count on this road section is increased by one. Traffic light calculates the maximum number of vehicles allowed to pass in the new cycle through its own adjusted traffic light time, so as to provide quantitative parameters for vehicle judgment. If the traffic light section is traffic jams, the duration of the green light should be appropriately extended to improve traffic jams. If the next intersection of the traffic light is also traffic jams, then the traffic light arrangement of the intersection is the same as the traffic light arrangement of the next intersection. It is necessary to coordinate and deal with it as a whole.
As shown in (Figure 10), based on the vehicle model and traffic light model, first defines the initial values of environmental variables such as the number of simulation iterations, the number of vehicle model members and the number of traffic light model members and then generates members and set initial values for their attributes in the simulation process of the entire experiment, then establish connections between members in a local area. Next is the double cycle. The inner cycle first executes the traffic light-related methods, updates the road condition information of its own attributes and calculates the maximum throughput under the new cycle. Then, execute the vehicle-related methods. All vehicles make decisions. The traffic light throughput count is updated and incremented by one every time a vehicle passes. When all vehicles are executed, the vehicle passing volume of each traffic light is recorded and jumps out of the inner loop. The outer loop is the iterative loop process of simulation. The inner loop is repeated before the maximum number of simulation iterations is reached. Finally, the simulation iteration process is ended, the data is recorded and the experimental results are output.
3.2.2 Formal language description. (1)Algorithm 1 pattern Algorithm 1. Generate_pattern(num_v, num_t) Input: num_v number of vehicle member num_t number of traffic light member beginnode starting node endnode termination of the node Output: pattern, {CL} Begin 1 foreach (NUM, beginnode, endnode) 2 Start at starting node and end at the termination of the node, num_v and num_t nodes are generated Assign weights to each node, weight_edge 5 Records the edges between adjacent nodes and assign weights to the edges, weight_edge 6 Generates a list of node adjacencies, {CL} 7 End End select mode in SL 4 mode = shortest_time/shortest_distance/shortest_spend 5 suggestion / mode// Assign the suggestion information in the selective suggestion mode to suggestion 6 End 7 return suggestion; (3)Decider of the vehicle model Algorithm 3. Decider_ vehicle(confidenceLevel, ID, influence, learnability, pattern) Input: confidenceLevel inclination ID The ID of the traffic light influence influence coefficient learnAbility pattern Output: OD decision order of the decider 1. Begin 2. Judge the current intersection situation (traffic jams/congestion/unblocked) // Priority is given to driving on unblocked roads, followed by congested roads and traffic jams roads are forbidden to pass 3.
end if //Judge whether the intersection is remote from the destination members. We map road information to the pattern network and transform road information into the network pattern. Taking the throughput count of traffic as a measurement standard, the simulation unit in the model determines the execution plan through the connection relationship with other units and its own decision-making mechanism and then optimizes the behavior result. The innovation of this paper is to propose that all traffic elements are digital selves and individual intelligence is always limited and scarce. Through information interaction with other intelligent numbers, group intelligence can be maximized. This idea was designed as a simulation program. This simulation system integrates the ideas of crowd science and uses intelligent equipment to describe the current traffic status in detail and infer the overall status through the limited local information, improves the shortcomings of the traditional traffic system information blocking, thus improves the performance of the traffic systems. However, this simulation program has not yet been implemented and it is only in the theoretical design stage.