# A Learnheuristic Algorithm for the Capacitated Dispersion Problem under Dynamic Conditions
## 3 Problem Definition
#### Black Box Definition  
In order to define the aforementioned black box function, which emulates the behavior of real life, let us consider the following function:  
\[\phi(w,c,o)=\frac{1}{1-e^{\beta_{0}+\beta_{1}\cdot w+\beta_{2}\cdot c+\beta_{3 }\cdot o}} \tag{6}\]  
where:  
* \(w\) represents the meteorological conditions directly affecting the networks. * \(c\) denotes the congestion level between nodes. * \(o\) indicates the ratio of operational facilities for each category--each facility belongs to a particular type. To model the effect of these variables on the network, the black box function uses a set of \(\beta\) coefficients: \(\beta_{0}\), \(\beta_{1}\), \(\beta_{2}\), and \(\beta_{3}\); each coefficient is associated with a particular variable as in Equation (6):  
* \(\beta_{0}\) serves as the intercept term, which represents the baseline log-odds when all other influencing factors are zero. * \(\beta_{1}\) modulates the influence of the meteorological conditions (\(w\)) on the outcome. * \(\beta_{2}\) influences the outcome based on the congestion (\(c\)) between nodes. * \(\beta_{3}\) influences the outcome based on the ratio of the operation facilities (\(o\)) that are currently open. We employed a rule based on the name of the node to determine its type. Specifically, the type of node with name \(n\), where \(n>1\) is the number of nodes of the  
Figure 1: Simple example of a CDP solution under dynamic conditions. instance, is determined by calculating the remainder when \(n\) is divided by five, as displayed in Equation (7), since there are five different types of nodes. \[\text{node\_type}(n)=n\text{ mod }5 \tag{7}\]  
Figure 2 provides a comprehensive visualization of the probabilities associated with selecting a new node, which are generated by the black box model. The visualization takes into account three pivotal variables: node type, weather conditions, and congestion levels. This display is designed to facilitate an in-depth understanding of how these variables interact to determine the probabilities produced by the model. The figure consists of four distinct heatmaps, each of which corresponds to a unique combination of weather (W) and congestion (C) conditions. The first row of heatmaps represents scenarios where the weather condition is \(W=0\), interpreted as 'Good Weather', while the second row corresponds to \(W=1\), which is interpreted as 'Bad Weather'. Similarly, the first column presents cases of \(C=0\), meaning 'Low Congestion', and the second column represents \(C=1\), indicating 'High Congestion'. In each heatmap, the \(x\) axis represents the node types, which are denoted by integers ranging from 0 to 4. These node types could, for instance, represent different geographical locations or functionalities within a network. The \(y\) axis lists various configurations for the open_type variable, which are labeled from \(A\) to C. These configurations represent the state of multiple facilities, and they play a crucial role in determining the probabilities in question. In the heatmap, every cell shows the likelihood of choosing the next node. This takes into consideration both the node type of the next node and the types of nodes that are already opened (open_type). It also considers the specific weather of the instance and the  
Figure 2: Different behaviors depending on the beta values. congestion conditions of the next node, which are indicated by the subplot. The color scale enhances visual comprehension: dark black represents lower probabilities, while dark red signifies higher probabilities. A general legend at the bottom of the figure serves as a key to the open_type configurations. It clarifies that \(A\) corresponds to an open_type configuration where we have opened 30 facilities of type 3 and 4, \(B\) corresponds to opening 12 facilities of each type, and \(C\) is where we have opened 30 facilities of type 0 and 1. This legend serves as a useful guide for interpreting the complex interactions captured in the heatmaps.