7
$\begingroup$

I am having trouble formulating the following constraint:

I am looking to formulate a constraint that if a facility was opened at some point in time, then $Y[j,t]$ does always have to be $1$ from that point in time onwards (see values below). How do I do that?

O[j,t] Y[j,t]
0 0
0 0
1 1
0 1
0

Edit from comments:

It is also possible to close initially existing facilities using a closing variable $S[j,t]$. It is generally possible to close a facility, just not one that has been opened by the model using the $O[j,t]$ variable.

$\endgroup$
0

1 Answer 1

9
$\begingroup$

You can activate variable $Y[j,t]$ when $O[j,t]$ is active ($O[j,t] \; \Longrightarrow \; Y[j,t]$) with: $$ O[j,t] \le Y[j,t] \tag{1} $$ And then make sure $Y[j,t]$ remains active ($Y[j,t] \; \Longrightarrow \; Y[j,t+1]$): $$ Y[j,t] \le Y[j,t+1] \tag{2a} $$

I suppose there is some cost on variables $Y[j,t]$ ? If so, this cost should preclude the solver from activating $Y[j,t]$ when $O[j,t]=Y[j,t-1]=0$.

Now, if you can close an exising facility, then $Y[j,t]$ should be active until the facility is closed, so you can adjust constraint $(2a)$ as follows: $$ Y[j,t] \le Y[j,t+1] + S[j,t+1] \tag{2b} $$ So if $Y[j,t]$ is active, in the following period you either maintain activity, or close the facility. And if you cannot reopen the facility, you need to impose: $$ S[j,t] \le 1 - O[j,k] \quad \forall k=t,t+1,t+2,... \tag{3} $$

$\endgroup$
2
  • $\begingroup$ Thank you very much for your help, it is much appreciated! :) $\endgroup$
    – user7258
    Sep 27, 2021 at 8:46
  • $\begingroup$ I also want to explore same. would you mind sharing resources or papers for dynamic facility location. Thanks. $\endgroup$ Sep 29, 2021 at 8:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.