if M I G R A T E r > 0 {\displaystyle MIGRATE_{r}>0} then S U M I M = ∑ R M I G R A T E r ∗ P O P r {\displaystyle SUMIM=\sum ^{R}MIGRATE_{r}*POP_{r}}
if M I G R A T E r ≤ 0 {\displaystyle MIGRATE_{r}\leq {0}} then <math>SUMEM=\sum^{R}MIGRATE_{r}*POP_{r}