I am with a problem that consists of determining whether a VRP instance is feasible, this question is a continuation of an older thread. In order to do it, I was thinking of using Constraint Programming (CP). Since this is my first time using CP, I am facing some problems, specifically, in what concerns modeling the subcycle constraints in CP. Before I show the CP model, let's define the VRP notations to substantiate the model. Let
- $D(V, A)$ be a complete digraph;
- $V$ be the set of nodes;
- $0 \in V$ be the depot node;
- $A$ be the set of arcs;
- $t_a$ be the arc $a$ metric traversing time;
- $T$ be a vehicle's time limit; and
- $M$ be the set of available vehicles.
Note that we are dealing with the Distance Constrained VRP (DCVRP) variant. Since we just want to find a feasible solution, if such exists, there's no need for optimizing anything, hence model this problem as a decision problem suffices. Let
- $x_a \in \mathbb{B}$ be equals to $1$ if arc $a \in A$ is used in the solution, and $0$ otherwise;
- $\mu_i \in \mathbb{R}_{+}$ be equals to the amount of incurred time at node $i \in V\backslash\{0\}$;
Below is presented a CP model: $$ \sum_{a \in \delta^{+}(i)} x_a = \sum_{a \in \delta^{-}(i)} x_a \quad \forall i \in V \quad (1)\\ \sum_{a \in \delta^{+}(i)} x_a = 1 \quad \forall i \in V \backslash \{0\} \quad (2)\\ \sum_{a \in \delta^{+}(0)} x_a \leqslant |M| \quad (3)\\ u_i \geqslant t_{0i} x_{0i} \quad \forall i \in V \backslash \{0\} \quad (4)\\ u_j \geqslant u_i + t_{ij} x_{ij} - T (1 - x_{ij}) \quad \forall i, j \in V\backslash \{0\} \quad (5)\\ u_i \leqslant T - t_{i0} x_{i0} \quad \forall i \in V\backslash \{0\} \quad (6) $$
The constraints set (1) represents the degree constraints. The set of constraints (2) states that every customer must be visited exactly once. The set of constraints (3) forces that every solution use at most $|M|$ routes. And, the constraints sets (4-6) are the MTZ constraints to avoid subcycles disconnected from the depot, and at the same time guarantee that a route will consume at most $T$ of time.
I know I can model the constraints sets (1-3) easily, however, I can not state the same for the sets of constraints (4-6) since I do not know if it is possible to create non-discrete variables in CP models, as I said, this is my first time using CP. Therefore, I would like to know if it is possible to represent the constraints (4-6) in CP or it would require a workaround, and if yes what. Also, I would like to know if anyone has ever solved this problem, determine whether a VRP instance is feasible or not, through CP.
Many thanks for your time and regards.
UPDATE 1: I added the constraints set (2). And stated that the times $t_a$ $\forall a \in A$ are metric.