Many of the existing electricity markets are of the mixed type, which has pool auction and bilateral contracts between producers and distributors. In this case, the problem faced by a Generation Company (GenCo) is that of maximizing the revenues from participating in the market through the pool auction while honoring the bilateral contracts agreed, for which the revenue is fixed. The extension to mixed markets of a medium-term model, successfully employed for auction-only markets, is presented. It results in a non-convex expected revenue function to be maximized subject to constraints, for which the currently available direct global-optimization solvers prove not to be efficient enough. A heuristic procedure based on a sequence of solutions by a nonlinear solver is presented, and numerical results obtained with several realistic cases show satisfactory results. The test cases presented have dispatchable and non-dispatchable renewables and consider medium-term pumping together with conventional units by all GenCos participating in the mixed market. The advantages for GenCos of employing medium-term results as those produced by the model presented, include, among others, the evaluation of the expected profitability of their bilateral contracts. (C) 2017 Elsevier B.V. All rights reserved.