예제 #1
0
 private void Init(DateTime initialTime)
 {
     _o2des              = null;
     _initialTime        = initialTime;
     CurrentTime         = initialTime;
     CurrentCount        = 0;
     TotalIncrementCount = 0;
     TotalDecrementCount = 0;
     CumValue            = 0;
 }
예제 #2
0
 private void Init(DateTime initialTime)
 {
     _o2des = null;
     _initialTime = initialTime;
     CurrentTime = initialTime;
     CurrentCount = 0;
     TotalIncrementCount = 0;
     TotalDecrementCount = 0;
     CumValue = 0;
 }
예제 #3
0
 public HourCounter(O2DES o2des)
 {
     Init(o2des.ClockTime);
     _o2des = o2des;
 }
예제 #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;
 }
예제 #5
0
 static public void Run_withTimeDilation(O2DES[] simulations, int eventCount)
 {
     while (eventCount > 0 && ExecuteHeadEvent_withTimeDilation(simulations)) eventCount--;
 }
예제 #6
0
 public HourCounter(O2DES o2des)
 {
     Init(o2des.ClockTime);
     _o2des = o2des;
 }