Dynamic security control in a deregulated electricity market