An efficient framework for brownout based appliance scheduling in microgrids