Patterns for self-adaptive systems: agent-based simulations