Nvidia Optimus, Force GPU when on AC power

Is there a way to force my notebook to always use the Nvidia GPU when on AC power?
My laptop is an Asus ux303lb with an nvidia GT940