Development of a Configurable Real-time Event Detection Framework for Power Systems using Swarm Intelligence Optimization