# Characterizing Situations of Dock Overload in Bicycle Sharing Stations
## 3 Methodology
### Mining Occupancy Monitoring Patterns
#### 3.2.1 OMP Characterization
Specifically, if an OMP \(P\) is a subset of another OMP \(P^{\prime}\) (i.e., \(P\subset P^{\prime}\)), then the criticality of \(P\) is above or equal to those of \(P^{\prime}\). Such a notable property, called anti-monotonicity, will be exploited to efficiently mine OMPs (see Section 3.2.2). **Definition 4** (Intermittence measure). : _The intermittence of an OMP \(P\) in dataset \(\mathcal{D}\) indicates the number of records \(R_{i}\) in \(\mathcal{D}\) for which at least one station, but not all of them at the same time, takes value Overloaded. It is defined as the number of \(R_{i}\) in \(\mathcal{D}\) for which the following conditions hold: (i) \(\exists(s_{j},o_{i}^{j})\in R_{i}\) such that \(s_{j}\in P\) and \(o_{i}^{j}=\text{Overloaded}\); (ii) \(\exists(s_{q},o_{i}^{q})\in R_{i}\) such that \(s_{q}\in P\) and \(o_{i}^{q}=\text{Normal}\)._  
Criticality and intermittence values can be normalized by the number of records in \(\mathcal{D}\). Their normalized values are usually denoted as relative criticality/intermittence values. **Example 1**. : \(P\)=\(\{s_{2},\,s_{3}\}\) _is an OMP consisting of a couple of stations (i.e., \(s_{2}\) and \(s_{3}\)). In Table 1, to compute the criticality and intermittence values of \(P\) in dataset \(\mathcal{D}\), we evaluated the occupancy levels of stations \(s_{2}\) and \(s_{3}\) at different timestamps. Since they are overloaded at the same time only in one timestamp (see record with identified \(\text{RID}_{1}\) associated with timestamp \(t_{1}\)), the relative criticality value of \(P\) is \(\frac{1}{7}\) (\(14.28\%\)). In four timestamps (i.e., \(t_{2}\), \(t_{3}\), \(t_{5}\), \(t_{6}\) corresponding to records with RIDs equal to \(\text{RID}_{2}\), \(\text{RID}_{3}\), \(\text{RID}_{5}\), \(\text{RID}_{6}\)), one station is overloaded, whereas the other is normal. Therefore, the relative intermittence value of \(P\) is \(\frac{4}{7}\) (\(57.14\%\))._To analyze how the occupancy level of stations evolves over time as well as detect dock overload situations happening within limited time ranges, the criticality and intermittence measures of an OMP can be reformulated by considering only the records related to a specific time period. This allows us to discover interesting patterns at a finer granularity level. Based on the target application, the time period with a suitable time granularity can be selected for monitoring the usage of stations. Given an OMP \(P\), its criticality and intermittence value in a time period \(TP_{k}\) are computed considering only the subset of records with time period equal to \(TP_{k}\). **Definition 5** (Criticality and Intermittence measures in time period \(T_{k}\)). : _Let \(TP_{k}\) be an arbitrary time period in dataset \(\mathcal{D}\). Let \(\mathcal{R}(TP_{k})\) be the subset of records \(R_{i}\) in \(\mathcal{D}\) that are associated with timestamps in \(TP_{k}\). The criticality of an OMP \(P\) in \(TP_{k}\) is defined as the number of \(R_{i}\) in \(\mathcal{R}(TP_{k})\) such that \(\forall\ (s_{j},o_{i}^{j})\in R_{i}\) the following conditions hold: (i) \(s_{j}\in P\); (ii) \(o_{i}^{j}=\text{Overloaded}\). The intermittence of an OMP \(P\) in \(TP_{k}\) is defined as the number of \(R_{i}\) in \(\mathcal{R}(TP_{k})\) for which the following conditions hold: (i) \(\exists(s_{j},o_{i}^{j})\in R_{i}\) such that \(s_{j}\in P\) and \(o_{i}^{j}=\text{Overloaded}\); (ii) \(\exists(s_{q},o_{i}^{q})\in R_{i}\) such that \(s_{q}\in P\) and \(o_{i}^{q}=\text{Normal}\)._  
OMPs can be filtered based on the spatial distance between the corresponding stations. For this purpose, we introduce a spatial constraint _maxdist_ on OMPs. This constraint specifies the maximum geographical distance (denoted _maxdist_) between stations in each OMP. OMPs satisfying the spatial constraint represent sets of nearby stations showing an overload situation. The higher is _maxdist_, the larger is the area including stations with critical/intermittent levels of dock occupancy. **Definition 6** (Spatial constraint). : _Let maxdist be a positive number.