1 package org.opentrafficsim.core.dsol;
2
3 import javax.naming.NamingException;
4
5 import org.djunits.value.vdouble.scalar.Duration;
6 import org.djunits.value.vdouble.scalar.Time;
7 import org.djutils.exceptions.Throw;
8 import org.opentrafficsim.core.perception.HistoryManager;
9
10 import nl.tudelft.simulation.dsol.experiment.SingleReplication;
11
12
13
14
15
16
17
18
19 public class OtsReplication extends SingleReplication<Duration>
20 {
21
22 private final HistoryManager historyManager;
23
24
25 private final Time startTimeAbs;
26
27
28
29
30
31
32
33
34
35
36 public OtsReplication(final String id, final Time startTime, final Duration warmupPeriod, final Duration runLength,
37 final HistoryManager historyManager) throws NamingException
38 {
39 super(id, Duration.ZERO, warmupPeriod, runLength);
40 Throw.whenNull(historyManager, "historyManager");
41 this.startTimeAbs = startTime;
42 this.historyManager = historyManager;
43 }
44
45
46
47
48
49
50 public HistoryManager getHistoryManager(final OtsSimulatorInterface simulator)
51 {
52 return this.historyManager;
53 }
54
55
56
57
58
59 public Time getStartTimeAbs()
60 {
61 return this.startTimeAbs;
62 }
63
64
65 private static final long serialVersionUID = 20140815L;
66
67 @Override
68 public final String toString()
69 {
70 return "OtsReplication []";
71 }
72 }