Hi math stackexchange :)
I am having trouble formulating a mathematical constraint which ensures that if a retailer is allocated to multiple palletspaces, then those palletspaces are next to one another. Shops can only use one port.
I have the following input parameters:
- SL denoting shop labels (i)
- PL denoting port labels (j)
- PSL denoting palletspace labels (l)
- D_jl denoting the distance from port j to palletspace l
- S =range(0, len(SL)
- P =range(0, len(PL)
- PS =range(0, len(PSL)
And the following variables:
- $x_{ijl} =$ 1 if shop i is using pallet space l through port j, 0 else
- $i_{il} =$ 1 if shop i is using pallet space l, 0 else
How I imagine the solution
Introduce new variables:
Starting pallet space
$s_l=\sum_{l \in PS} l*x_{ijl}$
Ending pallet space
$e_l=\sum_{l \in PS} l*x_{ijl}$
LP constraint
$e_l - s_l \le \sum_{l in PS} l*i_(il)$, $\forall i \in S$
Problem
However, it just doesn't seem to work.
Any help is appreciated :)