private static List <FabLot> CreateCellInputLot(this CellInProfile profile) { List <FabLot> list = new List <FabLot>(); var infos = profile.CellInfos; if (infos == null || infos.Count == 0) { return(list); } var prod = profile.Product; FabStep step = prod.Process.FirstStep as FabStep; foreach (InInfo info in infos) { DateTime avalableTime = info.ReleaseTime; int unitQty = info.Qty; string lotID = EntityHelper.CreateCellInLotID(prod); FabWipInfo wip = CreateHelper.CreateWipInfo(lotID, prod, step, unitQty); FabLot lot = CreateHelper.CreateLot(wip, Mozart.SeePlan.Simulation.LotState.CREATE); lot.ReleaseTime = LcdHelper.Max((DateTime)avalableTime, ModelContext.Current.StartTime); lot.LotState = Mozart.SeePlan.Simulation.LotState.CREATE; lot.FrontInTarget = info.InTarget; list.Add(lot); } return(list); }
private static void DoReserveBatch(this DcnMaster mst, DateTime now) { AoBatchRelease inputBatch = AoFactory.Current.BatchRelease; foreach (DcnPlan plan in mst.Current) { FabProduct prod = plan.Product; if (prod == null) { continue; } FabStep step = prod.Process.FirstStep as FabStep; if (step == null) { continue; } string lotID = EntityHelper.CreateFrontInLotID(prod); double unitQty = plan.AllocQty; FabWipInfo wip = CreateHelper.CreateWipInfo(lotID, prod, step, unitQty); FabLot lot = CreateHelper.CreateLot(wip, LotState.CREATE); DateTime releaseTime = LcdHelper.Max(plan.EqpEndTime, now); lot.ReleaseTime = releaseTime; lot.LotState = LotState.CREATE; lot.ReleasePlan = plan; var inTarget = plan.Target == null ? null : plan.Target.InTarget; lot.FrontInTarget = inTarget; inputBatch.AddEntity(releaseTime, lot); } }