I'm facing the following problem as I am trying to model a problem where people visit facilities according to their age and per a time horizon. Additionally, I am trying to allocate specific commodity types to these demands, as in certain people cannot receive certain type of product at these facilities. Till now, I have only managed to write the following variables, parameters and constraints.
J: Set of location of facilities
I : Set of locations of the demand
A: Set of age groups of the demand i.e., 80 and over, 70-79, and so on till 19 and below.
C: Set of commodity types i.e A, B, C
$S_a$: Social cost per age group A
$MV_a$: Maximum workload that can be done by the staff per time period t
$f_j$: Fixed opening cost of a facility at a location j
$HC_j$: People handling capacity of a facility at location j
$SC_j$: Storage capacity of a facility at location j
$IV_j$: Inventory holding cost of a facility at a location j
$O_{j}$: Operating cost of a facility at a location j
$VP_t$: Pay of staff at facility per time period t
$D_{ia}$; Demand from location i of age group a
$D_{ij}$: Distance between location i and location j(facility)
$S_{jct}$: Supply of commodity c at location j at time period t
$z_{ijat}$: demand at location i of a particular age group a to location j at time period t
$y_j$: 1, If location j is opened or not; 0 otherwise
$i_{jct}$: Inventory at location j of commodity c at time period t
$vs_{jt}$: Staff at location j at time period t
I have the following constraints:
$$\sum_{j \in J}\sum_{t \in T} \sum_{i \in I} \sum_{a \in A} z_{ijta} D_{ij} O_j + \sum_{j \in J} \sum_{t \in T} vs_{jt} VP_t + \sum_{j in J} \sum_{c \in C} \sum_{t \in T} I_{jct} IV_{j}$$
Constraints:
$$\sum_{t \in T}\sum_{j \in J} z_{ijta} = D_{ia} S_{a} \forall i \in I, a \in A$$
$$\sum_{i \in I} \sum_{t \in T} \sum_{a \in A} z_{ijta} \leq MV_t* \sum_{t \in T} vs_{jt} \forall j \in J $$
$$ MV_{t} * vs_{jt} \leq HC_j * y_j \forall j \in J, t \in T$$
$$ \sum_{i \in I} \sum_{a \in A} z_{ijta} \leq \sum_{c \in C} I_{jct} * y_j \forall j \in J $$
$$\sum_{c \in C} I_{jct} = \sum_{c \in C} S_{jct} - \sum_{i \in I} \sum_{a \in A} z_{ijta}, t = 1, \forall t \in T, j \in J $$
$$\sum_{c \in C} I_{jct} = \sum_{c \in C} I_{jct-1} \sum_{c \in C} + S_{jct} - \sum_{i \in I} \sum_{a \in A} z_{ijta}, t > 1, \forall t \in T, j \in J $$
$$\sum_{t \in T} \sum_{c \in C} I_{jct} \leq SC_j \forall j \in J$$
Constraint(1) ensures that the demand from location i reaches location j as per a social cost, for instance the social cost might be 80+ - 1, 70- 79 - 0.1, etc. Constraint(2) ensures that the staff at the facilities is more than the demand received. Constraint(3) ensures that the staff at location j, is less than the handling capacity of the location. Constraint(4) ensures that the demand allocated at location is less than the inventory. Constraint(5) and constraint(6) ensure that inventory flow is maintained at each time period and it keeps getting updated for utilised demand, we minimise the inventory in the objective in order to have as small inventory as possible. Finally, constraint(7) ensures that the inventory is less than the storage at that location.
Additionally, we have the following: $$ y_j \in \{0,1\}, z_{ijta}, i_{jct}, vs_{jt} \in R $$