# Center(s) of Gravity¶

Access the *Center(s) of Gravity* page via the menu bar: *Analytics > Center(s) of Gravity*. On this page you can run center of gravity calculations and specify constraints.

There are two scenarios, detailed below:

For large datasets these calculations can take some time (varying from about half a minute up to several minutes).

When you are finished calculating CsoG on this page, use the buttons at the bottom to go to other pages:

Go toSolution Details to see details about individual CsoG in the solution.Go toCosts to see an overview of costs based on these calculations.Go toFix Locations to set DCs as fixed locations.

## Demand/Supply Distribution Map¶

The map shows your demand/supply locations as specified on the *Demand and Supply Distribution* page. When one or more centers of gravity are calculated by solving one of the scenarios, the map also displays the center(s) of gravity.

**Show in Map**- Use the switch in this widget to show or hide arcs indicating which DC (CoG) is serving which supplier/customer. If you have a big dataset you might want to switch off the display of these arcs.

## Output¶

After calculation is done, output is detailed on the *Center(s) of Gravity* page in various widgets:

**Output Drive Time**- The resulting average and maximum drive times are displayed in the
*Output Drive Time*widget. These drive times are in hours, based on the drive times of all locations that are taken into account. **Output Service**- In the
*Output Service*widget you can see the total number of locations serviced by the center(s) of gravity. You can also see the total volume (load) that is serviced. **Drive Time Distribution**- The
*Drive Time Distribution*bar chart shows you the distribution of drive times from location to DC. Each bar represents the number of locations with a drive time within a certain time interval.

## Multiple DCs Scenario¶

The *Multiple DCs Scenario* calculates one or more centers of gravity for you. These center(s) of gravity are possible locations for your DCs. They are calculated such that the total travel distance to all specified demand/supply locations is minimal.

The algorithm which is used to calculate these centers of gravity is explained below.

### Algorithm¶

Imagine that each of your demand/supply locations has a certain force proportional to its load. They each pull on the location of a single center of gravity (CoG). When each location uses its force to pull in its own direction, the CoG ends up in the center of those forces. At that moment, the algorithm has found the location that minimizes the total load travel distance.

To find multiple (N) centers of gravity (CsoG), the algorithm starts with N locations being the CsoG. The app assigns the closest CoG as the serving DC for each demand/supply location. For each DC (=CoG), the algorithm locates the optimal location for each CoG based on the loads of the locations that it serves.

This process is reiterated. The demand/supply locations are reassigned to the closest CoG location, based on new locations calculated for CsoG. Then, according to the loads of new supply/demand assignments, the CsoG are relocated. The process is reiterated until a final balance is found with N centers of gravity and each supply/demand location is served by the closest center of gravity, resulting in a minimal total load travel distance.

### Number of Centers of Gravity¶

In the *Number of Centers of Gravity* widget, enter the number of DCs (= Centers of Gravity) as an integer between 1 and the total number of locations that you take into account. After specifying this number, click *Solve Multiple DCs Scenario* to solve again.

## Solve Drive Time Scenario¶

In this scenario, **Center of Gravity Navigator** runs the Multiple DC scenario several times to find a number of DCs that satisfies the specified maximum drive time. This means that for each demand/supply location, the drive time to its serving DC (center of gravity) will be at most the maximum drive time you specify. Please note that the current algorithm does not minimize the number of DCs.

**Maximum Drive Time**- In the
*Maximum Drive Time*widget, you can specify the maximum number of hours (!) that demand/supply is allowed to travel from DC to demand location/supply location to DC. After entering this number, click the*Solve Drive Time Scenario*button.