I am using a MIP formulation to decide which dates and locations (i.e. stops) should be chosen for a route that maximizes the total revenue over all chosen stops. My decision variable $X$ is the permutation of all possible locations $L$ and all possible dates $T$, where $X[l,t]$ represents the binary choice of a location $l \in L$ and date $t \in T$.
I have a revenue matrix $R$, where $R[l,t]$ represents the revenue estimate for a given location-date pair. I also have a distance matrix $D_l$ which gives the distance between any two locations, as well as a time distance matrix $D_t$ which gives the number of days between any two dates. I am also operating with the constraints:
- The route has at most $N$ stops: $\sum X[l, t] \leq N$
- Each date may be chosen at most once: $\sum_{l \in L} X[l, t] \leq 1 \space \forall \space t \in T$
- Each location may be chosen once: $\sum_{t \in T} X[l, t] \leq 1 \space \forall \space l \in L$
A requirement of the problem is that each stop on the route has to be within $d$ miles of the previous stop, and between $t_1$ and $t_2$ days of the previous stop. For example, this could mean that any two stops on the route must be within 250 miles of each other and between 5 and 7 days apart from each other.
My first attempt was to find the set of "invalid" choices for each choice in my decision variable. This means for each choice $X[l,t]$, I found the set of other choices $Y$ that satisfy the conditions:
- $D_l[l, l'] > d \space \forall \space l' \in L$
- $D_t[t, t'] < t_1 \space \forall \space t' \in T$
- $D_t[t, t'] > t_2 \space \forall \space t' \in T$
Then, when building the constraints, requiring $\sum Y \le 1 - X[l, t]$ for each location date pair in my decision variable. Efficiency of this approach aside, it doesn't work as it is naive to any ordering of stops on the route and ultimately restricts my solution space down to a single valid location date pair.
I also attempted the "inverse" formulation, where for each choice I found all "valid" choices (essentially flipping the equalities of the previous conditions), $Y'$, and building the constraints $\sum Y \ge X[l,t]$. This also doesn't work as it is just not restrictive enough to prevent invalid routes.
I'm at an impasse at this point and could use help from the community on my formulation of these constraints. I believe that if I could encode the ordering of stops into the constraints, i.e. that the distance and time conditions only apply to the next stop on my route and not all stops, I would have a working solution.
Any and all help is much appreciated!