Scheduling Problem of Shared Car Based on Fish Swarm Algorithm

In order to improve the utilization and competitiveness of shared vehicles, the emerging car sharing system tends to provide one-way mode without reservation and allow remote borrowing. Unbooked one-way vehicle sharing system is characterized by the opening of vehicle mobility, allowing vehicles to return at other stations. But it leads to the imbalance of demand distribution in a certain period of time. When the demand is satisfied and the trip is completed, the vehicle will deviate from the original layout. The subsequent demand for areas with large demand can not be met, and vehicles with low demand are idle. This paper considers the sustainable development of shared car rental companies. In order to optimize the profit of shared car rental enterprises and enhance their competitiveness, intelligent algorithm is used to optimize the scheduling of vehicles with different outlets. So as to maximize service quality and company profits. First, a mathematical model for the scheduling of shared car is established. Secondly, different scheduling strategies are designed for different network scheduling. At last, an artificial fish swarm algorithm is used to analyze the case in MATLAB. There are two car outlets in the car rental company, with a maximum of 20 cars available for lease at each location, and the most profitable scheduling method when the most of the 5 cars are scheduled to be transferred every day.


Introduction
With the gradual improvement of people's living standard, the disease of big cities is becoming increasingly prominent. Especially traffic congestion have seriously affected our normal life. The emergence of Share cars can solve the problem of traffic congestion to a certain extent. It is an innovative way of transportation that can meet people's travel needs and improve transportation efficiency and economy. Shared cars [1] can be traced back to Europe in the 1948. The sharing car service [2] is different from the traditional car rental mode, the sharing car is more efficient and flexible, making people travel more convenient, and greatly improves the efficiency of car use. Shared car service is a member of the car club, the participants have to pay a certain deposit, when the car can be used to apply for vehicles at the nearest service point at any time, and pay the use fee in a certain way. Shared cars have their own unique industry development characteristics and rhythm, which requires us to make a reasonable and effective analysis. On the whole, the shared car business is still in its infancy. The feasibility of sharing car mode remains to be further studied. To facilitate consumers, the scheduling problem of shared cars is becoming increasingly apparent. In order to maximize profits, companies need to schedule different outlets of cars at idle time.
In order to improve the competitiveness of the sharing car model [3], attract the customers and increase the system utilization rate, the new sharing car system is now inclined to provide the non reservation single way mode to improve the service flexibility and allow the foreign loan to be returned. The characteristic of the single sharing car [4] system is that the mobility of the car is opened and the car is allowed to return at other sites. Due to the imbalance of demand distribution in a certain period of time [5], the vehicle will deviate from the original layout when the demand is satisfied and the trip is completed in this period. This leads to the subsequent demand of areas with large demand, which can not be satisfied, and cars with low demand are idle. In this case, from the operator's point of view, the car can not get higher utilization rate, and the system can not get higher returns. From the user's point of view, users' needs can't be better satisfied, so that customer satisfaction decreases. In this paper, the model of shared car is modeled, and different scheduling schemes are designed for different nodes. And the maximum profit scheduling scheme is realized by using the optimized artificial fish swarm algorithm.

The Establishment of a Mathematical Model
The scheduling system of shared cars is a special traveling salesman problem. The dispatch car takes the staff to start from the network point, passes through the sharing automobile site, the site car returns to the net, finally the dispatch vehicle returns to the starting point. In order to maximize the profit of the leasing company, the dispatching car should take the shortest route.
Because the shared cars do not need to be all open to the network, only some cars are scheduled for dispatch, and the dispatching car is determined by the dispatching system to determine its location. The dispatch car takes the staff to start from the network point, carries on the dispatch through the shortest route to the sharing caar, finally the dispatch car returns to the starting point. Because of the shortest distance between two locations, the distance between the two routes is relatively short.
The dispatching system is optimized and simplified, and the shared car nodes and parking spaces are all defined as points in rectangular coordinates. The mathematical description of the model is as follows: given a graph T (W, Z): W is the dot matrix of the shared car, and Z is the return car location matrix of the shared car. Because the location of different cars is different at the same site, the location of each site is no longer assumed. Let Y=edge (I, J) be a matrix consisting of the distance between the I position and the J car position.
The number or location of the car is required to be scheduled based on the known needs to be scheduled to arrive, and in figure T, a route S which makes the scheduling car walk with the shortest path L and satisfies the scheduling task is to be determined. K represents the network, D needs to schedule the subscript matrix sharing the Z of the vehicle location, and establish the mathematical model of the scheduling problem of the shared vehicle, such as formula 1.

