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