-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDVPs.java
More file actions
24 lines (21 loc) · 758 Bytes
/
DVPs.java
File metadata and controls
24 lines (21 loc) · 758 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
package simModel;
class DVPs
{
SMTravel model; // for accessing the clock
// Constructor
protected DVPs(SMTravel model) { this.model = model; }
// Translate deterministic value procedures into methods
/* -------------------------------------------------
Example
protected double getEmpNum() // for getting next value of EmpNum(t)
{
double nextTime;
if(model.clock == 0.0) nextTime = 90.0;
else if(model.clock == 90.0) nextTime = 210.0;
else if(model.clock == 210.0) nextTime = 420.0;
else if(model.clock == 420.0) nextTime = 540.0;
else nextTime = -1.0; // stop scheduling
return(nextTime);
}
------------------------------------------------------------*/
}