Artificial Fish Swarm Algorithm
Artificial fish swarm algorithm [6] is a new intelligent optimization algorithm based on the research of animal swarm intelligence. The algorithm establishes artificial fish model according to the biological instinct of the fish, that is, foraging, clustering and rear end [7]. By imitating the behavior of the fish, it starts from the bottom behavior of the artificial fish, and uses the local optimization among the various artificial fish to achieve the best of the population, thus achieving the best of the whole Bureau [8]. The artificial fish swarm algorithm (artificial fish swarm algorithm) is widely used in the optimization of power system and the optimization of multistage ladder logistics transit system, which has the characteristics of fast convergence speed and low precision, which can quickly get the feasible solution and do not need the strict mechanism model [9].
As a low-grade animal, fish can not make a behavioral judgment through advanced intelligence, but only through a few simple ways of judging their needs.
The main behaviors of fish are foraging behavior, herding behavior, escape behavior, tail-tracking behavior, random walk and leaving behavior.
1) Foraging behavior In foraging behavior, fish mainly rely on olfactory or visual orientation, but other senses can also play a supporting role, giving great flexibility. Certain environmental factors affect certain sensations in fish more than others, but most sensory functions can also play a corresponding role. For example, the presence and direction of food can be detected by olfaction or vision, and food can be captured by patrolling to the food position through a lateral system to avoid obstacles.
2) Clustering behavior Colony behavior is an adaptive behavior of fish to longterm natural selection, which plays a great role in the survival of fish. Cluster behavior occurs not only in the defense of prey fish to predator, but also in the predator's predatory behavior to prey fish. For prey fish, swarm behavior can reduce the probability of discovery by the predator, and also reduce the probability of successful predation by the discovered prey fish. For predators, clustering behavior can increase the search area, increase the probability of finding the prey, and increase the successful predation probability of the found prey.
In terms of hydrodynamics, fish swimming can save individual energy consumption compared to individual individuals. The study found that the swirl energy produced at the forefront of the fish movement can be used by the tailor -based individuals, thus reducing a certain amount of swimming resistance to keep the fish moving forward.
Colony behavior often occurs during migration, and some species of fish that normally move alone often gather together during migration. In the breeding season, clustering is most likely to occur. For most fish, clustering is a necessary condition for reproduction. The same kind of fish can only be aggregated together to make the egg and sperm binding rate increase greatly, so that species can continue.
3) Escape from escaping Avoiding collisions and enemies is the most important and most common behavior of all animals. When fish individuals detect potential collisions through sensory organs, they immediately make corresponding avoidance responses. Each monomer has its own specific range of perception. Once a barrier or enemy is found to enter the range of perception, a corresponding avoidance response is made by a simple analysis and judgment, in order to ensure the safety of its own. 4) Rear end behavior In order to get more food, fish need to search for food constantly. Food floats or moves with the current, while animal food escapes when it encounters natural enemies, and fish need to constantly pursue these goals. In order to catch more food or prevent arrest, they need to keep chasing the best individuals in the fish group. When an individual discovers food or natural enemies, other experiences quickly follow their movements to get food or avoid predators. 5) Random walk and departure In addition to predation or prevention of predators, individual individuals exercise random movements in their leisure time.
The basic behavior of a fish group [10] is described as follows: Foraging behavior [11]: In the foraging behavior, the present state of the artificial fish is set as i Ｘ , The food concentration in the area of the artificial fish is set as i Ｙ at the state of i Ｘ , Then a state of j Ｘ is randomly selected in the field of vision (that is ij d visual < ), and The food concentration in the area of the artificial fish is set as j Ｙ at the state of j Ｘ . In the optimization mode, if j Ｙ > i Ｙ , the artificial fish will move forward. On the contrary, j Ｙ < i Ｙ , the artificial fish will choose the state of j Ｘ again to decide whether to satisfy the optimization condition and make a judgement of whether to move forward or not. If the number of iterations is repeated _ Try number times, the optimal condition is still not found, then a step length is moved randomly.
Cluster behavior [12]: In the cluster behavior, the current state of the artificial fish is set as Ｙ , it indicated that the artificial fish had higher food concentration near the area and was not too crowded, the artificial fish will move a step forward from the state of i Ｘ to c Ｘ . Otherwise, the artificial fish began to carry out the foraging behavior.
Rear-end behavior [13]:In the rear-end behavior, the current state of the artificial fish is set as i Ｘ , max Ｘ is the artificial fish state with the largest concentration of food in its vicinity, i Ｙ is the concentration of food in the state of i Ｘ , max Ｙ is the concentration of food in the state of max Ｘ . If max f i n δ > Ｙ ／ Ｙ , it is considered that the concentration of food around the artificial fish in the state of C max Ｘ is relatively higher than that in the state of i Ｘ and the artificial fish would not be too crowded, the artificial fish will move a step forward from the state of i Ｘ to the state of max Ｘ .
Otherwise, the artificial fish begin to perform foraging behavior.
Random behavior [14]:As a default behavior of foraging behavior, stochastic behavior is simple, namely, in the current state of i Ｘ , it chooses a state randomly and moves to the state to achieve random behavior. As long as the conditions are satisfied, the four behaviors of artificial fish can be converted to each other. According to the advantages and disadvantages of different behavior, they can judge the execution of the next behavior, and finally choose the best behavior, thus achieving the optimization [15].

