  A method for identifying and quantifying the flexibility of electricity
demand in a production plant is reported. The plant is equipped with electric
machines, product storage silos, distributed generation, and electrical storage
systems. The method aims to minimize production costs. To achieve this, the
plant is mathematically modeled, and an economic optimization problem is
formulated by managing these plant equipment. From this optimal schedule (base
schedule), the feasibility of modifying it to sell or buy energy in the
electricity balancing regulation markets is evaluated, thus obtaining the so
called flexibility schedule. Finally, this method was successfully applied to a
real case using data from a Spanish cement production plant.
