I'm currently struggling with a MIP. Have to model a truck delivering packages for customers in the set $C = \{1,2,3,4,5\}$. The travel time from location $i$ to $j$ I've defined as $t_{ij}$. The truck must start from location 0 and can travel to any customer in any order, provided all customers are visited. I've set the variable $x_{ij}$ to be 1 if the truck travel from location $i$ to $j$ and 0 otherwise.
I'm struggling with this part of the problem. Each customer has a time $E_i$ as the earliest allowed time of arrival for customer $i$ and $L_i$ as the latest possible time of arrival. If the truck arrives early it's charged 3 dollars /min early and 2 dollars/min late.
I've had trouble adding that into my objective function and as a constraint. So far I've attempted to use the variable $A_i$ to represent time of arrival to location $i$. Unfortunately the issue here is I am unable to find a way to determine the order of the deliveries to sum the time.
Any insight would be much appreciated, thank you!