  The European market clearing problem is characterized by a set of
heterogeneous orders and rules that force the implementation of heuristic and
iterative solving methods. In particular, curtailable block orders and the
uniform purchase price (UPP) pose serious difficulties. A block is an order
that spans over multiple hours, and can be either fully accepted or fully
rejected. The UPP prescribes that all consumers pay a common price, i.e., the
UPP, in all the zones, while producers receive zonal prices, which can differ
from one zone to another.
  The market clearing problem in the presence of both the UPP and block orders
is a major open issue in the European context. The UPP scheme leads to a
non-linear optimization problem involving both primal and dual variables,
whereas block orders introduce multi-temporal constraints and binary variables
into the problem. As a consequence, the market clearing problem in the presence
of both blocks and the UPP can be regarded as a non-linear integer programming
problem involving both primal and dual variables with complementary and
multi-temporal constraints.
  The aim of this paper is to present a non-iterative and heuristic-free
approach for solving the market clearing problem in the presence of both
curtailable block orders and the UPP. The solution is exact, with no
approximation up to the level of resolution of current market data. By
resorting to an equivalent UPP formulation, the proposed approach results in a
mixed-integer linear program, which is built starting from a non-linear integer
bilevel programming problem. Numerical results using real market data are
reported to show the effectiveness of the proposed approach. The model has been
implemented in Python, and the code is freely available on a public repository.
