The unit commitment model for the smart grid