Return to search

Enabling Peer-to-Peer Co-Simulation / Möjliggöra distribuerad simulering via P2P

Simulation enables preliminary testing of products that may otherwise be dicult, ex-pensive, or dangerous to test physically. Unfortunately, intellectual property concernscan make it dicult or impossible to share the human-readable simulation models toend-users. In fact, there can even be diculties with sharing executables because ofthe possibility for reverse-engineering. This presents a problem when simulating if themodel relies on components for which the source code or executable is not available,such as proprietary components developed by another party. This thesis investigateswhether it is possible to enable a set of networked peers to all take part in computingthe same simulation without any of them having access to the entire model. One way tosolve this problem is to let each system that holds a model of a component to computeits part of the simulation for a single timestep and to share the new state through peer-to-peer connections with the other systems, once a response has been received fromall other peers, the local simulation can advance one timestep and the process can berepeated. But running a simulation over a network can make it signicantly slower,since local operations on the CPU and memory are much faster than operations overa network, and the peers will be spending most of their time waiting for each other asa result. To avoid such delays, each peer maintains expected values for variables thatare not in the local model, and updates are sent only when a local variable changes.These updates are stamped with the local simulation-time, thus allowing the recipientpeers to know when the update is required in the simulations future, or to when itshould be retroactively applied in the simulations past. Using this technique, the peerscan compute their respective local models under the assumption that the variablesthat the other peers control are unchanged. Thus the peers can advance any numberof timesteps without needing to stop and wait for other peers. These techniques willlikely result in wasted work if one or more peers are advancing their simulation timeslower than the others, when this happens, the peers have the ability to re-distributethe workload on the y by transferring control over models. This also makes it possibleto accommodate for systems joining or leaving the simulation while it is running.In this thesis we show that co-simulating in this fashion is a workable option to tra-ditional simulation when the local models are incomplete, but that the performanceis very dependent on the models being simulated. Especially the relation between thefrequency of required synchronizations, and the time to compute a timestep. In ourexperiments with fairly basic models, the performance ratio, compared to traditionalsimulation, ranged between less than one percent of that of traditional simulation, upto roughly 70%. But with slower models always having a better ratio.

Identiferoai:union.ndltd.org:UPSALLA1/oai:DiVA.org:hh-29553
Date January 2015
CreatorsEriksson, Felix
PublisherHögskolan i Halmstad, Akademin för informationsteknologi
Source SetsDiVA Archive at Upsalla University
LanguageEnglish
Detected LanguageEnglish
TypeStudent thesis, info:eu-repo/semantics/bachelorThesis, text
Formatapplication/pdf
Rightsinfo:eu-repo/semantics/openAccess

Page generated in 0.0025 seconds