The article discusses mathematical models and algorithms used in
automated control systems to increase the safety of oil refineries in the Republic
of Kazakhstan and reduce the likelihood of accidents due to a critical combination
of events. The main attention is paid to the mathematical apparatus,
which allows identifying and preventing the occurrence of critical combinations
of events, each of which individually does not significantly affect the safety of
the operation of the oil refinery. For this purpose, along with the traditionally
used fault trees, it is proposed to use the tree in the form of a dynamic graph,
which will allow us to take into account when preparing and making decisions
to improve the safety of functioning also the rapidly changing cause-effect
relationships between the modeled variables. An example of such a fault tree
describing the development of a fire in the tank farm of an oil refinery is
considered in detail in the article. For this fault tree, for the five-element minimum
section of the state graph of the functioning process, a list of minimum
sections is defined that formalize the critical combinations of events consisting
of 5 independent events. A general algorithm has been developed for solving the
problem of identifying and preventing critical combinations of events. It is based
on the apparatus of Markov chains, which allows, under certain limitations
imposed on the process of occurrence of critical combinations of events during
the operation of an oil refinery, to consider it as a random process satisfying the
Markov property with natural filtration. This assumption allows us to use when
determining the probability of occurrence of critical combinations of events of
the Kolmogorov-Chapman system of equations, the solution of which is carried
out in the article using the fourth-order accuracy numerical Runge-Kutta
method. The developed software will be used during the modernization of
company group “Condensate” of the Republic of Kazakhstan.