Exemple #1
0
        public void DoWeHaverawMaterials(RawMaterials rm, double btamount, BeerType bt)
        {
            int    Productie = PCL.Find(x => x.productieclusternaam == bt.prducl).typecapacity.Find(y => y.Key.beerName == bt.beerName).Value;
            double nodig     = Math.Ceiling((bt.howMuchToBuyNL + bt.howMuchToBuyBE + bt.howMuchToBuySW + bt.howMuchToBuyFR) * 1.0 / Productie);

            while (rm.voorraad < ((nodig * Productie) * btamount))
            {
                goBuyRawMaterial(rm, btamount, bt);
            }
        }
Exemple #2
0
        public void goBuyRawMaterial(RawMaterials rm, double btamount, BeerType bt)
        {
            int    Productie = PCL.Find(x => x.productieclusternaam == bt.prducl).typecapacity.Find(y => y.Key.beerName == bt.beerName).Value;
            double nodig     = Math.Ceiling((bt.howMuchToBuyNL + bt.howMuchToBuyBE + bt.howMuchToBuySW + bt.howMuchToBuyFR) * 1.0 / Productie);

            while (rm.voorraad < ((nodig * Productie) * btamount))
            {
                rm.voorraad += rm.minOrderAmount;
                totalcostQ0 += (rm.minOrderAmount * rm.priceBuy);
                rm.amountBoughtThisQuarter += rm.minOrderAmount;
            }
        }
Exemple #3
0
        public List <RawMaterials> GenerateRawMaterials()
        {
            RawMaterials nieuw;
            StreamReader sr = new StreamReader("rawMaterials.csv");
            string       invoer;

            invoer = sr.ReadLine();
            string[] readedLine;
            while ((invoer = sr.ReadLine()) != null)
            {
                readedLine = invoer.Replace('.', ',').Split(';');
                nieuw      = new RawMaterials(readedLine);
                rawMaterials.Add(nieuw);
            }
            return(rawMaterials);
        }