Scenario Analysis of Protest Potential Based on Simulation Modeling

In this study, we present a scenario-based approach to investigate the protest potential in society using mathematical tools from graph theory and simulation modeling. The research aims to construct a cognitive map that reflects key factors, such as population deprivation levels, overall well-being, social fears, trust in authority, social expectations, and stability of social structures. We report the results of a scenario analysis of the developed model, obtaining forecasted scenarios of the dynamics of society’s protest potential under various conditions and influences. At the core of this research is the examination of a complex system’s possible response to external destructive impacts, and we propose a set of measures to counteract these influences on societal dynamics. The scenario methodology combines graph theory for representing complex relationships between key factors and simulation modeling for predicting potential developmental scenarios. Conducting this study required modifying the traditional mathematical apparatus of cognitive modeling. We developed methods and algorithms for scenario-event identification of the model’s significant factors’ behavior and utilizing the results of such identification when forming complex functional relationships in the scenario model. In generating scenarios, the range of events is significantly expanded compared to traditional cognitive modeling approaches, which could have been overlooked but may be crucial for situational analysis.


Introduction
States are undoubtedly complex socio-economic systems requiring an all-inclusive and multifactorial approach in managing all spheres of their activity.The sphere of ensuring state security is closely intertwined with the economic, political, and social spheres, but definitely not confined by them.Apparently, the spheres will have their own specific peculiarities for each state, which will be difficult to analyze in case the researcher is non-specialised in a particular region.Nevertheless, there is a possibility to identify some fundamental indicators on the basis of publicly available statistics and historical data.Such indicators are basic in forming predictive models.By analyzing the dynamics of such indicators, it becomes possible to optimize state governance, inter alia in the context of preventive counteraction to external threats.The use of imitation modeling, which is based on cognitive maps classical apparatus, allows research of complex processes and taking into account a multitude of factors, also in such an analysis, the variability of future states of the system under study is frequently lost.It is proposed to use the toolkit of scenario analysis to account for the dynamics of the model.A distinctive feature of scenario analysis, applied in many fields from economics to technology and medicine, is the ability to consider the factors that influence changes in the states of the system.Scenario analysis allows for accounting for factors and dependencies related to various conditions and states, including uncertainty, which enables to work in situations where the modeling result is affected by factors changing over time or depending on the actions of the participants of the process.The scenario approach is most pronounced as a strategic planning instrument.Data collection for forming a correctly constructed model often relies on the conclusions of experts in this field, which allows for the operation of expert-significant events and the exclusion of unnecessary factors and events.
At present, significant experience has been accumulated in solving a wide range of applied and practical tasks in the field of scenario analysis of organizational management processes [1].Concurrently, the generalization of the results of the practical application of the scenario approach and cognitive modeling has revealed a number of existing technological limitations.In particular, these limitations do not fully allow for the analysis of the impact of the dynamics of changes in the values of key model factors.This also applies to the timing of changes in the nature of this dynamics on the studied properties and characteristics of modeled processes in the development of complex management objects (socio-economic, socio-political, informational, and other systems).This inevitably affects the quality of the generated scenarios and the visualization of obtained results.

