Given a city map (a graph) $G$,
$b_{i,j}$ is a Boolean variable for whether or not edge $i$,$j$ is allocated, $d_{i,j}$ denotes the distance between $i$,$j$.
The objective is to move from $s$ to $e$ in minimum time. (I am trying an add intermediate stop point with a time limit)
$$\sum_{i,j} b_{i,j} \times d_{i,j}$$
The journey starts from $s$ and ends at $e$.
$$\sum_{i} b_{i,s} - \sum_{k} b_{s,k} = -1$$
The above equation ensures no incoming edges at $s$, i.e., exactly one edge leaves the starting point.
$$\sum_{i} b_{i,j} - \sum_{k} b_{j,k} = 0$$
The above equation ensures the equal number of edges going in and out, i.e., flow conservation.
$$\sum_{i} b_{i,e} - \sum_{k} b_{e,k} = 1$$
The above equation ensures no outgoing edges at $e$, i.e., exactly one edge enters the target node.
To calculate the time at $e$ I can use:
$$\text{time}_{e} = \frac{\sum_{i,j} b_{i,j} \times d_{i,j}}{\text{speed}} + \text{time}_{s}$$
But how can I force the solver to take an intermediate node $j$ forcefully into its path with time limit constraint, i.e., time-bound to reach there?
For example if there is a path from $i$ to $j$ then:
\begin{align}\text{time}_j &= \sum_{i} b_{i,j} \times \left( \frac{d_{i,j}}{\text{speed}} + \text{time}_i\right)\\\text{time}_j &\leq c\end{align} where $c$ is a constant value.
But the solver doesn't accept the above formulation.