I've yet to find a system in D&D for running away from fights that I really like. Here are paraphrases of the major options found in old school D&D:
1) Compare speeds of the slowest character fleeing with those of the fastest character pursuing. If the fleeing characters are faster, they get away. If they are slower, they must drop treasure, rations, or equipment to slow the pursuers down.
2) Roll some dice (a d20, 2d6, whatever) for each side and add the speed of the slowest party member in each case. If the fleeing characters roll higher, they get away. Otherwise, the monsters can attack them.
3) Each character rolls some dice when they run, which variably extends their movement. If the fleeing characters can stay ahead of their opponents for some set period of time, they escape. Otherwise, the pursuers catch them and they must begin fleeing all over anew.
There are some alternates of each of these which vary the details slightly, but the basics are still one of: Straight comparison, variable movement & roll high.There are elements of each of these systems that I like, but I generally find that their feel in practice is the wrong mix of agency, chaos and time for what I want in a system governing routs.
I propose a system governing routs should have minimal decision making in it, and lots of chance, that it should take more than a single roll or decision to determine whether the PCs get away, and that it should have an indeterminate end point. Ideally, it should also be quick to resolve any given roll, with serious but not necessarily decisive consequences for for failure (the monsters should not automatically kill the PCs if they fail to successfully flee).
With this in mind, I propose the following system for routs. It relies on the Necrocarcerus system of encumbrance (which uses four categories: Unencumbered, lightly encumbered, heavily encumbered, and overloaded).
1) A chase roll starts as a roll of 2d6. Each side in a chase will make a chase roll each round.
2) Pursuers and fugitives may split up from other pursuers and fugitives, respectively. This allows them to make separate chase rolls.
3) Compare the die values of each chase roll with the others. If they match, then those characters or groups have come in contact long enough to conduct a single round of melee combat. If there are multiple available groups to attack, the pursuers may choose which they attack (all groups with matching values are considered to be present though). At the start of the next round, both sides make chase rolls again.
e.g. The pursuers roll a 1 and a 5, and the fugitives roll a 2 and a 5, the pursuers may attack the fugitives that round. If one set of fugitives had rolled 2 and 5, and another set had rolled 3 and 4, only the first group could be attacked. If the first set of fugitives had rolled 2 and 5, and the second had rolled 5 and 6, the pursuers could choose either or both to attack (provided they had sufficient attacks to distribute).
4) If the pursuers roll a "7", then they catch sight of the fugitives long enough to make ranged attacks (if they have them). If the fugitives roll a "7" then they have ducked out of sight long enough to hide (either making a Stealth check or Hide in Shadows check) and the pursuers must spot them using their passive perception in order to continue chasing them.
5) Each category of encumbrance above Unencumbered adds an extra d6 to a fugitive's chase roll. Characters may drop gear to lighten their encumbrance load.
6) Groups leave the chase when one side or the other's chase roll comes up with all the die values the same. i.e. Doubles if they are rolling 2d6, triples if they are rolling 3d6, etc. Fugitives successfully escape, while pursuers have cornered their victims and ordinary combat resumes without the possibility of escape. Ties go to the fugitives. If there are multiple groups of fugitives, each group must successfully escape on its own. A single pursuer chase roll can only corner one group.
7) Chases also end when the pursuers decide to break off the chase, or when all the fugitives are hidden.