Event identification methods in scenario analysis
The methodological basis of scenario analysis technology is the mathematical model of sign graphs, weighted sign graphs and functional sign oriented graphs.This model is an extension of the classic graph model [2].Along with the directed graph G(X, E), where X is the finite set of vertices, and E is the set of edges of the graph, the model includes additional components: a set of vertex parameters V = {v i | i ≤ N = ∥X∥}, each vertex x i is assigned its parameter v i ∈ V ; a transformation function for edges is also introduced, i.e., each edge is assigned either a sign ("+" or "-"), or a weight (+W ij or −W ij ) or a function f ij (v i , v j ).
In the article we present an algorithm for identifying the type of dynamics of significant factors of the model as well as the use of its results both in functional relationships among the model's factors and for visualization of the modeling results.We also provide an example of the use of the developed algorithm in the study of the social stability model.
The calculation of e-scenarios for the behavior of vertices in the software implementation can be determined by three main parameters: period, interval, and delay.Their values are set by the user, and each value represents a number of steps.
The period (p) sets the periodicity for the calculation of e-scenarios.Calculations are performed at steps that are multiples of the period.The number of steps involved in the calculation depends on the specified interval (n).A delay (d) shifts the interval by d steps towards the beginning of the modeling.
For example, let's consider the following parameter values: period = 10, interval = 6, delay = 2.In this case, the calculation of e-scenarios will be performed at steps 10, 20, 30, etc.During these calculations, the values of the vertices at steps 3-8, 13-18, 23-28, etc., will be taken into The e-scenarios are calculated by the algorithm for the entire period following the calculation moment.That is, each vertex at all steps of the following period is characterized by one escenario.
To calculate the e-scenarios of vertex behavior in the software implementation we have used the method of linear regression analysis of data [4].This method allows for the approximation of the vertex values within the considered interval by representing them as a straight line.The type of e-scenario is determined based on the slope of this line or several lines At the beginning of the calculation, each vertex has a set of values v i at the steps [p -nd + 1; p -d].In total, there are n values.Initially, they are converted to a logarithmic form, while the sign is preserved.
where v i is the value of the vertex obtained as a result of the modeling, and y i is the value of the vertex converted to a logarithmic form.Then, we calculate the expected value of the vertex converted to a logarithmic form, as well as the expected value of the ordinal number of the step within the considered interval: Next, the variance of the values, the variance of the steps, and their covariance are calculated: The equation of the regression line can be represented by the formula: where b0 and b1 are the coefficients of the regression line.
The coefficient b1 represents the coefficient of the angle of inclination of the regression line θ and is calculated as the ratio of the covariance of the values and the step to the variance of the step: The coefficient b 1 indicates by how many percent the value of the vertex will change with an increase in the step.
The coefficient b 0 is calculated using the following formula: To evaluate the quality of the obtained regression equation, the coefficient of determination R 2 can be used: The coefficient of determination reflects the degree of expression of a linear relationship between the values and the trend in the simulation data.Thus, it indicates how well the regression is fitted.The coefficient of determination can take values from 0 to 1.If it equals 1, then all the data are aligned in a line, and the regression is fitted perfectly.When working with empirical data in classical econometric calculations, extreme values for R 2 are unattainable.However, the simulated results at the end of the simulation are not random variables, and regression analysis is used for trend classification as a machine learning method.Therefore, there are cases where the coefficient of determination equals one, for example, if the dynamics of the variable under study strictly increases or decreases as a result of scenario modeling.The implemented algorithm for calculating e-scenarios assumes two variants of vertex behavior analysis, depending on the type of the process being analyzed.It can be either monotonic or oscillatory.
We use the points of local maxima and minima as the initial data for analysis within the selected range of factor value changes.The points of local maxima are used to construct the upper regression line, and the points of local minima are used to construct the lower regression line.This approach allows to detail in some measure the more general method of applying fictitious variables for inflection points, as it separates the points of local maxima and local minima into two samples for separate evaluation of their trend and subsequent comparison.Thus, an assessment of the entire remaining sample of observations is not required for such a calculation.
To determine the type of process, the number of maxima and minima within the investigated interval is calculated.A point is considered a maximum if y i − y i−1 ≥ 0 and y i+1 − y i < 0, and a minimum if y i − y i−1 ≤ 0 and y i+1 − y i > 0.
If the number of maxima is less than or equal to 1, or the number of minima is less than or equal to 1, then the process is considered to be monotonic.Otherwise, it is considered oscillatory.
For a monotonic process, the scenario is determined based on the calculated coefficient of the slope of the regression line (8).If θ > 0, then the scenario represents growth without pronounced inflections (type 1).If θ < 0, it indicates a decline (type 2).Otherwise, it represents a constant value or fluctuations limited in amplitude (type 3).
In contrast to the monotonic process, where only one regression line is used and which is constructed based on all the data, for an oscillatory process it is necessary to construct two regression lines -one based on the points of maximums and the other based on the points of minimums, as depicted in Figure 1.

