-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathEvent.h
More file actions
33 lines (24 loc) · 682 Bytes
/
Copy pathEvent.h
File metadata and controls
33 lines (24 loc) · 682 Bytes
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
//
// Created by Tristan Mayfield on 2019-03-31.
//
#ifndef DISCRETESIMULATION_EVENT_H
#define DISCRETESIMULATION_EVENT_H
#import <iostream>
using namespace std;
typedef enum {
ARRIVAL, DEPARTURE
} EventType;
// define an event struct to store events
typedef struct {
double eventTime; // time event is to be completed
double duration; // total customer service time
double arrivalTime;
int line; // for supermarket use only
EventType event;
} EventStruct;
struct compareEventTime {
bool operator()(const EventStruct &lhs, const EventStruct &rhs) const {
return lhs.eventTime > rhs.eventTime;
}
};
#endif //DISCRETESIMULATION_EVENT_H