A Price-Dynamic Model of Flexibility in the Electricity Market of the Future