-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathServiceCall.java
More file actions
61 lines (53 loc) · 1.39 KB
/
ServiceCall.java
File metadata and controls
61 lines (53 loc) · 1.39 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
package simModel;
import simulationModelling.SequelActivity;
public class ServiceCall extends SequelActivity{
Call icCall;
SMTravel model;
int operatorType;
public ServiceCall(Call icCall, SMTravel model){
this.icCall = icCall;
this.model = model;
}
@Override
protected double duration() {
return model.rvp.uSrvTm(icCall.uRequestType, operatorType);
}
@Override
public void startingEvent() {
operatorType = model.udp.assignOperator(icCall);
switch(operatorType) {
case Constants.REGULAR:
super.name = "Regular Operator";
break;
case Constants.SILVER:
super.name = "Silver Operator";
break;
case Constants.GOLD:
super.name = "Gold Operator";
break;
default:
super.name = "Invalid"; // This should not happen... like ever.
}
switch(icCall.uType) {
case Constants.REGULAR:
super.name += " serves Regular Customer";
break;
case Constants.SILVER:
super.name += " serves Silver Customer";
break;
case Constants.GOLD:
super.name += " serves Gold Customer";
break;
default:
super.name += " serves Invalid"; // This should not happen... like ever.
}
model.rgOperators[operatorType].numOfBusy ++;
}
@Override
protected void terminatingEvent() {
model.qPhoneSystem.numOfCalls--;
//model.output.beingSed--;
AfterCall afterCall = new AfterCall(icCall.uRequestType, operatorType, model);
model.spStart(afterCall);
}
}