A Price-Dynamic Model Of Flexibility In The Electricity Market Of The Future