Assign sequence based on simple calculation

52 Views Asked by At

I'm developing a model for truck sequencing at a warehouse. I want to sequence the trucks based on a value ($Q$) equal to the multiplication of their priority ($\alpha$), arrival time (continuous variable $A_i$), and the load they are carrying ($a_{ik}$). $$ Q(i)=\alpha \cdot A_i \cdot a_{ik} $$ I know I have to use a binary variable $p_{ij}$ that is $1$ if inbound truck $i$ and $j$ are assigned to the same door and truck $j$ is a predecessor of truck $i$.

How do I make sure it takes into account $Q(i)$ when assigning $p_{ij}$ and write the constraint?

1

There are 1 best solutions below

6
On

Let $o_{id}^r$ be a binary variable that takes value $1$ if and ony if truck $i$ has departure rank $r$ on door $d$, and let $y_{id}$ be a binary variable that takes value $1$ if and only if truck $i$ is assigned to door $d$. Let $\delta_{ij}$ be a binary variables that takes value $1$ if and only if $Q_i > Q_j$.

Constraints :

  • Each truck is assigned to exactly one door $$ \sum_{d} y_{id} = 1 \quad \forall i $$
  • Each truck has a unique departure rank : $$ \sum_{d,r} o_{id}^r = 1 \quad \forall i $$
  • If a truck is assigned to door $d$, its rank must be in door $d$: $$ y_{id} \le \sum_{r} o_{id}^r \quad \forall i,d $$
  • If $Q_i > Q_j$, activate $\delta_{ij}$ : $$ Q_i - Q_j \le M \delta_{ij}\quad \forall i,j $$
  • If a truck $i$ is assigned to door $d$ and has $Q_i$ greater than $Q_j$ for any other truck $j$ assigned to $d$, then its order must be smaller : $$ r o_{id}^r \le s o_{jd}^s + 1 + M(3-y_{jd}-y_{id}-\delta_{ij}) \quad \forall r,o,i,j,d,s $$