Submitted:
17 April 2025
Posted:
21 April 2025
You are already at the latest version
Abstract

Keywords:
1. Introduction
- Section 2 explains the basic modeling concepts and entities that we will use in this paper.
- Section 3 extends basic modeling to be represented in the form of a transition graph and shows how a simulation can be performed on this graph.
- Section 4 shows how the transition graph can be implemented with reactive streams and how simulation can be executed.
2. Substates
2.1. Substates as a Decomposition of the State
![]() |
![]() |
![]() |
2.2. Representation of the Dependence of Y on X as a Set of Substates:
![]() |
![]() |
2.3. Reflection as a Record of Changes in the Values of Variables
![]() |
2.4. Model as an Imitation of Changes in the Variables V
![]() |
2.5. Simulation of the Model as a Calculation of a Subset of from the Subset and the Parameters
![]() |
3. Graph Modeling
3.1. The Transition Graph and the Simulation Graph
![]() |
![]() |
3.2. Construction of a Consistent Transition Graph
![]() |
- For each graph, each substate(i.e., located on one of all possible paths) must have a unique keyregarding the.
- For each graph, the valuesof some variableshould only belong to the set of substatessuch that there exists inat least one path,including all of these substates.
- I.
- The set of keysmust be linearly ordered;
- II.
-
Each transition function(where ) for each transition(where ) in some graph must generate the resulting substate such that its key will always satisfy the conditionsorwhere
- III.
-
For each variable, its valuesmust belong to no more than one root node:where(i.e., the set of all values in all substates form the domain of the variable ).
- IV.
-
If, for some node and some variablethe conditionis true, then, either the node must be a root, or there must be a transition functionwith one or more argumentsfor which the conditionis true and in the graphthere exists a chainthat includes all. Moreover, for the last argumentin the chain, there should not be another functionfor which the conditionis true.
3.3. Computability of the Simulation Graph and the Initial Set of Substates
![]() |
3.4. Representation of the Dependence of Y on X in the Form of a Simulation Graph and a Graph Model
![]() |
3.5. Simulation of the Graph Model as a Calculation of a Subset of the Values on the Subset and the Parameters G
-
Push pattern:This pattern can help synchronize the simulation with some external processes (for example, to synchronize with real-time). The essence of the pattern is that some functioncannot be calculated until all its argumentsare defined; thus, we can locally pause the simulation, leaving some of the root nodesuninitialized. We can then continue it by defining these nodes.
-
Pool pattern:This pattern can be used to implement an asynchronous simulation reaction to some external events—for example, to respond to user input. As in the previous case, someremain uninitialized. However, the simulation does not stop there. Their values are constructed as needed to calculate the next. Using this approach, it is figuratively possible to imagine that undefinedis computed by some set of unknown transition functions, possibly also combined into a transition graph. In other words, there is some “shadow” or “unknown” part of the graphand, as a result of its calculation, theis initialized (seeFigure 5).
4. Logical Processors
4.1. Reactive Streams and Graph Model
- To represent each substatewith the message.
-
To replace allfor whichwith equivalent processors:and all(for which) with processorsequivalent to the inverse functions:
- To successively replace all functionsand all argumentsthat are already replaced by the channels, which are equivalent to:
- And to successively replace all, the resultof which has already been replaced by channel, bythat equivalent to the inverse functions:
4.2. Graph Optimization
-
Folding of cyclic sequences in the graph:Consider a chain with an arbitrary length of the same functions, as inFigure 8.a. This can be transformed into a chain of logical processorsof equal length, as inFigure 8.b. We can fold this chain into a singleby adding a message-return loop as inFigure 8.c. Thus, more than one messagewill go through one, so that ifhas more than one argument, it can lead to collisions. To resolve collisions and also to implement breakage of the loop, we need to determine the loop-iteration number of messages. The simple way to do this is to add an iteration counter for each loop in. Another approach is to use history-sensitive values.[21] As a more complex example, we consider the graphinFigure 9.a, which can be converted and collapsed into a compact graphas inFigure 9.b.
-
Folding of graph:
4.3. Simulation of the Graph Model Using the Computational Graph
-
Calculate the set of substatesFor this, we initialize the calculation by sendingmessages using the processors. Using the processors, we collect all the calculated messages,.
- Find all substates for each keyand then collect the valuesfrom the found substates (formula 6).
5. Practice
5.1. Description of the Modeled Object and the Construction of Model
5.2. Building and Simulating a Graphical Model
5.3. Constructing and Calculating Graph Using the Graphical Model
6. Discussion
- Modularity and Reusability: By encapsulating transition rules as independent functional blocks, the approach supports reuse and flexibility. This modular structure is similar in spirit to block-diagram environments like Simulink [30,31,32] and has parallels in dataflow programming models discussed by Kuraj and Solar-Lezama [21].
7. Future Work
-
Effective optimization of computational graph and simulation on it:Chapters 4.2 and 4.3 dealt with this topic. However, due to its complexity and vastness, it did not fit into this article. In general, this is a very important issue from a practical point of view. Solving it will significantly reduce the number of resources required to perform simulations. Another interesting question is the automation of the optimization of graph . Say that, initially, we have non-optimal , for example, obtained by the method described in Chapter 4.1. We want to automatically make C compact and computationally easy, without loss of accuracy and consistency.To resolve the optimization task the ML technique can be used. For example, reinforcement rearming agents can be trained to explore various graph configurations (i.e., different ways to fold or collapse the computational graph) and learn which configurations yield the best performance in terms of latency, throughput, or resource consumption [36,37,38,39,40]. Also, techniques like neural architecture search (NAS) can be adapted to optimize the layout and parameters of the computational graph. This includes automatically deciding how to fold cyclic sequences, balance load among logical processors, and minimizing redundant computations [39,40,41].
-
Accurate simulation of continuous-valued models:Many properties of modeled objects can be represented in continuous quantities, for example, values from the set ℝ. However, the simulation (the calculation of which is based on message forwarding) is inherently discrete. An open question remains as to how accurately continuous quantities can be calculated. The question is how to increase the accuracy of calculating such quantities without increasing the requirements for computer resources.
-
Fault-tolerance of reactive streams:We did not touch on fault tolerance of simulation in this work, but in most real/practical applications, fault tolerance is very important. This question was partially explored in [23] but we also suggest this for future work.
-
Manual and automatic graph construction :From a practical viewpoint, it is interesting to be able to use some IDE to manually construct a computational graph , and to do this such that the corresponding graph will be consistent and optimal. For example, this might be done similarly to the Simulink package, [30,42] SwiftVis tool, [25,43] or XFRP language [24,44]. It is also interesting to find ways to automate the construction of . For example, the model can initially be defined as a certain set of rules by which graph can be automatically and even dynamically constructed. Specialized programming languages are also an interesting area to explore. For example, the EdgeC [33,35] language can be considered a tool to describe computational graphs.Also, ML technique can be applied wildly here. For example, graph learning techniques from graph neural networks (GNNs) can be applied to learn the structure of the optimal computational graph from historical data. The learned model can then suggest or automatically construct a more efficient graph based on current simulation requirements. Adaptive scheduling ML algorithms can dynamically adjust the scheduling of tasks across logical processors, optimizing the execution order and balancing the load [45,46]. This is particularly useful in interactive or real-time simulations where conditions may change frequently.
-
Testing with complex models and comparing with other parallelizing approaches:This work provides a small, simple example of parallel simulation to show how the described approach can be implemented in practice. However, the questions of checking this approach with large and complex models and comparing its effectiveness with other parallelizing approaches remain open.
Supplementary Materials
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Jeerson, D. R.; Sowizral, H. A. Fast concurrent simulation using the time warp mechanism, Rand Corp: Santa Monica CA, 1982; Part I: Local Control.
- Richard, R.; M. Fujimoto, Parallel and Distributed Simulation Systems, Wiley: New York, USA, 2000.
- Radhakrishnan, R.; Martin, D. E.; Chetlur, M.; Rao, D. M.; Wilsey, P. A. An Object-Oriented, Time Warp Simulation Kernel. in D. Caromel, R. R. Oldehoeft, and M. Tholburn, editors, In Proc. of the International Symposium on Computing in Object-Oriented Parallel Environments (ISCOPE'98) 1998, 1505, 13-23.
- Jefferson, D.; Beckman, B.; Wieland, F.; Blume, L.; Diloreto, M. Time warp operating system, in Proc. of the eleventh ACM Symposium on Operating systems principles 1987, 21, 77-93.
- Aach, J; Church, G.M. Aligning gene expression time series with time warping algorithms, Bioinformatics 2001, Volume 17, Issue 6, Pages 495–508. [CrossRef]
- Nicol, D.M.; Fujimoto, R.M.; Parallel simulation today, Ann. Oper. Res., 1994, 53, 249. [CrossRef]
- Falcone, A.; Garro, A. Reactive HLA-based distributed simulation systems with rxhla, In 2018 IEEE/ACM 22nd International Symposium on Distributed Simulation and Real Time Applications (DS-RT) 2018, 1-8.
- Debski, A.; Szczepanik, B.; Malawski, M.; Spahr, S. In Search for a scalable & reactive architecture of a cloud application: CQRS and event sourcing case study, IEEE Software (accepted preprint), copyright IEEE(99), 2016.
- Bujas, J.; Dworak, D.; Turek, W.; Byrski, A. High-performance computing framework with desynchronized information propagation for large-scale simulations, J. Comp. Sci. 2019, 32, 70-86. [CrossRef]
- Reactive stream initiative, https://www.reactive-streams.org (accessed on 15 April 2025).
- Davis, A.L. Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams, Apress, 2018.
- Curasma H.P.; Estrella, J.C. Reactive Software Architectures in IoT: A Literature Review. In Proceedings of the 2023 International Conference on Research in Adaptive and Convergent Systems (RACS '23) 2023, Association for Computing Machinery, New York, NY, USA, Article 25, 1–8. [CrossRef]
- The implementation of reactive streams in AKKA: https://doc.akka.io/docs/akka/current/stream/stream-introduction.html (accessed on 15 April 2025).
- Oeyen, B.; De Koster, J.; De Meuter, W. A Graph-Based Formal Semantics of Reactive Programming from First Principles. In Proceedings of the 24th ACM International Workshop on Formal Techniques for Java-like Programs (FTfJP '22) 2023, Association for Computing Machinery, New York, NY, USA, 18–25. [CrossRef]
- Posa, R. Scala Reactive Programming: Build Scalable, Functional Reactive Microservices with Akka, Play, and Lagom, Packt Publishing: Germany, 2018.
- Baxter, C. Mastering Akka, Packt Publishing: Germany, 2016.
- Nolte, D.D. The tangled tale of phase space, Phys. Today, 2010, 63, 33-38.
- Myshkis, A.D.; Classification of applied mathematical models - the main analytical methods of their investigation, Elements of the Theory of Mathematical Models 2007, 9.
- Briand, L.C.; Wust, J. Modeling development effort in object-oriented systems using design properties. IEEE Transactions on Software Engineering 27.11, 2001, 963-986.
- Briand, L.C.; Daly, J.W.; Wust. J.K. A unified framework for coupling measurement in object-oriented systems., IEEE Transactions on software Engineering 25.1, 1999, 91-121.
- Shibanai, K.; Watanabe, T. Distributed functional reactive programming on actor-based runtime, Proc. of the 8th ACM SIGPLAN International Workshop on Programming Based on Actors, Agents, and Decentralized Control, 2018, 13 – 22.
- Lohstroh, M.; Romeo, I.I.; Goens, A.; Derler, P.; Castrillon, J.; Lee, E.A.; Sangiovanni-Vincentelli, A. Reactors: A deterministic model for composable reactive systems, In Cyber Physical Systems. Model-Based Design, Springer, Cham, 2019, 59-85.
- Mogk, R.; Baumgärtner, L.; Salvaneschi, G.; Freisleben, B.; Mezini, M. Fault-tolerant distributed reactive programming, 32nd European Conference on Object-Oriented Programming (ECOOP 2018) 2018.
- About the graphs in AKKA streams: https://doc.akka.io/docs/akka/2.5/stream/stream-graphs.html (accessed on 15 April 2025).
- Kurima-Blough, Z.; Lewis, M.C.; Lacher, L.; Modern parallelization for a dataflow programming environment, in Proc. of the International Conference on Parallel and Distributed Processing Techniques and Applications (PDPTA), The Steering Committee of the World Congress in Computer Science, Computer Engineering and Applied Computing (WorldComp), 2017, 101-107.
- Kirushanth, S.; Kabaso, B. Designing a cloud-native weigh-in-motion, in 2019 Open Innovations (OI), 2019.
- Prymushko, A.; Puchko, I.; Yaroshynskyi, M.; Sinko, D.; Kravtsov, H.; Artemchuk, V. Efficient State Synchronization in Distributed Electrical Grid Systems Using Conflict-Free Replicated Data Types. IoT 2025, 6, 6. [CrossRef]
- Oeyen, B.; De Koster, J.; De Meuter, W. Reactive Programming without Functions. arXiv 2024, preprint arXiv:2403.02296.
- Babaei, M.; Bagherzadeh, M.; Dingel, J. Efficient reordering and replay of execution traces of distributed reactive systems in the context of model-driven development. Proceedings of the 23rd ACM/IEEE International Conference on Model Driven Engineering Languages and Systems 2020.
- Simulink https://www.mathworks.com/help/simulink/index.html?s_tid=CRUX_lftnav (accessed on 15 April 2025).
- Karris, S.T. Introduction to Simulink with engineering applications. Orchard Publications, 2006.
- Dessaint, L.-A.; Al-Haddad, K.; Le-Huy, H.; Sybille, G.; Brunelle P. A power system simulation tool based on Simulink. IEEE Transactions on Industrial Electronics 1999, 46, 6, 1252-1254.
- Kuraj, I.; Solar-Lezama, A. Aspect-oriented language for reactive distributed applications at the edge, in Proceedings of the Third ACM International Workshop on Edge Systems, Analytics and Networking 2020, (EdgeSys '20). Association for Computing Machinery, New York, NY, USA, 67–72. [CrossRef]
- Babbie, E.R. The practice of social research, Wadsworth Publishing, 2009, ISBN 0-495-59841-0.
- Broekhoff, J. Programming Languages For Programs For Stateful Distributed Systems.
- Zoph, B.; Le, Q. V. Neural Architecture Search with Reinforcement Learning, arXiv 2016, preprint arXiv:1611.01578.
- Nakata, T.; Chen, S.; Saiki, S.; Nakamura M. Enhancing Personalized Service Development with Virtual Agents and Upcycling Techniques. Int J Netw Distrib Comput 2025, 13, 5. [CrossRef]
- Liu, M.; Zhang, L.; Chen, J.; Chen W.-A.; Yang, Z.; Lo, L.J.; Wen, J.; O’Neil, Z. Large language models for building energy applications: Opportunities and challenges. Build. Simul. 2025, 18, 225–234. [CrossRef]
- Kipf, T. N.; Welling, M. Semi-Supervised Classification with Graph Convolutional Networks. International Conference on Learning Representations (ICLR) 2017.
- Nie, M.; Chen, D.; Chen, H.; Wang, D. AutoMTNAS: Automated meta-reinforcement learning on graph tokenization for graph neural architecture search, Knowledge-Based Systems 2025, Volume 310, 113023. [CrossRef]
- Kuş, Z.; Aydin, M.; Kiraz, B. Kiraz, A. Neural Architecture Search for biomedical image classification: A comparative study across data modalities, Artificial Intelligence in Medicine 2025, Volume 160, 103064. [CrossRef]
- Chaturvedi, D.K. Modeling and simulation of systems using MATLAB and Simulink. CRC press, 2017.
- Lewis, M.C.; Lacher, L.L. Swiftvis2: Plotting with spark using scala. International Conference on Data Science (ICDATA’18) 2018, Vol. 1. No. 1.
- Yoshitaka, S.; Watanabe, T. Towards a statically scheduled parallel execution of an FRP language for embedded systems. Proceedings of the 6th ACM SIGPLAN International Workshop on Reactive and Event-Based Languages and Systems 2019, 11 – 20. [CrossRef]
- Bassen, J.; Balaji, B.; Schaarschmidt, M.; Thille, C.; Painter, J.; Zimmaro, D.; Games, A.; Fast, E.; Mitchell, J.C. Reinforcement learning for the adaptive scheduling of educational activities. Proceedings of the 2020 CHI conference on human factors in computing systems 2020, CHI '20: Proceedings of the 2020 CHI Conference on Human Factors in Computing Systems, 1 – 12. [CrossRef]
- Long, L.N.B.; You, S.-S.; Cuong, T.N.; Kim, H.-S. Optimizing quay crane scheduling using deep reinforcement learning with hybrid metaheuristic algorithm, Engineering Applications of Artificial Intelligence 2025, Volume 143,110021. [CrossRef]











Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).












