Пример #1
0
 public static void OffsetJob(JobPlan j, TimeSpan offset)
 {
     j.RouteStartingTimeUTC = j.RouteStartingTimeUTC.Add(offset);
     j.RouteEndingTimeUTC   = j.RouteEndingTimeUTC.Add(offset);
     for (int proc = 1; proc <= j.NumProcesses; proc++)
     {
         for (int path = 1; path <= j.GetNumPaths(proc); path++)
         {
             j.SetSimulatedStartingTimeUTC(proc, path,
                                           j.GetSimulatedStartingTimeUTC(proc, path).Add(offset)
                                           );
             var prod = new List <JobPlan.SimulatedProduction>();
             foreach (var p in j.GetSimulatedProduction(proc, path))
             {
                 prod.Add(new JobPlan.SimulatedProduction()
                 {
                     TimeUTC  = p.TimeUTC.Add(offset),
                     Quantity = p.Quantity,
                 });
             }
         }
     }
     // not converted: hold patterns
 }