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?
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 :