Optimization of Fish Swarm Algorithm
The traveling salesman problem is a typical optimization problem. The fish swarm algorithm can solve the traveling salesman problem well. In this paper, we improve the solution of traveling salesman problem by fish swarm algorithm, and get the solution of optimal scheduling.
Initialize the program parameters. Input the location of shared cars and outlets and the number of vehicles needed to dispatch. Initialize fish swarm algorithm parameters: artificial fish quantity, iteration number and calculation parameter.
(1) According to the need, the number of vehicle dispatching n is selected in the shared vehicle location matrix to generate the scheduling mode of the situation. (2) According to the fish swarm algorithm, the shortest path and path of each case are calculated, and the shortest path in this case is recorded. (3) Repeat this process until all cases are completed. Output results. The final optimal path is selected from the optimal path of each case, and the access order of the scheduling loop is output.

Scheduling Strategy for Different Nodes
In line with the principle of maximization profit for leasing companies, the corresponding scheduling strategy for different outlets is designed.
1. Suppose each node needs to ensure that it has 10 cars at night, scheduling the station at night, and dividing the network type according to the number of different dispatching vehicles.

Example Analysis
When the car rental company has two car outlets, there are up to 20 cars in each place for lease, and the most of the 5 cars are transferred at most of the lease. First of all, by comparing the remaining amount of car surplus in two outlets, the 5 vehicles are dispatcher to a relatively small number of outlets, and five staff members are composed of a group to complete the scheduling task. When scheduling shared cars in the evening, it is the shortest path to select the shortest route of the dispatching car from the point of point to the network, and to reduce the cost of the dispatch and maximize the profit.
According to the above mathematical model, we know the location of each shared vehicle, that is, their location coordinates are known, and we know the coordinates of the nodes. Suppose there are four shared cars in dot 2, and two shared cars in dot 1. Select network 1 as a scheduling network, and select 5 vehicles in the remaining 34 cars to dispatch back to 1. From 278256 scheduling methods, the shortest return route of the dispatching car is obtained as shown in Figure 1.

Discussion
In this paper, the unbalanced demand distribution in a certain time segment of the shared vehicle is analyzed. When the demand is satisfied and the trip is completed, the vehicle will deviate from the original layout, resulting in the followup demand of the areas with more demand can not be met, and the local vehicles with less demand are idle. Firstly, the vehicle distribution is modeled, and then the vehicle scheduling scheme is designed. Finally, a case study of the scheduling scheme is carried out by using the fish swarm algorithm.

Conclusion
In view of the fact that the share car rental companies can not get higher utilization rate, the system can not get higher returns and other issues. The scheduling problem of different nodes is designed, and an artificial fish swarm algorithm is used to analyze the example. Get the most profitable plan to achieve shared vehicle scheduling.