The method involves detecting (S101) a state of the power system. One of the case base is determined (S102) by comparing the detected state from the cases with the case base comprised with state descriptions. The determined case to recover the state switching action for the network element to correct the detected state of power system is instructed (S103). The indicated switching action is instructed by displaying the specified switching action by display device for user and/or automatically executing the specified switching operation by switching device for controlling power system. Independent claims are included for the following: (1) computer program product for operating network elements; and (2) device for operating network elements.