public void TellMeDemands(EngineContainer container)
{
if (container == null || container.ItemFlows == null || container.ItemFlows.Count == 0)
return;
#region Initialize
kb = new KB(container.Plans, container.InvBalances, container.DemandChains);
jit = new JIT(container.Plans, container.InvBalances, container.DemandChains);
odp = new ODP(container.Plans, container.InvBalances, container.DemandChains);
#endregion
#region Container param
List<ItemFlow> ItemFlows = container.ItemFlows;
List<Plans> Plans = container.Plans;
List<InvBalance> InvBalances = container.InvBalances;
List<DemandChain> DemandChains = container.DemandChains;
#endregion
#region Process time
List<Flow> flows = ItemFlows.Select(s => s.Flow).Distinct().ToList<Flow>();
this.ProcessTime(flows);
#endregion
#region Process ReqQty
foreach (var itemFlow in ItemFlows)
{
this.DataValidCheck(itemFlow);
this.SetFlowProperty(itemFlow, flows);
this.ProcessReqQty(itemFlow);
}
#endregion
}