This file contains the declaration of the SimulationWorker class. More...
#include <QObject>
#include "../NeTrainSim/simulator.h"
Go to the source code of this file.
Classes | |
class | SimulationWorker |
The SimulationWorker class performs simulation work in a separate thread. More... | |
This file contains the declaration of the SimulationWorker class.
The SimulationWorker class is a QObject subclass that performs simulation work in a separate thread. It receives input data and parameters, performs the simulation using the Simulator class, and emits signals to update the UI. The SimulationWorker class is intended to be used for simulation tasks in a multi-threaded application. It is designed to work with the Simulator class and communicates with the UI through signals and slots. The SimulationWorker class takes nodeRecords, linkRecords, trainRecords, networkName, endTime, timeStep, plotFrequency, exportDir, summaryFilename, exportInsta, instaFilename, and exportAllTrainsSummary as input data for simulation. It performs the simulation, updates the progress, coordinates of trains, and emits signals to inform the UI about the progress and results. The SimulationWorker class can be used in a QWidget-based application.