Matt. 24:15-18 is not parallel with Luke 17:31 (and the context) at all. Why?
Well, because Luke 17:31 (and the context) is using the experiences of Noah and Lot to teach about total destruction of the earth at the end of this age:
And the end of this age features the return of Christ for the events of the 7th trumpet of Rev. 11:18. In other words, the verses above from Luke 17:28:33 are focusing on the "total destruction" aspect of the judgment destruction BY FIRE at the Second Coming of Christ--and not that the judgment BY FIRE/BRIMSTONE is "localized" to a few cities and so on.Luke 17
28 Likewise also as it was in the days of Lot; they did eat, they drank, they bought, they sold, they planted, they builded;
29 But the same day that Lot went out of Sodom it rained fire and brimstone from heaven, and destroyed them all.
30 Even thus shall it be in the day when the Son of man is revealed.
31 In that day, he which shall be upon the housetop, and his stuff in the house, let him not come down to take it away: and he that is in the field, let him likewise not return back.
32 Remember Lot's wife.
33 Whosoever shall seek to save his life shall lose it; and whosoever shall lose his life shall preserve it.
On the other hand, Matt. 24:15-18 comes under the following caveat verses; therefore, it deals with the destruction of Jerusalem and the temple of those days:
32“Now learn the parable from the fig tree: when its branch has already become tender and puts forth its leaves, you know that summer is near;
33so, you too, when you see all these things, recognize that He is near, right at the door.
34“Truly I say to you, this generation will not pass away until all these things take place.
35“Heaven and earth will pass away, but My words will not pass away.