Gravity Model Trip Distribution

The Gravity Model is a widely-used technique in transportation planning to estimate trip distributions between origins and destinations. It's based on the analogy with Newton's law of gravitation, where the interaction between two places is directly proportional to the product of their sizes (or capacities) and inversely proportional to some power of the distance between them.

Constraints

In applying the Gravity Model for trip distribution, we adhere to several constraints to ensure the validity and accuracy of the results:

  1. Total Column Constraint: The total number of trips for each origin (row) remains constant. Mathematically, this is represented as: \( \sum_{j} T_{i,j} = O_{i} \), where \( T_{i,j} \) is the number of trips between origin \( i \) and destination \( j \), and \( O_{i} \) is the total number of trips produced at origin \( i \).
  2. Total Row Constraint: The total number of trips for each destination (column) remains constant. This is given by: \( \sum_{i} T_{i,j} = D_{j} \), where \( D_{j} \) is the total number of trips attracted to destination \( j \).
  3. Equality of Totals: The sum of all trips produced (sum of the trip production vector) is equal to the sum of all trips attracted (sum of the trip attraction vector). This ensures a balance in the system: \( \sum_{i} O_{i} = \sum_{j} D_{j} \).
  4. Non-negativity: The number of trips between any origin-destination pair cannot be negative. All trip values are either positive or zero: \( T_{i,j} \geq 0 \).

These constraints are crucial in ensuring that the trip distribution results are realistic and adhere to the fundamental principles of trip generation and attraction.

Problems & Challenges

1. Basic Understanding:

Problem: Given a simple trip cost matrix, trip production vector, and trip attraction vector, use the tool to compute the trip distribution.

Data:

Solution: You can input the given data into the tool and observe the results. They should note how the trip distribution values change with different values of alpha and beta.

2. Exploring the Impact of Alpha and Beta:

Problem: Using the data from the previous problem, vary the values of alpha and beta. How do they impact the trip distribution?

Challenge: Find values of alpha and beta that result in the maximum and minimum trip distribution for the first origin-destination pair.

Solution: You can experiment with different values of alpha and beta to see their impact. They should observe that higher values of alpha and beta decrease the influence of the cost matrix on the trip distribution.

3. Ensuring Balance:

Problem: Given a trip cost matrix and trip production vector, adjust the trip attraction vector to ensure that the sum of trip productions equals the sum of trip attractions.

Data:

Challenge: Determine a trip attraction vector that balances the system.

Solution: A balanced trip attraction vector could be 150,100,200. You should understand the importance of balancing trip productions and attractions.

4. Real-world Application:

Problem: Consider three cities: A, B, and C. City A is a major industrial hub, City B is a residential area, and City C is a tourist destination. Given the distances between the cities and the number of trips produced and attracted by each city, compute the trip distribution.

Data:

Solution: You can input the data and observe the results. They should note how the nature of each city (industrial, residential, tourist) impacts the trip distribution.

5. Advanced Challenge: Non-negativity Constraint:

Problem: Given a trip cost matrix, trip production vector, and trip attraction vector, find values of alpha and beta such that one of the trip distribution values becomes zero.

Challenge: This problem helps you understand the non-negativity constraint and how extreme values of alpha and beta can lead to zero trips between certain origin-destination pairs.

Solution: There isn't a unique solution, but You can experiment with extreme values to achieve this.

Virtual Laboratory: Gravity Model Trip Distribution

In this tool, you can compute the trip distribution using the doubly constrained gravity model. The inputs required are:

The generalized cost function is given by: \( f(c_{i,j}) = c_{i,j}^{\alpha} \times exp(-\beta \times c_{i,j}) \), where \( c_{i,j} \) is the cost between origin \( i \) and destination \( j \).

The doubly constrained gravity model ensures that the total number of trips produced at each origin and the total number of trips attracted to each destination are preserved. The formula for the trip distribution is:

\( T_{i,j} = A_{i} \times O_{i} \times B_{j} \times D_{j} \times f(c_{i,j}) \)

Where \( A_{i} \) and \( B_{j} \) are balancing factors that ensure the constraints are satisfied. The computation iteratively updates these factors until the trip distribution converges, i.e., the change in \( T_{i,j} \) between iterations is below a specified threshold.

Please enter the required inputs below and click "Calculate" to compute the trip distribution.

Enter the trip cost matrix (rows separated by semicolons, columns by commas):

Enter the trip production vector (separated by commas):

Enter the trip attraction vector (separated by commas):

Enter the parameters:

Output Trip Distribution \( T_{i,j} \)