68 5. Implementation5.2.1 ServerThe Server component implements the core of the localization framework and isimplemented as a CherryPy application. The Server can be started from the Python packagelwsby pointing to a configuration file:>> python-m lws.cli path_to_config.iniAfter loading the config and initializing the HTTP-subsystem, the Server listensfor commands from the clients. If such commands arrive over the HTTP channelthey will be dispatched by the Server to the responsible subsystem. For debuggingpurposes most subsystems will be code-reloaded before processing the command.This has made developing the system very efficient.SimulatorThe Simulator is a subsystem of the Server and is responsible for coordinating theconstruction of radio propagation models. It is a singleton and drives a priorityqueue from the Python standard library. The queue containsJob()instances thatrepresent a set of material parameters and a set of.obj(Wavefront Format) files. Theconsumers of the jobs are the GPU-nodes whereas the producers of the Jobs are eitherthe Optimizer or the Fat Client. The Optimizer pushes jobs into the queue during thetraining process, and the Fat Client uses the Simulator for retrieving full propagationmodels that should analysed. The raytracer voxel arrays are compressed transmittedfrom the GPU-nodes over the Simulator to the consumers as they contain about10 mb raw data that can be reduced by a factor of 3.The priority aspect of the queue is useful for serving"high priority" requests fromthe Fat Client before processing the next thousands of Optimizer started trainingjobs. Furthermore, it is more efficient for the Optimizer to combine all jobs for asingle genetic organism, N jobs for the evaluation of the material parameters over NAPs, in one priority slot since this leads to more efficient cluster usage.OptimizerThe Optimizer is responsible for the training of the radio propagation models withan optimization algorithm and it employs the PyGene library for this task. It isinitialized via type checked HTTP-GET parameters over the Server component.Such a parameter set is defined in table 6.3. Additionally to the optimizer parametersa restart of older optimization runs can be enforced. This restart is implementedby deserializing the last population of the old optimization run and using it in thecurrent run. Additionally some new randomized organisms can be injected.After the initialization phase, the core loop of the optimization run is started threaded.In the core loop, the evolutionary process is simulated by executing successive genera-tions of populations with the PyGene API. The complex part of the implementation,the custom logic for the raytracer training is implemented in thefitness()functionof aRadioPropConverger()class that is derived from apygene.Organism(). Thefitnessfunction is called from the PyGene framework for each organism instance of
Diplomarbeit
Indoor Localization of Mobile Devices Based on Wi-Fi Signals Using Raytracing Supported Algorithms
Einzelbild herunterladen
verfügbare Breiten