Demo models‎ > ‎

Hotelling's Law

An application of Hotelling’s Law (1929) in a two-dimensional space. 

By Hugo Lhuillier (2016)

The original Hotelling model

Hotelling (1929) studied competition between firms in an oligopolistic context, adding to the initial work of Edgeworth the importance of geographical location.  In his original model, firms could compete with each other by changing both their price and their location.  A detailed description of the original model can be found here.

The JAS-mine implementation

This application of Hotelling’s model simplifies it by only considering changes in location, assuming identical prices across firms and constant prices over time.  If changes in locations are likely to be stickier than variations in prices, one could instead interpret this model as one of competition in advertising campaigns.  In this way, firms do not change the location of their store in every period but vary the position where their ads are located, such as to maximise the number of people that will see them. 
Following Ottino, Stonedahl, and Wilensky (2009), this application extends the original paper by allowing stores to move along a plane (two-dimension movement). One difference between the NetLogo representation and ours is the way distance between consumers and firms is defined. In their model, one unit of distance corresponds to the four cardinal directions around a given coordinate. Here, we also include the positions at the north-west, north-east, south-east and south-west. 

The consumer is on the grey square, while the firm is on the circled position. Numbers in each cell identify the distance from the consumer.
 NetLogo distance JAS-mine distance 


The model implements the JAS-mine Model-Collector-Observer architecture, with two @Entity class: firms and consumers/households. The parameters characterizing the grid and the number of firms are annotated in the model with @GUIparameter.  The colorSurface parameter is a Boolean that determines whether the preferences of consumers (which firm is the closest to them) will appear on the grid. 

The timing of events is as follow: in each period,
  1. Households locate which stores is currently the closest, 
  2. Firms know their current revenue, which is the number of consumers if they remain in the current spot (1).  Firms then compute the revenue they would have if they were to move to either of the eight nearest-neighbour positions - assuming the other firms remain at their current place.  The firm eventually moves to the location that yields the highest revenue,
  3. Households consume based on the final location of the stores (demand is perfectly inelastic). 


As in the original model, a stable equilibrium exists for a duopoly (two firms), in which case it is located at the middle of the plane. For numbers of stores greater than two, the existence of an equilibrium depends on the specific number of firms.  An even number of firms tends to display more regular and stable patterns than an odd number of firms.
Specifically for four firms, a (stable) equilibrium emerges with each firm having a quarter of the market.  Similarly for eight firms, all firms ends up with an eight of the market.  Furthermore, firms behave as in the four-firms case, with two firms per quarter of the grid, and these two firms located on the same spot.


  • Hotelling H (1929). Stability in Competition. The Economic Journal 39 (153): 41-57. 
  • Ottino B, Stonedahl F, Wilensky U(2009). NetLogo Hotelling's Law model.'sLaw. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.

The source code repository for this model is available on GitHub at  Executable versions of the demo models including Hotelling's Law can be found at