An agent-based simulation framework for complex systems