-
Notifications
You must be signed in to change notification settings - Fork 0
/
AssemblyLine.h
47 lines (35 loc) · 1018 Bytes
/
AssemblyLine.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
//----------------------------------------------------------------------------
// Filename: AssemblyLine.h
// Date: 12 November 2013
// Description: interface for the Assembly Line class
//----------------------------------------------------------------------------
#include "PackageQueue.h"
#include <cstdlib>
#include <iostream>
using namespace std;
class AssemblyLine {
public:
AssemblyLine();
bool do_work();
void shipPkg(int timeUnit);
int getNumUnitsLeft();
double getPkgETA();
void print();
void set_workRate(double r);
void set_ID(int id);
void loadCurrentPkg();
bool isPkgCompleted(Package *p);
bool isCurrentPkgLoaded();
void setCompletedPkgCount(int n);
void setArrivingQueue(PackageQueue *PkgBuffer);
int assemblyLineID;
double workRate;
int timeUnit;
PackageQueue processingPkgBuffer;
PackageQueue completedPkgBuffer;
Package * currentPkg;
int numPkgsProcessing;
int arrivedPkgCount;
int completedPkgCount;
int numUnitsProcessing;
};