Adaptive Mechanisms of Organizational Structures in Multi-agent Systems