public void Run() { TotalCoverState = graphState.GetTotalCoverState(); TotalPayoutState = TotalCoverState.GetPayout(); TotalAllocatedPayoutState = TotalCoverState.GetAllocatedPayout(); int lowestCoverLevel = Graph.LowestCoverLevel; int NumOfCoverLevels = Graph.NumOfCoverLevels; int TopCoverLevel = lowestCoverLevel + NumOfCoverLevels; //1. top covers, simply copy (no allocation) ChildrenCoverLevelAggInfo = Graph.GetCoverNodeAggInfo(TopCoverLevel); ParentCoverLevelAggInfo = Graph.GetCoverNodeAggInfo(TopCoverLevel); CopyTopCoverLevelPayout(); //2. leafTopCovers LeafTopCoverList = Graph.GetCoverNodeAggInfo(lowestCoverLevel + 1).GetLeafTopCoverList(); CopyLeafTopCoverPayout(); //3. Allocate Cover Graph Payout for (int i = TopCoverLevel; i > lowestCoverLevel + 1; i--) { ChildrenCoverLevelAllocationState = graphState.GetCoverLevelAllocationRatioState(i - 1); ChildrenCoverLevelAggInfo = Graph.GetCoverNodeAggInfo(i - 1); ParentCoverLevelAggInfo = Graph.GetCoverNodeAggInfo(i); AllocateToOneCoverLevel(); } //4. Allocate Leaf Cover to lowest cover level, Atomic Rites and residual LowestCoverLevelAriteAllocationRatio = graphState.GetLowestCoverLevelAriteAllocationRatio(); LowestCoverLevelResidualAllocationRatio = graphState.GetLowestCoverLevelResidualAllocationRatio(); ResiduleInfo = Graph.GetCoverResiduleInfo(); AriteInfo = Graph.GetCoverAriteInfo(); ResiduleState = graphState.GetLowestCoverLevelResiduleState(); AriteState = graphState.GetLowestCoverLevelAriteState(); ParentCoverLevelAggInfo = Graph.GetCoverNodeAggInfo(lowestCoverLevel + 1); //leaf cover level AllocateToLowestCoverLevel(); }