Constrain traveling salesman: visit a given city within a given distance from start
You can easily impose the constraint that a given city should be visited before a given location in the sequence. I.e., that city 5 should be one of the three first visited:

node_order[5 - 1] &lt;= 3


Or that city 7 should be visited as the third, fourth, or fifth:

node_order[7 - 1] &lt;= 5,
node_order[7 - 1] &gt;= 3


This does not exactly impose the constraint on cumulative distance, though.