private static void createProductionList() { ProductionPlan.Calculate(); for (int i = 1; i < 21; i++) { StorageService.Instance.AddProductionItem(new ProductionList(i, ProductionPlan.GetDemandById(i))); } StorageService.Instance.AddProductionItem(new ProductionList(26, ProductionPlan.GetDemandById(26))); for (int i = 29; i < 32; i++) { StorageService.Instance.AddProductionItem(new ProductionList(i, ProductionPlan.GetDemandById(i))); } for (int i = 49; i < 52; i++) { StorageService.Instance.AddProductionItem(new ProductionList(i, ProductionPlan.GetDemandById(i))); } for (int i = 54; i < 57; i++) { StorageService.Instance.AddProductionItem(new ProductionList(i, ProductionPlan.GetDemandById(i))); } }
public BPKaufteil(int id, String bezeichnung, Double diskontmenge, Double lieferzeit, Double lieferzeitAbweichung, Double bestellkostenNormal) { this.id = id; this.bezeichnung = bezeichnung; this.diskontmenge = diskontmenge; this.lieferzeit = lieferzeit; this.lieferzeitAbweichung = lieferzeitAbweichung; this.bestellkostenNormal = bestellkostenNormal; teileWert = StorageService.Instance.GetWarehouseArticleById(id).Price; verbrauchPeriode0 = ProductionPlan.GetDemandById(id); //this.verbrauchPeriode1 = ProduktionsplanungPeriode1.getBedarfByID(id); //this.verbrauchPeriode2 = ProduktionsplanungPeriode2.getBedarfByID(id); //this.verbrauchPeriode3 = ProduktionsplanungPeriode3.getBedarfByID(id); //int aktuellePeriode = Static.Static.lastperiod + 1; //Futureinwardstockmovement fism = Futureinwardstockmovement.Class; //var founditem = fism.GetOrdersByArticle(id); //if (founditem != null) //{ // foreach (var wli in founditem) // { // int lieferperiode = (int)Math.Floor(wli.Orderperiod + (this.lieferzeitGesamt / 5)); // if (lieferperiode == aktuellePeriode) // this.geplanteBestellzugaengePeriode0 += wli.Amount; // else if (lieferperiode == aktuellePeriode + 1) // this.geplanteBestellzugaengePeriode1 += wli.Amount; // else if (lieferperiode == aktuellePeriode + 2) // this.geplanteBestellzugaengePeriode2 += wli.Amount; // else if (lieferperiode == aktuellePeriode + 3) // this.geplanteBestellzugaengePeriode3 += wli.Amount; // } //} sicherheitsBestand = (int)(((lieferzeitAbweichung * StorageService.Instance.sicherheitsFaktor) * durchSchnittsverbrauchProTag)); sicherheitsBestand = sicherheitsBestand + ((10 - (sicherheitsBestand % 10)) % 10); meldeBestand = ((int)((lieferzeit * durchSchnittsverbrauchProTag) + sicherheitsBestand)); meldeBestand = meldeBestand + ((10 - (meldeBestand % 10)) % 10); }