Mill by product summaries

In the previous examples we could observe the total volume of products going to MILL1, but there was no account that described just the amount of conifer volume going to MILL1, and thus there was no way to set a target or quota on the amount of conifer required by MILL1. We can remedy this using a duplicate account statement to have the conifer volume that is destined for MILL1 go into an intermediate account, and then have these values duplicated into the destination. Mill quotas can now be set on the account named product.Mill1.Yield.Conif . In the following figure the shaded ovals represent these interim accounts. See the following code for details on how they are set up.

Figure 44. Duplicate accounts for tracking mill quotas

control.addExclusiveAccount("product.Yield.managed.Conif", "product.Mill1.Yield.Conif");
control.duplicateAccount("product.Yield.managed.Decid", "product.Mill1.Yield.Decid");
control.duplicateAccount("product.Mill1.Yield.Conif", "destination.MILL1", 1);
control.duplicateAccount("product.Mill1.Yield.Decid", "destination.MILL1", 1);

control.addExclusiveAccount("product.Yield.managed.Conif", "product.Mill2.Yield.Conif");
control.duplicateAccount("product.Mill2.Yield.Conif", "destination.MILL2", 1);