Such models calculate potential bilateral trade as a function of the size of the nations, the physical distance between them, and other factors such as whether they share a language, a colonial past, a border, membership of a free-trade zone, and so on.