1 package org.opentrafficsim.core.dsol;
2
3 import javax.naming.NamingException;
4
5 import org.djunits.value.vdouble.scalar.Duration;
6 import org.djutils.exceptions.Throw;
7 import org.opentrafficsim.core.perception.HistoryManager;
8
9 import nl.tudelft.simulation.dsol.experiment.SingleReplication;
10
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 Duration startTimeOfDay;
26
27
28
29
30
31
32
33
34
35
36 public OtsReplication(final String id, final Duration startTimeOfDay, 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 Throw.whenNull(startTimeOfDay, "startTimeOfDay");
42 this.historyManager = historyManager;
43 this.startTimeOfDay = startTimeOfDay;
44 }
45
46
47
48
49
50
51 public HistoryManager getHistoryManager(final OtsSimulatorInterface simulator)
52 {
53 return this.historyManager;
54 }
55
56
57
58
59
60 public Duration getStartTimeOfDay()
61 {
62 return this.startTimeOfDay;
63 }
64
65 @Override
66 public final String toString()
67 {
68 return "OtsReplication []";
69 }
70
71 }