Medium-Term Planning in Deregulated Energy Markets with Decision Rules