Day-ahead unit commitment model for microgrids