NeTrainSim 0.1.1 beta
The Open-Source Network Trains Simulator
 
Loading...
Searching...
No Matches
simulationworker.h File Reference

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...
 

Detailed Description

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.

Author
Ahmed Aredah
Date
6/7/2023