-
Notifications
You must be signed in to change notification settings - Fork 0
/
defect.h
49 lines (38 loc) · 1.01 KB
/
defect.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
* defect.h
*
* Created on: Dec 4, 2015
* Author: jose
*/
#ifndef DEFECT_H_
#define DEFECT_H_
#include "simlib.h"
#include "debug.h"
#include "main_station.h"
#include <math.h>
class CDefect : public Process
{
public:
CDefect(unsigned int repair)
: m_trainRepair(repair), m_defStartTime(0),
m_dirFromMainStation(true), m_distanceFromMainStation(0),
m_Id(Time)
{};
virtual ~CDefect();
void Behavior();
inline unsigned int GetDelay() {return m_trainRepair;}
unsigned int GetDefectStartTime() {return m_defStartTime;}
bool GetDirection() const;
unsigned int GetLocation() const;
unsigned int GetId() const;
static Histogram m_StoppedTrainsHistogram;
static Histogram m_RestartedTrainsHistogram;
private:
void SetDefectStartTime(unsigned int time);
unsigned int m_trainRepair;
unsigned int m_defStartTime;
bool m_dirFromMainStation;
unsigned int m_distanceFromMainStation;
unsigned int m_Id;
};
#endif /* DEFECT_H_ */