57 #ifdef CHECK_MEMORY_LEAKS
59 #endif // CHECK_MEMORY_LEAKS
69 myNet(0), myHalting(true), myQuit(false), mySimulationInProgress(false), myOk(true),
70 mySimDelay(simDelay), myEventQue(eq), myEventThrow(ev) {
106 if (std::string(e2.what()) != std::string(
"Process Error") && std::string(e2.what()) != std::string(
"")) {
133 if (
getNet().logSimulationDuration()) {
149 if (
getNet().logSimulationDuration()) {
219 if (std::string(e2.what()) != std::string(
"Process Error") && std::string(e2.what()) != std::string(
"")) {
Event sent when the the simulation is over.
static MsgHandler * getWarningInstance()
Returns the instance to add warnings to.
The message is only something to show.
static MsgHandler * getErrorInstance()
Returns the instance to add errors to.
virtual bool simulationIsStepable() const
virtual FXint run()
starts the execution
virtual bool init(GUINet *net, SUMOTime start, SUMOTime end)
initialises the thread with the new simulation
The simulation contains too many vehicles (.
virtual bool simulationIsStartable() const
std::string time2string(SUMOTime t)
void setCurrentTimeStep(const SUMOTime step)
Sets the current simulation step (used by state loading)
The final simulation step has been performed.
void addRetriever(OutputDevice *retriever)
Adds a further retriever to the instance responsible for a certain msg type.
SUMOTime getCurrentTimeStep() const
Returns the current simulation step.
void clear()
Clears this container.
SimulationState
Possible states of a simulation - running or stopped with different reasons.
void setIdleDuration(int val)
Sets the duration of the last step's idle part.
static OptionsCont & getOptions()
Retrieves the options.
static std::vector< SUMOTime > gBreakpoints
List of breakpoints.
void retrieveMessage(const MsgHandler::MsgType type, const std::string &msg)
Retrieves messages from the loading module.
bool myHalting
information whether the simulation is halting (is not being executed)
The simulation does not contain further vehicles.
An error occured during the simulation step.
static void cleanupOnEnd()
Removes pending handler.
MFXMutex mySimulationLock
FXdouble getValue() const
Return current value.
static void sleep(long ms)
virtual ~GUIRunThread()
destructor
void closeSimulation(SUMOTime start)
Closes the simulation (all files, connections, etc.)
static GUIGlObjectStorage gIDStorage
A single static instance of this class.
The connection to a client was closed by the client.
The simulation is running.
void removeRetriever(OutputDevice *retriever)
Removes the retriever from the.
bool mySimulationInProgress
static MsgHandler * getMessageInstance()
Returns the instance to add normal messages to.
virtual bool simulationIsStopable() const
GUIRunThread(FXApp *app, MFXInterThreadEventClient *mw, FXRealSpinDial &simDelay, MFXEventQue &eq, FXEX::FXThreadEvent &ev)
constructor
OutputDevice * myWarningRetriever
GUINet * myNet
the loaded simulation network
void unlock()
release mutex lock
OutputDevice * myMessageRetriever
The message is a warning.
void setSimDuration(int val)
Sets the duration of the last step's simulation part.
Encapsulates an object's method for using it as a message retriever.
OutputDevice * myErrorRetriever
The instances of message retriever encapsulations Needed to be deleted from the handler later on...
SimulationState simulationState(SUMOTime stopTime) const
Called after a simulation step, this method returns the current simulation state. ...
void prepareDestruction()
A MSNet extended by some values for usage within the gui.
void inform(std::string msg, bool addType=true)
adds a new error to the list
bool simulationAvailable() const
static std::string getStateMessage(SimulationState state)
Returns the message to show if a certain state occurs.
void simulationStep()
Performs a single simulation step (locking the simulation)
static long getCurrentMillis()
Returns the current time in milliseconds.
void loadRoutes()
loads routes for the next few steps
FXEX::FXThreadEvent & myEventThrow
SUMOTime mySimStartTime
the times the simulation starts and ends with
#define WRITE_MESSAGE(msg)
void guiSimulationStep()
Some further steps needed for gui processing.
static bool wasClosed()
check whether close was requested
FXRealSpinDial & mySimDelay