Mathematical Modeling of Social Insect Colonies as Complex Adaptive Systems