Esempio n. 1
0
        public SKUSupply(SKU skuData, int layerPerDay, int palletPerDay)
        {
            this.SKUData                   = skuData;
            this.LayerPerDayCount          = layerPerDay;
            this.PalletPerDayCount         = palletPerDay;
            this.AvailableToPickLayerCount = 0;
            this.ReadyToPickLayerCount     = 0;
            this.OnTheWayLayerCount        = 0;
            this.ToBePickedLayerCount      = 0;
            this.PickedLayerCount          = 0;
            this.RemainingLayerCount       = layerPerDay;

            this.PalletList = new List <KeyValuePair <Pallet, bool> >(palletPerDay);
            for (int i = 0; i < PalletList.Count - 1; i++)
            {
                PalletList.Add(new KeyValuePair <Pallet, bool>(new Pallet(SKUData), true));
            }
            var lastPalletLC = layerPerDay - skuData.LayerPerPallete * (palletPerDay - 1);
            var lastPallet   = new Pallet(skuData, lastPalletLC);

            PalletList.Add(new KeyValuePair <Pallet, bool>(lastPallet, true));
        }