Figure 1. Illustration of oscillatory processes
A preliminary correction needs to be made to the existing sets of maxima and minima of factor values.This correction is conducted to eliminate random spikes, and it is based on the following approach: if there is an alternation of the sign of maxima, only positive maxima are included in the final set.Similarly, if there is an alternation of the sign of minima, only negative minima are included in the final set.
The principle for calculating the coefficients for the regression lines based on the maxima and minima is analogous to what was presented earlier (2)-(9).
The adjusted set of maximum values, denoted as y max , is used as the initial data, along with the set of ordinal step numbers within the interval at which these maxima occurred, denoted as s max .In total, there are n max values in each set.
Next, the mathematical expectation and variance for each set are calculated, as well as their covariance: Based on the obtained values, the coefficient of the slope angle of the regression line for the maxima is calculated: Similarly, the calculation of the coefficient of the slope angle of the regression line for the minima is conducted.
Next, the concept of an error angle, denoted as θ err , is introduced.If the absolute value of the slope angle coefficient of the regression line is less than θ err , it is considered to be equal to 0.
For the oscillatory process, the definition of an elementary scenario relies on the calculated values of the slope angle coefficients of the regression lines for the maxima and minima, as well as on the accepted margin of error.
Let us introduce a variable Sc which is the type of e-scenario for the factor within the specified interval.
If θ max > θ err and θ min > θ err , then the e-scenario of the factor behavior over the interval represents growth (Figure 1a), either monotonic or non-monotonic, (Sc = 1).
Otherwise, as shown in Figure 1e and Figure 1f, the e-scenario represents a constant value (Figure 1f), (Sc = 3).
The e-scenario variables of the factors Sc can be used as arguments in the function of edge weights.In addition, during the calculation of the e-scenarios of the factors, one can also determine the values of the time interval (in simulation steps) during which the current type of e-scenario is maintained (TS), and the proportion of the realization of the k-th type of e-scenario over the entire elapsed simulation time (Dol).
For example, let us consider a model of protest activity in Figure 2. One of the reasons for the increase in protest activity (Factor 1) may be the decline in the life quality of the population (Factor 5), and not the instantaneous fluctuations of this factor, but rather relatively long-term trends with a negative history in the past, which corresponds well with reality.Moreover, we assume that strictly negative trends have a much stronger impact on protest activity than other trends.Therefore, it is entirely justified to formulate the functionality relationship among these models based on the identification of e-scenarios.In this case, the weight of the edge D 1,5 could be, for example, as follows: This means the following: if the change in parameter of node 5 is characterized as a decline (SC 5 = 2), and this dynamic has persisted for 10 steps of modeling (T S 5 = 10), and moreover, this same dynamic has occurred for more than 25% of the entire past modeling time (DOL 5 (2) > 25), then an impulse equal to 2 * I 5 passes through the edge D 2j1i at each moment in time.If the parameter dynamics are different, the influence is negligible, and no impulse passes, which effectively means a break in the edge.This is just a simple example of applying new variables in functional relationships.Undoubtedly, it is possible to construct a series of nested logical expressions to handle more complex situations.

Scenario analysis
A scenario is defined as a sequence of expertly significant events, i.e., the events whose importance for the analysis of the behavior of the management object and for making managerial decisions is determined by specialists in the modeled subject area.In this model, an expertly significant event is determined by the dynamics of five identified factors: (i) The protest potential of society;  In the model we have considered three main groups of factors: namely, factors related to the base layer of the model or factors affecting the protest potential of the researched country, factors related to external foreign interference, and factors associated with counteraction to such challenges.The model constitutes the most representative example of strategic-level planning that takes into account factors related to many spheres of state activity simultaneously.This is due to the fact that society, which forms the country and without which the state would not be able to function, is involved in all areas of activity at the same time.Such widespread involvement in activities allows not only to determine the corresponding general characteristics for the model, but also to identify vulnerable areas that must be taken into account to ensure the stable functioning of the system.The modeling results show that the target factor of the model, namely, "The protest potential of society" exhibits an increasing trend in parallel with the weakening of the factor "Segmentation of society".This, in turn, signals that when foreign interference are activated, the modeling results are unsatisfactory, and it becomes necessary to engage factors for situation management.

