*2.3. Variables*

First-Stage Variables:

– *Xij* = 1 if arc (*i*, *j*) is fortified, 0 otherwise. – *Yi* = 1 if an inventory is located in vertex *i*, 0 otherwise.

Second-Stage Variables:


#### *2.4. Constraints and Objective Functions*

(*<sup>i</sup>*,*j*)∈*<sup>A</sup>*

Arc Constraints:

$$\sum \quad X\_{i\bar{j}} = \mathcal{2} \cdot Q \tag{1}$$

$$X\_{\vec{\eta}} = X\_{\vec{\mu}} \tag{2}$$

*cross<sup>ω</sup>ij*≤ *saf eωij*+ *Xij* ∀(*<sup>i</sup>*, *j*) ∈ *A*, ∀*ω* ∈ Ω (3)

$$
\forall low\_{\text{ij}}^{\omega} \le K^{\omega} \cdot c \text{cos}s\_{\text{ij}}^{\omega} \tag{4}
\\
\tag{4}
$$

$$X\_{i\bar{j}} \in \{0, 1\} \tag{5}$$

$$
\Gamma \text{cross}\_{ij}^{\omega} \in \{0, 1\} \tag{6.1}
$$

$$
\forall \mathit{low}\_{ij}^{\omega} \ge 0 \tag{7}$$

*Kω* is a constant that takes a value that is greater than or equal to the largest possible flow traversing an arc in a scenario *ω*. A trivial upper bound to *Kω* is given by:

$$\mathcal{K}^{\omega} = \sum\_{i \in V} demand\_i^{\omega} \tag{8}$$

Constraint (1) enforces that the number of fortified arcs is exactly 2*Q*, as each road segmen<sup>t</sup> is represented by a pair of arcs. In fact, constraints (2) specify that if arc (*i*, *j*) is fortified, then also arc (*j*, *i*) must be fortified, and vice-versa. Next, constraints (3) impose that, in a specific scenario *ω*, an arc can be used in the flow model only if it is not interdicted in the scenario or if it is fortified in the first stage. Constraints (4) relate *flow<sup>ω</sup>ij* to *cross<sup>ω</sup>ij* by enforcing that an arc (*i*, *j*) can have a positive flow in a given scenario *ω* only if *cross<sup>ω</sup>ij* = 1. Finally, constraints (5)–(7) present the condition of existence for variables *Xij*, *cross<sup>ω</sup>ij*, and *flow<sup>ω</sup>ij*, respectively.

Vertex and Flow Constraints:

$$\sum\_{i \in V} Y\_i = P$$

$$\begin{aligned} \text{supp}\,y\_{i}^{\omega} & \leq \mathbf{K}^{\omega} \cdot \mathbf{Y}\_{i} & \forall i \in V\_{\star} \,\forall \omega \in \Omega \quad \text{(10)}\\ \sum\_{\begin{subarray}{c} \mathcal{I}\_{1}, \ldots, \mathcal{\omega} \;\ \vdash 1, \ldots, \mathcal{\mathbf{L}} \;\forall \omega \in \Omega \end{subarray}} \,\omega & \quad \forall i \in V\_{\star} \,\forall \omega \in \Omega \quad \text{(11)}\\ \text{supp}\,\mathcal{I}\_{1} & \forall i \in V\_{\star} \,\forall \omega \in \Omega \quad \text{(12)}\\ \text{supp}\,\mathcal{I}\_{1} & \forall i \in V\_{\star} \,\forall \omega \in \Omega \quad \text{(13)} \end{aligned}$$

$$\sum\_{j:(j,i)\in A} flow\_{ji}^{\omega} + supply\_i^{\omega} = \sum\_{j:(i,j)\in A} flow\_{ij}^{\omega} + demand\_i^{\omega} \cdot reach\_i^{\omega} \qquad \forall i \in V, \forall \omega \in \Omega \tag{11}$$

$$\begin{aligned} \forall i \in \{0, 1\} \\ \text{supp}\, y\_i^{\omega} \ge 0 \end{aligned} \tag{12}$$

$$\text{reach}\_{i}^{\omega} \in \{0, 1\} \tag{1}$$

Constraint (9) imposes that the number of inventories is exactly *P*. Only inventories can have a positive supply capacity, as enforced by constraints (10) which relate *supply<sup>ω</sup>i* to *Yi*. Constraints (11) define the flow on the arcs, the supply capacity at each vertex, and the vertices that can be reached, in each scenario. Finally, constraints (12)–(14) establish the condition of existence for variables *Yi*, *supply<sup>ω</sup>i*, and *reach<sup>ω</sup>i*, respectively.

Time Constraints:

> *T<sup>ω</sup>* ≥ 0

$$\begin{aligned} \textit{time}^{\omega}\_{\text{j}} &\geq \textit{time}^{\omega}\_{\text{i}} + \textit{length}\_{\text{ij}} - K' \cdot (1 - \cos \text{s}^{\omega}\_{\text{ij}}) & \forall (\textit{i}, \textit{j}) \in A, \forall \omega \in \Omega \quad \text{(15)}\\ T^{\omega} &\geq \textit{time}^{\omega}\_{\text{i}} & \forall \textit{i} \in V, \forall \omega \in \Omega \ : \textit{demand}^{\omega}\_{\text{i}} > 0 \quad \text{(16)}\\ \textit{i} &\dots \textit{i} \geq \textit{0} \quad \text{(17)}\\ \end{aligned} \tag{17}$$

$$
\sharp \text{tim}\_{i}^{\omega} \ge 0 \tag{17}
$$

$$\forall \omega \in \Omega \qquad \text{(18)}$$

where *K* is a constant that takes a value that is greater than or equal to the largest possible arrival time at a vertex. A trivial upper bound is given by:

$$K' = \sum\_{(i,j)\in A} length\_{ij} \tag{19}$$

Constraints (15) assign consistent arrival times to all the vertices for all the scenarios, while constraints (16) compute the maximum arrival time to a demand vertex in each scenario. Constraints (17) and (18) define the condition of existence for variables *time<sup>ω</sup>i*and *T<sup>ω</sup>*, respectively.
