Macroscopic stream models represent how the behaviour of one parameter of traffic flow changes with respect to another. Most important among them is the relation between speed and density. The first and most simple relation between them is proposed by Greenshield. Greenshield assumed a linear speeddensity relationship as illustrated in figure 1 to derive the model.
Figure 1: Relation between speed and density

The equation for this relationship is shown below.

(1) 
where is the mean speed at density , is the free speed and is the jam density. This equation ( 1) is often referred to as the Greenshields' model. It indicates that when density becomes zero, speed approaches free flow speed (ie. when ).
Figure 2: Relation between speed and flow

Once the relation between speed and flow is established, the relation with flow can be derived. This relation between flow and density is parabolic in shape and is shown in figure 3. Also, we know that

(2) 
Figure 3: Relation between flow and density 1

Now substituting equation 1 in equation 2, we get

(3) 
Similarly we can find the relation between speed and flow. For this, put in equation 1 and solving, we get

(4) 
This relationship is again parabolic and is shown in figure 2. Once the relationship between the fundamental variables of traffic flow is established, the boundary conditions can be derived. The boundary conditions that are of interest are jam density, freeflow speed, and maximum flow. To find density at maximum flow, differentiate equation 3 with respect to and equate it to zero. ie.,
Denoting the density corresponding to maximum flow as ,

(5) 
Therefore, density corresponding to maximum flow is half the jam density Once we get , we can derive for maximum flow, . Substituting equation 5 in equation 3
Thus the maximum flow is one fourth the product of free flow and jam density. Finally to get the speed at maximum flow, , substitute equation 5 in equation 1 and solving we get,

(6) 
Therefore, speed at maximum flow is half of the free speed.
Inorder to use this model for any traffic stream, one should get the boundary values, especially free flow speed () and jam density (). This has to be obtained by field survey and this is called calibration process. Although it is difficult to determine exact free flow speed and jam density directly from the field, approximate values can be obtained from a number of speed and density observations and then fitting a linear equation between them. Let the linear equation be such that is density and denotes the speed . Using linear regression method, coefficients and can be solved as,
Alternate method of solving for b is,
where and are the samples, is the number of samples, and and are the mean of and respectively.