Scenario of proactive counteraction
The simulation, as in the previous case, is triggered upon the activation of destructive effects associated with the factor "Foreign interference".At the same time, the entire set of measures associated with this vertex is activated.This set includes various factors related to effects in the fields of economy, cultural and political expansion, as well as cyber-attacks and disinformation campaigns.It should be noted that the factors of the model are informational, meaning that they represent the perception of these factors by the society.The notations presented in table 1 are used to introduce the simulation results in the scenario event-by-event form.The first event corresponds to the period of time when the trends, according to the abovementioned algorithm, have not yet been calculated, since the required number of initial simulation steps has not yet passed.It should be mentioned that the interval of steps for this model is T S i =20 which determines the trend.The lower part of Figure 5 presents a description of the second event with the following content: there is a decrease in protest potential against the backdrop of enhanced measures to counteract destructive phenomena.Moreover, the level of population deprivation decreases, negatively affecting the segmentation of society.Meanwhile, the consolidation of the population grows along with the stability of social structures through management factors.The emergence of this event is associated with the complex impact of the "Information control of society" node.All this affects the goal of the modeling, and as a result, a reduction in the protest potential of society is observed.
In further modeling, no new events appear in the scenario.Thus, through proactive counteraction to foreign interference, it is possible to maintain the social stability of society by means of preventive activation of management factors, such as, "Information control of society", "Countermeasures to foreign interference" and "Working with government and institutions".It should be noted that each of these blocks is aimed at a specific impact not only on the base layer of the model but also on the factors directly related to external influence.For example, the factor "Countermeasures to foreign interference" activates the node "Strengthening international partnership" which allows for the reduction of diplomatic pressure on the country.

Scenario of counteraction with delay
The formation of the third scenario, illustrated in Figure 6, is also carried out when the "Foreign interference" factor is activated and when the counteraction is similar to the previous scenario.The difference is that now the factors related to counteraction are activated with a time delay, i.e., when the destructive processes have already penetrated into the society.

Figure 6. Scenario of counteraction with delay
As can be seen from the obtained results, shown in Figure 6, one can be skeptical about the effectiveness of this managerial decision, as the analysis of the scenario in an event-based form, shown in Figure 7, demonstrates that success is achieved only in the short term.The scenario obtained through modeling consists of several sequential events, the description of which in the form of a scenario is presented in Table 2.
tendencies have shifted the scenario so the subsequent event (number 4 in Table 2) has become sharply negative.Moreover, no other events appear in the scenario, and the modeled system enters its final state.

Scenario of proactive short-term counteraction
The fourth scenario, which is shown in Figure 8, describes the state of factors when the social stability internal control factors were activated in advance.However, due to the inconsistent impact, which is expressed in the absence of support for management decisions throughout the entire time interval of modeling, it was not possible to achieve positive results.9 obtained scenario shows that the only calculated event (number 2) turns out to be generally positive, and it corresponds to the final state of the modeled system.However, unlike the positive trends in the second scenario, we can observe an increase in the segmentation of society, which under new conditions, may potentially become a threat to social stability in the future.

Conclusion
The scenario modeling technology presented in this work is implemented in a corresponding software-analytical complex for scenario modeling.The purpose of this development is to automate the scenario research of socio-economic systems.
The practical testing of the proposed approach to extending modeling capabilities, specifically scenario identification of model factors behavior, has demonstrated high effectiveness in the scenario analysis process of complex models of socio-economic systems.The application of the proposed approach and the scenario-event identification algorithm will enable the implementation of a mechanism for event-based functional interconnections between the factors of the model, particularly for multi-layered (including hierarchical) representations of the multimodel structure.This ensures the possibility of effective application of expert knowledge in various subject areas at the stages of development and investigation of the evolution processes of socio-economic and political systems.
The software implementation of the developed algorithm has enhanced the quality of visualization of the modeling results due to the ability to represent the scenario text in terms of the subject domain.Moreover, it has introduced the capability to transmit current analytical data from the modeling process in real-time to external software systems.
The model and scenarios, presented as examples, are representative and illustrative in the context of using scenario analysis for the research of complex systems.The research findings have shown that the most effective scenario is the one in which preventive measures yielded the most significant positive impact on the target factor of the model.This result demonstrated the high significance of scenario analysis and forecasting in the management of complex systems.
(ii) Countermeasures to foreign interference; (iii) Stability of social structures; (iv) Overall population deprivation; (v) Segmentation of society.A change in the calculated value of the dynamics (Sc i ) of any of these 5 factors indicates the emergence of a new event.As the results of the scenario analysis of the formed model showed, all the identified factors exhibited only four types of dynamics: growth, decline, constant value, and diverging oscillations (instability).

Figure 2 .
Figure 2. General model of the protest potential profile

Figure 3
presents the result of the modeling of the first scenario, which depicts the behavior of the model's factors without counteracting external threats.

Figure 5 .
Figure 5. Event dynamics of factor behavior in the second scenario

Figure 7 .
Figure 7. Event dynamics of factors in the third scenario

Table 1 .
Notations of factor dynamics