Multi-agent system for dynamic scheduling