Predicting the mobility of people, goods and information between locations is an important problem in fields as diverse as sociology [1] , economics [2] , demography [3] , epidemiology [4] , transportation science [5] and network science [6] . For more than a hundred years, scholars have proposed a variety of models to predict such mobility [5] [6] [7] [8] [9] [10] [11] [12] . These models are named spatial interaction models in economics [8] and trip distribution models in transportation science [5] . The gravity model is the most influential mobility prediction model and has been applied in many fields [6] . For example, it is used to predict population migration [13] , commodity trade [14] , commuting flows [15] and public transportation flows [15, 16] . The gravity model is popular because spatial interaction phenomena in these fields all obey a law known as the social gravity law under which the flow between two locations is proportional to the activity (usually quantified by population, GDP and so on) of these two locations and decays with the power function of the distance between them, similar to Newton's law of universal gravitation. As early as 1846, Desart found that the railway passenger flow between stations in Belgium obeyed the social gravity law [17] . This may be the earliest record of the discovery of the social gravity law. Later, Carey [18] and Ravenstein [19] found that population migrations of the United States and the United Kingdom, respectively, obeyed the social gravity law. Additionally, Reilly [20] found that retail business drawn from cities obeyed the social gravity law. In recent years, with the continuous * yanxy@bjtu.edu.cn development of modern electronic and information technology, there have been many approaches (such as GPS, mobile phones and social networking sites) to recording the mobility data of people, goods and information over long periods. By analyzing these data, scientists have found many phenomena showing obedience to the social gravity law in various systems [6] . For example, commuting flow in the United States [21] , highway traffic flow in Korea [22] , telecommunication flow in Belgium [23] , global airline flow [24] , global cargo ship movement [25] and even global scientific collaboration [26] followed the social gravity law.
Why does such a simple law apply to so many complex social systems? This problem has long excited the curiosity of many scholars. In the past half century, scientists have proposed different explanations of the roots of the social gravity law, among which Wilson's maximum entropy model [27] is the prevailing explanation. He proposed an approach to deriving the doubly-constrained gravity model by maximizing the entropy of the trip distribution between locations in the transportation system under the constraints of the total cost, the trip production volume and attraction volume of each location. However, unlike the total amount of internal energy available to all gas molecules in a system, which is determined exogenously, the total cost cannot be estimated in a real transportation system [28] . Tomlin and Tomlin [29] constructed a free cost model by analogy with the Helmholtz free energy in physics. This model can lead to the same results as Wilson's maximum entropy model but does not need the prior constraint of the total cost. However, both the maximum entropy model and the free cost model are macroscopic explanations of the social gravity law. They provide only the most probable macroscopic distribution state but do not take into account individual choice behavior in destination choice [30] . On the other hand, economists have explained the social gravity law by describing individual choice behavior using utility theory, in which the most influential study is that of Domencich and McFadden, who applied random utility theory to model individual destination choice behavior [31] . They assumed that the traveler always selects the destination with the highest utility, but her perception of the destination utility exhibits random error. If these errors follow the independent and identical Gumbel distribution, the Logit model [32] can be derived. If the destination utility consists only of the destination attractiveness and the travel cost to the destination, the Logit model can derive the singly-constrained gravity model. However, all the aforementioned models neglect individual interaction, which is a ubiquitous phenomenon in many complex systems [33] . For example, in a real transportation system, a traveler considers not only the constant values of destination attractiveness and travel cost but also possible crowding at the destination and congestion on the way. Recently, Yan and Zhou [34] modeled the individual destination choice process as a congestion game, including interaction among travelers, and further derived the singly-constrained gravity model. However, they assumed that all travelers are perfectly rational and can accurately perceive the utilities of all destinations. In practice, individual rationality is bounded because of the intractability of the alternative choice problem and limited information-processing resources [35] . However, an explanation of the social gravity law that simultaneously reflects individual interaction and bounded rationality is still lacking.
In this paper, we develop a free utility model from the perspective of individual choice behavior to explain the social gravity law in the context of the destination choice problem in transportation science. First, we establish the individual choice model on the basis of how a bounded rational traveler trades off expected utility and information-processing cost. Then, we extend the individual choice model to the collective choice model, including infinite noninteractive or interactive travelers, and further derive the gravity model from the collective model. We next extend the collective model of interactive travelers, named the free utility model, to a dummy network and real transportation network. Finally, we contrast the similarities and differences between the free utility model and the free energy in physics and further discuss the potential application value of the free utility model in different scientific fields.
A. Individual choice model Similar to some of the aforementioned studies explaining the social gravity law, we conduct our research in the context of individual destination choice behavior in the transportation system. In this system, there are M origins labeled i (i = 1, 2, . . . , M ) and N destinations labeled j (j = 1, 2, . . . , N ). O i is the number of trips leaving origin i. We initially start with the simplest system, in which there is only one origin (M = 1) and one trip (O i = 1) made by a traveler who can select N (N > 1) destinations. The utility of destination j for this traveler is u ij , which describes her satisfaction degree concerning the attractiveness of destination j and the travel cost from origin i to destination j. According to the utility maximization principle, this traveler will select the destination with the highest utility only if she is perfectly rational [36] . However, it is difficult for a bounded rational traveler to exactly perceive the utilities of all destinations in reality. In this case, her choice is probabilistic, i.e., destination j is selected with probability p ij , which depends on u ij [37] . If the traveler is completely uncertain about the utilities of all destinations, she can select destination j only with probability p ij = 1 N , and her expected utility j p ij u ij is the average of the utilities of all destinations. If she wants to obtain higher expected utility, she must acquire knowledge about the utilities of the destinations through information processing [38] . A natural measure of information processing is negative information entropy −H = j p ij ln p ij [38] [39] [40] . Assuming that the price of unit information is τ , then the informationprocessing cost is −τ H. If τ → ∞, which means that the information-processing cost is extremely high, the traveler does not care about the expected utility and focuses only on the information-processing cost. Hence, she will make a totally random choice of destination, that is, a uniform distribution over the set of destinations. If τ = 0, which means that information processing has no cost, she will select only the destination with the highest utility. In general case τ > 0, she must trade off her expected utility and the information-processing cost [41, 42] to achieve the total utility maximization goal, i.e.,
where j p ij u ij + τ H is the objective function subjected to j p ij = 1. Using the Lagrange multiplier method, we can obtain the solution of Eq. (1) as follows:
where λ is a Lagrange multiplier. According to ∂L ∂pij = 0 for all destinations, we can obtain
which means that all destinations have the same utility minus the marginal information-processing cost under the traveler's optimal choice strategy. This situation is very similar to consumer equilibrium in microeconomics [43] , in which the marginal utility of each good is equal. Thus, we name u ij − τ (ln p ij + 1) the marginal utility of destination j. The total utility of the system is the sum of the integrals of the marginal utilities of all destinations. The optimal choice strategy for the traveler is to follow the equimarginal principle [43] to select destinations in order to achieve maximum total utility. Combining Eq. (3) and j p ij = 1, we can derive
which is the equilibrium solution of Eq. (1). In mathematical form, Eq. (4) is the Logit model derived in terms of random utility theory [31] . However, our derivation does not need to assume in advance that the destination utility perception errors follow the Gumbel distribution.
We further extend the transportation system to the case where origin i has infinite homogeneous travelers (i.e., O i 1), each of whom still has only one trip. The question then becomes how these trips are distributed among various destinations. If the utility of destination j is not affected by the number of trips to j, Eq. (4) can still be applied in this system. On this occasion, the number of trips from i to j is T ij = O i p ij , and the system entropy S is the sum of the information entropy H of each trip. Therefore, we can rewrite Eq. (1) as
Similarly, all homogeneous travelers follow the equimarginal principle so that all destinations have the same marginal utility for them. If the utility of destination j is abstractly written as u ij = A j − c ij , where A j is the constant attractiveness of destination j reflecting the activity opportunities (including variables such as retail activity and employment density) [44] available there, and c ij is the constant travel cost from i to j, we can use the Lagrange multiplier method to obtain the equilibrium solution of Eq. (5) as
which is the same as the singly-constrained gravity model derived from the Logit model [31] . However, in practice, the utility of destination j is affected by the number of trips from i to j [45] ; that is, u ij is a function of T ij . For example, the trip number T ij from origin i to destination j will influence the travel cost from i to j and the attractiveness of destination j, both of which will change the utility of destination j. Hence, the utility can be abstractly written
is the variable attractiveness function at destination j and g ij (T ij ) is the congestion function on the way from i to j. We already know that each traveler follows the equimarginal principle to make the optimal choice. In this context, a traveler's choice of destination depends on how other travelers are distributed over all destinations [46] . The phenomenon of one individual's behavior being dependent on the behavior of other individuals, known as individual interaction, is widespread in social systems. In this interactive system, the optimal choice strategy for all travelers is still to assign all destinations the same marginal utility. Since the total utility of the system is the sum of the integrals of the marginal utilities of all destinations, the utility maximization model of the interactive system can be written as
Interestingly, the objective function of Eq. (7) is mathematically consistent with the Helmholtz free energy in physics [47] ; thus, we name Eq. (7) the free utility model. Analogous to the thermodynamic system, the equilibrium trip distribution maximizes the free utility function in the transportation system. In addition, the first term of the free utility function, j Tij 0 u ij (x)dx, is analogous to internal energy, including potential energy in a thermodynamic system. Monderer and Shapley [48] therefore named this term the potential function. The free utility model with τ = 0 is essentially a potential game with an infinite number of agents.
Here, to generate gravity-like behavior, the utility needs a logarithmic dependence on the number of travel-
is the simplified cost function, including the travel congestion cost and the destination variable attractiveness, and γ is a non-negative parameter. Equation (7) can be specifically written as
Using the Lagrange multiplier method, we can obtain
This result is the singly-constrained gravity model [5] .
Parameter τ reflects the information-processing price for bounded rational travelers, and parameter γ reflects travelers' interaction strength. Figure 1 shows the effect of changes in parameters τ and γ on the free utility optimal solution in a simple system with one origin and two destinations. The surface in Fig. 1 describes the optimal solution of the free utility model in this simple system. From Eq. (8), we can see that when γ > 0 and τ = 0 (meaning no information-processing cost), the free utility model is equivalent to the degenerated destination choice game model [34] in terms of potential game theory, as shown in the left dashed line of Fig. 1 ; when γ > 0 and τ → ∞ (meaning that the information-processing cost is too high), travelers can only uniformly randomly select each destination, as shown in the lower-right solid line of Fig. 1 ; when τ > 0 and γ = 0 (meaning that there is no interaction among travelers), the free utility model is equivalent to the Logit model [31] , as shown in the upper-right dotted line of Fig. 1 ; and when τ = 0 and γ = 0, all travelers will select the destination with the highest constant utility, as shown in the intersection point of the dashed line and dotted line of Fig. 1 . Above, we considered only a simple system with a single origin. However, there is more than one origin (M > 1) in a real transportation system. In such a system, the utility form of destination j is changed. It is affected by not only the number of trips from i to j but also the total number of trips attracted to destination j. Hence, the utility of destination j for travelers at origin i can be abstractly written as u ij (T ij , D j ) = A j − l j (D j ) − c ij − g ij (T ij ), where D j is the total number of trips attracted to destination j, i.e., D j = i T ij . If D j is as constant as O i , that is, not only the total number of trips emanating from origin i but also the number of trips destined for any destination is fixed, then, the variable attractiveness function l j (D j ) of destination j is also constant and thus can be merged into the constant attractiveness A j of destination j. In other words, only the travel congestion function g ij (T ij ) influences the destination choice behavior of travelers. If g ij (T ij ) = γ ln T ij , the free utility model of the system can be written as
where the two constraints j T ij = O i and i T ij = D j are the fixed total number of trips emanating from origin i and the fixed total number of trips attracted to destination j, respectively. Using the Lagrange multiplier method, we can obtain where a i = 1/ j b j D j e −cij /(γ+τ ) and b j = 1/ i a i O i e −cij /(γ+τ ) . This is the doubly-constrained gravity model widely used in transportation science [5] . This free utility model can be reduced to some classical models under specific parameter combinations. When τ > 0 and γ = 0 (meaning that there is no interaction among travelers), Eq. (10) is equivalent to the free cost model proposed by Tomlin et al. [29] , and its solution has the same form as that of Wilson's maximum entropy model [27] . When τ = 0 and γ = 0, Eq. (10) is equivalent to the Hitchcock-Koopmans problem [49] , which asks, for every origin i and destination j, how many travelers must journey from i to j in order to minimize the total cost i j (c ij − A j )T ij . When τ → ∞ (meaning that the first term of the free utility function in Eq. (10) is negligible), Eq. (10) is equivalent to the equal priori probability Sasaki model [29] with the solution T ij ∝ O i D j .
In a real transportation system, the travel cost c ij often follows an approximate logarithmic relationship with distance d ij , i.e., c ij ≈ β ln d ij [50] . Using β ln d ij instead of c ij in Eq. (11), we can obtain the social gravity law
Thus far, we have achieved the goal of explaining the root of the social gravity law. The social gravity law is a macroscopic phenomenon caused by the interaction of bounded rational individuals in destination choice. In contrast, the destination choice game model considers only individual interaction but ignores individual bounded rationality, which is almost universal in practice, while the maximum entropy model, the free cost model and the Logit model reflect the randomness of individual choice decisions but do not reflect individual interaction.
C. Network expansion model
The above constraints j T ij = O i and i T ij = D j are essential in the classic four-step travel demand forecasting models in transportation science since the secondstep model predicting trip distribution requires the input values of trip production and attraction resulting from the first-step model [5] . However, the total number of trips D j attracted to destination j is impossible to fix beforehand in a real transportation system since D j = i T ij is the product of the individual destination choice process. In other words, D j is variable. In this case, the free utility model can still describe traveler destination choice behavior. For a better understanding, we transform the destination choice problem in the transportation system with multiple origin-destination pairs into an equivalent route choice problem in a dummy network, as shown in Fig. 2 . In this network, there are M origin nodes, N destination nodes and one dummy node s. There are M × N dummy links leading from each origin node to each destination node and N dummy links leading from each destination node to the dummy node. Each origin node has O i travelers whose final destination in this network is the dummy node s. The traveler journeying from i to s has N alternative paths. Each path is composed of two links, ij and js. The flow along link ij is T ij , and that along js is i T ij . The path utility consists of the utility u ij (T ij ) = −c ij − g ij (T ij ) of link ij and the utility u j ( i T ij ) = A j − l j ( i T ij ) of link js. Hence, the free utility model for this dummy network can be written as
Oi . In addition, some paths may not be selected since the number of trips O i is finite in practice; thus, constraint T ij ≥ 0 must be added to Eq. (13) . Interestingly, Eq. (13) is identical to the stochastic user equilibrium (SUE) model [51] for traffic assignment in transportation science. There are many algorithms that can solve this model and calculate the traf- fic flow on all links in the network [44] . Although the free utility model in Eq. (13) cannot provide an explicit expression of T ij , it can better characterize collective destination choice behavior than the doubly-constrained gravity model that specifies the number of trips D j attracted to destination j.
In the above studies, we assumed that the factors influencing the utility of destination j for travelers at origin i include the destination variable attractiveness function l j ( i T ij ) and the travel congestion function g ij (T ij ). In practice, the travel congestion cost is determined by the link congestion cost in the transportation network, and the link congestion cost depends travelers' route choice results. Therefore, under the premise of having transportation network data, a combined destination and route choice model can predict not only the number of trips between origin and destination pairs but also the link flow in the transportation network. Here, we present a network expansion method to simultaneously solve the destination and route choice problem, as shown in Fig. 3 . The bottom layer is the real transportation network, in which each green node labeled i represents a location (which is the centroid of the traffic analysis zone (TAZ) in transportation science) that can produce and attract trips, the black square nodes represent ordinary nodes such as intersections, and the links labeled a represent segments. Each link is assigned a utility −t a (x a ) summarizing the relationship between link cost t a and link flow x a . We expand the real transportation network by adding two types of dummy nodes and two types of dummy links. First, we add a dummy destination node i for each node i and a dummy link ii from node i to node i . The flow along link ii is x ii , which is equal to the trip attraction at the real destination i. The equivalent utility of link ii is the negative destination variable attractiveness −l ii (x ii ). Next, we add a dummy origin node i for each node i and add dummy links from node i to all dummy origin nodes except the corresponding dummy origin i . The flow along link i i is x i i , which is equal to the number of trips between the corresponding origin and destination pair. The equivalent utility of link i i is the constant attractiveness A i . In this manner, an expanded network is formed.
In this expanded network, the fixed trip volume from origin node i to corresponding dummy origin node i is O i , i.e., the number of travelers at origin i. Consequently, the combined destination and route choice problem is converted into a route choice problem in the expanded network. The free utility model for this expanded network can be written as
where
Oi is the information-processing entropy for bounded rational travelers and f k i is the flow on the kth path from node i to the corresponding dummy origin node i . The relationship between path flow f k i and link flow x a in the expanded network is x a = i k f k i δ a,k i , where δ a,k i is 1 if path k uses link a and 0 otherwise. Similar to Eq. (13), Eq. (14) is a SUE model for traffic assignment on the expanded network. By solving it, we can obtain not only the traffic flow on the segment of the real transportation network but also the trip volume between TAZs (i.e., flow x i i along dummy link i i ) and the trip volume attracted by each TAZ (i.e., flow x ii along dummy link ii ). Such a model, which can simultaneously predict trip distribution and traffic flow, is called a combined distributionassignment model in transportation science [44] . However, the combined model established by the free utility framework is more interpretable than most previous combined distribution-assignment models. It clearly shows the interaction of travellers with bounded rationality on the links and destinations of the real transportation network. 
In this paper, we developed a free utility model that can explain the social gravity law from the perspective of individual choice behavior. The model makes two basic assumptions: (1) the individual pursues utility maximization, and (2) the individual needs to pay the information-processing cost to acquire more knowledge about the utilities of the destinations. The objective function of the free utility model of the destination choice system with a single origin (see Eq. (7)) is mathematically consistent with the Helmholtz free energy in physics. In other words, this destination choice system is analogous to the isothermal and isochoric thermodynamic system that consists of several subsystems in thermal contact with a large reservoir: the number of travelers is analogous to the number of particles; the first term of the free utility model's objective function is analogous to the thermodynamic system's internal energy including potential energy; the information-processing price is analogous to the temperature of the reservoir; the information entropy is analogous to the entropy of the thermodynamic system; the information-processing cost is analogous to the heat transferred between the thermodynamic system and the reservoir; and the marginal utility is analogous to the chemical potential of the subsystem.
However, the essence of these two systems is different: the thermodynamic system follows the minimum free energy principle to make the system reach the equilibrium state in which all subsystems have the same chemical potential [47] , and the maximization free utility of destination choice system is the result of individuals following the equimarginal principle to make choices to maximize their own utility.
Some previous models, including the free cost model [29] and the maximum entropy model [27] , have not shown a clear derivation of the gravity model from microscopic mechanisms [52] . The free cost model presented by Tomlin and Tomlin derived the gravity model by analogy with the Helmholtz free energy, but it did not explain the social gravity law from the perspective of individual choice behavior. In our opinion, this model is not essentially different from the unconstrained gravity model established by direct analogy with Newton's law of universal gravitation. Similarly, Wilson's maximum entropy model on the gravity model can provide only the most likely macrostate but cannot describe individual choice behavior. The maximum entropy model also requires the prior constraint of the total cost, which is actually the result of individual choice. Additionally, both of these physical analogy models ignore the interaction among individuals, which is a ubiquitous phenomenon in social systems [6] . In comparison, we provide a concise explanation for the social gravity law from the perspective of individual behavior. It simultaneously reflects two dominant mechanisms that are common in social systems, namely, individual interaction and bounded rationality. This line of explanation brings us to the idea that the social gravity law is a phenomenon resulting from bounded rational individuals interacting with each other. The free utility model can explain not only the social gravity law but also the potential function in game theory from the perspective of individual behavior. The free utility model is a stochastic potential game model [53] in mathematical form. The objective function of the potential game model proposed by Monderer and Shapley was established by analogy with the potential function in physics [48] . The variation in a player's individual payoff due to changes in the player's strategy is equal to the variation in the potential function [54, 55] . Every equilibrium strategy profile of the potential game maximizes the potential function. Under these circumstances, all players have the same payoff, and they cannot unilaterally change their strategy to increase their respective payoff. However, Monderer and Shapley raised a question about the interpretation of potential function: "What do the firms try to jointly maximize?" [48] . In fact, the potential function is not something that players try to jointly maximize. Now we know that players will maximize only their own utility (i.e., the payoff) through the modeling process of the free utility model. A player's optimal choice strategy is to make the marginal utility of each alternative equal. When all players follow this equimarginal principle, the sum of the integral of the marginal utility of each alternative (called total utility in economics) is naturally maximized. In other words, the maximum potential function is the result of players' optimal choice strategy but is not a goal that the players pursue jointly. The free utility model can also provide an explanation for the objective function of the classic traffic assignment model in transportation science. From Eq. (13), we can see that the free utility model for the transportation network is mathematically consistent with the SUE model [51] . Without considering the informationprocessing cost, the free utility model is mathematically consistent with the classic user equilibrium (UE) model established by Beckmann [56] . The equilibrium solution of the UE model, in which all paths used between each OD pair have equal and minimum costs, is simply the result of the optimal path choice strategy selected by travelers following the equimarginal principle. The objective function of the UE model, i.e., the sum of the integral of the marginal utility (negative cost) of each link, is actually the negative free utility without informationprocessing cost. This provides new insights into UE and SUE models.
We know that the free utility model can be used to predict trip distribution and traffic assignment in the four-step travel forecasting procedure. Moreover, the free utility model can also be used to predict modal splits in the four-step procedure [5] . If we regard transportation modes as alternatives and assign the appropriate utility to each mode, we can build a free utility model similar to that shown in Eq. (7) to predict the number of travelers selecting different modes. Compared with the Logit model, which is the model most frequently used for mode choice prediction in transportation science, the advantage of the free utility model is that it can reflect the interaction among travelers. For example, congestion in subways has a negative effect on utility in this mode. However, the Logit model does not consider the congestion caused by individual interaction [37] that is common in actual transportation systems. Furthermore, mode choice can be combined with destination choice and route choice to build a multistep combined model under the free utility framework. This requires only that the real transportation network shown in the bottom layer of Fig. 3 be expended into a multimode integrated transportation network. By the same token, travel choice behaviors such as trip frequency choice and departure time choice can also be modeled in combination with the above steps under the free utility framework. In summary, such combined models allow us to systematically study the entire travel decision-making process of interacting bounded rational travelers and quantitatively analyze the complex transportation system under the more interpretable analytic framework.
Finally, although we use individual destination choice behavior in the transportation system as background to explain the social gravity law, such behavior of selecting alternatives exists not only in the transportation system but also in systems where the spatial interaction patterns follow the social gravity law. For example, population migration involves selecting locations as residences, social interaction involves selecting people as friends and scientific collaboration involves selecting researchers as partners. In these systems, individuals tend to select alternatives with relatively high activity and relatively low distance, and changes in the number of individuals who select the same alternative will affect the variation in the utility of the alternative. For example, an increase in commodity competitors for the same product will lead to a decrease in the product price, and an increase in collaborators with one scientist will lead to a decrease in cooperation intensity between this scientist and her collaborators. The spatial interaction behavior in these different systems can be described by the free utility model. Not only that, the free utility model of the destination choice system with a single origin (see Eq. (7)) can be used for generalized problems of human choice, where homogeneous individuals select from multiple alternatives with utility associated with the choices. Moreover, using the dummy network method, we can extend the free utility model to individuals of different types (i.e., heterogeneous individuals). The dummy network in Fig. 2 can be regarded as a case in which two types of individuals select from among three alternatives. In this network, the utility of the solid line represents the utility component of the alternative for the corresponding type of individual, and the utility of the dashed line represents the utility component of the alternative for both types of individuals. In short, the free utility model that explains the social gravity law not only helps us deeply understand collective choice behavior patterns emerging from the interaction of bounded rational individuals but also shows potential application in predicting, guiding or even controlling human choice behavior in various complex social systems.