It must be jolly complicated, but ultimately all about causing the least lost profit. The usual first targets are short haul destinations with multiple flights per day, though presumably a whole bunch of other factors come into play- expected loads on upcoming flights, numbers of people connecting to other flights, and the indirect impact of cancellations such as planes and crew being the wrong place.