Advanced Smart Grid Functionalities Based on PowerFactory