# Capacitated Facility Location problem with a dynamic set up cost

I am trying to solve a Capacitated Facility Location Problem (CFLP) with a dynamic setup cost in R.

The problem statement is this:

1. I have the transport cost
2. The fixed operating cost (manual labor and other expenses) is known
3. I know the dropping points with loads and all the details
4. The per square ft. cost of rent of a place is known
5. The size of the Facility will be a function of the load. So the rent will depend on how much load is getting allocated in that place.

Assuming the rent will vary like this:

Now, I have accommodated the first 4 conditions in my code. But I am not sure how the number 5 can be accommodated.

My model looks like this in R(if it can be of any help):

#m is the number of potential facility/service center (SC) locations
#n is the number of customer locations

model <- MIPModel() %>%
# 1 if customer i gets assigned to SC j
add_variable(x[i, j], i = 1:n, j = 1:m, type = "binary") %>%

# 1 if SC j is built
add_variable(y[j], j = 1:m, type = "binary") %>%

# Objective function
set_objective(sum_expr(transportcost(i, j) * x[i, j], i = 1:n, j = 1:m) +
sum_expr(fixedcost[j] * y[j], j = 1:m), "min") %>%

# Every customer needs to be assigned to a SC
add_constraint(sum_expr(x[i, j], j = 1:m) == 1, i = 1:n) %>%

# If a customer is assigned to a SC, then the SC must be built
add_constraint(x[i,j] <= y[j], i = 1:n, j = 1:m) %>%

#The demand of customers shouldn't exceed SC capacities
add_constraint(sum_expr(demand[i] * x[i, j], i = 1:n) <= capacity[j] * y[j], j = 1:m)


I am looking for any headway. Even any link to a relevant article might help.

• What is the formula for rent as a function of load? Nov 17 '21 at 16:02
• Sorry. Should have added that. Now added: total_rent= rent_per_square_ft * load* 0.10 Nov 17 '21 at 16:18
• Rent per square foot is a constant (meaning no economies or diseconomies of scale)? Nov 17 '21 at 23:02
• Yes, it is a constant. @prubin Nov 18 '21 at 3:15
• @SecretAgentMan I updated the question first and then made the comment. Nov 22 '21 at 4:46

Based on the comments, the rent for facility $$j\in \lbrace 1,\dots,m \rbrace$$ would be $$0.1\cdot R \cdot \sum_{i=1}^n d_i x_{ij}$$ where $$d_i$$ is the demand for customer $$i$$ and $$R$$ is the rent per square foot. If the rent per square foot varies from facility to facility, just change $$R$$ to $$R_j$$. Sum those expressions over $$j$$ and add the sum to the objective function.