/** * no confirmations are created and applied */ private void StartTestCycle(SimulationInterval simulationInterval, bool shouldPersist) { Quantity customerOrderQuantity = new Quantity(ZppConfiguration.CacheManager .GetTestConfiguration().CustomerOrderPartQuantity); // init transactionData ZppConfiguration.CacheManager.ReloadTransactionData(); _customerOrderCreator = new CustomerOrderCreator(customerOrderQuantity); _customerOrderCreator.CreateCustomerOrders(simulationInterval, customerOrderQuantity); // execute mrp2 Zpp.Mrp2.impl.Mrp2 mrp2 = new Zpp.Mrp2.impl.Mrp2(simulationInterval); mrp2.StartMrp2(); DebuggingTools.PrintStateToFiles(simulationInterval, ZppConfiguration.CacheManager.GetDbTransactionData(), "", true); // no confirmations // persisting cached/created data if (shouldPersist) { ZppConfiguration.CacheManager.Persist(); } }
public void StartOneCycle(SimulationInterval simulationInterval, Quantity customerOrderQuantity) { IDbTransactionData dbTransactionData = ZppConfiguration.CacheManager.GetDbTransactionData(); _customerOrderCreator.CreateCustomerOrders(simulationInterval, customerOrderQuantity); // Mrp2 Zpp.Mrp2.impl.Mrp2 mrp2 = new Zpp.Mrp2.impl.Mrp2(simulationInterval); mrp2.StartMrp2(); DebuggingTools.PrintStateToFiles(simulationInterval, dbTransactionData, "1_after_mrp2", true); // CreateConfirmations _confirmationManager.CreateConfirmations(simulationInterval); DebuggingTools.PrintStateToFiles(simulationInterval, dbTransactionData, "2_after_create_confirmations", false); // ApplyConfirmations // TODO: disable these two lines /*DemandToProviderGraph demandToProviderGraph = new DemandToProviderGraph(); * string demandToProviderGraphString = demandToProviderGraph.ToString(); * ZppConfiguration.CacheManager.UseArchiveForGetters(); * DemandToProviderGraph demandToProviderGraphArchive = new DemandToProviderGraph(); * string demandToProviderGraphArchiveString = demandToProviderGraphArchive.ToString(); * ZppConfiguration.CacheManager.UseArchiveForGettersRevert();*/ _confirmationManager.ApplyConfirmations(); DebuggingTools.PrintStateToFiles(simulationInterval, dbTransactionData, "3_after_apply_confirmations", false); // TODO: disable following lines /* DemandToProviderGraph demandToProviderGraph2 = new DemandToProviderGraph(); * string demandToProviderGraphString2 = demandToProviderGraph2.ToString(); * /*ZppConfiguration.CacheManager.UseArchiveForGetters(); * DemandToProviderGraph demandToProviderGraphArchive2 = new DemandToProviderGraph(); * string demandToProviderGraphArchiveString2 = demandToProviderGraphArchive2.ToString(); * ZppConfiguration.CacheManager.UseArchiveForGettersRevert();*/ }