Esempio n. 1
0
 private void Init(DateTime initialTime)
 {
     _o2des              = null;
     _initialTime        = initialTime;
     CurrentTime         = initialTime;
     CurrentCount        = 0;
     TotalIncrementCount = 0;
     TotalDecrementCount = 0;
     CumValue            = 0;
 }
Esempio n. 2
0
 private void Init(DateTime initialTime)
 {
     _o2des = null;
     _initialTime = initialTime;
     CurrentTime = initialTime;
     CurrentCount = 0;
     TotalIncrementCount = 0;
     TotalDecrementCount = 0;
     CumValue = 0;
 }
Esempio n. 3
0
 public HourCounter(O2DES o2des)
 {
     Init(o2des.ClockTime);
     _o2des = o2des;
 }
Esempio n. 4
0
 static private bool ExecuteHeadEvent_withTimeDilation(O2DES[] simulations)
 {
     var toExecute = simulations.Where(s => s.FutureEventList.Count > 0)
         .OrderBy(s => s.DilatedScheduledTimeForHeadEvent).FirstOrDefault();
     if (toExecute != null)
     {
         var result = toExecute.ExecuteHeadEvent();
         foreach (var s in simulations) if (s != toExecute) s.DilatedClock = toExecute.DilatedClock; //set common clock
         return result;
     }
     return false;
 }
Esempio n. 5
0
 static public void Run_withTimeDilation(O2DES[] simulations, int eventCount)
 {
     while (eventCount > 0 && ExecuteHeadEvent_withTimeDilation(simulations)) eventCount--;
 }
Esempio n. 6
0
 public HourCounter(O2DES o2des)
 {
     Init(o2des.ClockTime);
     _o2des = o2des;
 }