Beispiel #1
0
 public virtual void Reset(int randomSeed)
 {
     Now       = StartDate;
     Random    = new SystemRandom(randomSeed);
     ScheduleQ = new EventQueue(InitialMaxEvents);
     Queue     = new Queue <Event>();
 }
Beispiel #2
0
 public Environment(DateTime initialDateTime, int randomSeed, TimeSpan? defaultStep = null) {
   DefaultTimeStepSeconds = (defaultStep ?? TimeSpan.FromSeconds(1)).Duration().TotalSeconds;
   StartDate = initialDateTime;
   Now = initialDateTime;
   Random = new SystemRandom(randomSeed);
   ScheduleQ = new EventQueue(InitialMaxEvents);
   Queue = new Queue<Event>();
   Logger = Console.Out;
 }
Beispiel #3
0
 public Environment(DateTime initialDateTime, TimeSpan?defaultStep = null)
 {
     DefaultTimeStepSeconds = (defaultStep ?? TimeSpan.FromSeconds(1)).Duration().TotalSeconds;
     StartDate = initialDateTime;
     Now       = initialDateTime;
     Random    = new SystemRandom();
     ScheduleQ = new EventQueue(InitialMaxEvents);
     Queue     = new Queue <Event>();
     Logger    = Console.Out;
 }
Beispiel #4
0
 public Environment(DateTime initialDateTime, int randomSeed, TimeSpan?defaultStep = null)
     : base(initialDateTime, randomSeed, defaultStep)
 {
     Random = new SystemRandom(randomSeed);
 }
Beispiel #5
0
 public Environment(DateTime initialDateTime, TimeSpan?defaultStep = null)
     : base(initialDateTime, defaultStep)
 {
     Random = new SystemRandom();
 }
Beispiel #6
0
 public Environment(int randomSeed, TimeSpan?defaultStep = null)
     : base(randomSeed, defaultStep)
 {
     Random = new SystemRandom(randomSeed);
 }
Beispiel #7
0
 public Environment(TimeSpan?defaultStep)
     : base(defaultStep)
 {
     Random = new SystemRandom();
 }
Beispiel #8
0
 public Environment()
     : base()
 {
     Random = new SystemRandom();
 }
Beispiel #9
0
 public virtual void Reset(int randomSeed) {
   ProcessedEvents = 0;
   Now = StartDate;
   Random = new SystemRandom(randomSeed);
   ScheduleQ = new EventQueue(InitialMaxEvents);
   Queue = new Queue<Event>();
 }