Optimal Unit Commitment with Renewable Energy in Regulated and Deregulated Systems