Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
aggregated_parts_and_adding_usage_-_explanation_of_logic [2019/01/30 09:22]
127.0.0.1 external edit
aggregated_parts_and_adding_usage_-_explanation_of_logic [2019/01/30 13:12] (current)
kcifreo
Line 1: Line 1:
-  +===== Terms =====
- +
- +
- +
-Terms+
  
 **Estimated Quantity** **Estimated Quantity**
- 
- 
  
 <​html><​div style="​margin-left:​ 20px;">​ The Estimated Quantity that is set in the Part. </​div></​html>​ <​html><​div style="​margin-left:​ 20px;">​ The Estimated Quantity that is set in the Part. </​div></​html>​
  
 **Actual Usage** **Actual Usage**
- 
- 
  
 <​html><​div style="​margin-left:​ 20px;">​ The quantity that is used of the Part. </​div></​html>​ <​html><​div style="​margin-left:​ 20px;">​ The quantity that is used of the Part. </​div></​html>​
  
 **Used Estimated** **Used Estimated**
- 
- 
  
 <​html><​div style="​margin-left:​ 20px;">​ The calculated portion of the Estimated Quantity that has been used. </​div></​html>​ <​html><​div style="​margin-left:​ 20px;">​ The calculated portion of the Estimated Quantity that has been used. </​div></​html>​
  
 **Unused Estimated** **Unused Estimated**
- 
- 
  
 <​html><​div style="​margin-left:​ 20px;">​ The calculated portion of the Estimated Quantity that has not been used. (ie Quantity Reserved) </​div></​html>​ <​html><​div style="​margin-left:​ 20px;">​ The calculated portion of the Estimated Quantity that has not been used. (ie Quantity Reserved) </​div></​html>​
  
 **Used Beyond Estimated** **Used Beyond Estimated**
- 
- 
  
 <​html><​div style="​margin-left:​ 20px;">​ The calculated amount of actual usage that is over the Estimated Quantity </​div></​html>​ <​html><​div style="​margin-left:​ 20px;">​ The calculated amount of actual usage that is over the Estimated Quantity </​div></​html>​
  
 +===== Examples of these terms in various scenarios =====
  
 +|~ Estimated \\ Quantity||~ Actual \\ Usage||~ Used \\ Estimated||~ Unused \\ Estimated||~ Used Beyond \\ Estimated||
 +|> 10||> 0||> 0||> 10||> 0||
 +|> 10||> 5||> 5||> 5||> 0||
 +|> 10||> 10||> 10||> 0||> 0||
 +|> 10||> 15||> 10||> 0||> 5||
 +|> 10||> -5||> 0||> 10||> -5||
 +|> 0||> 5||> 0||> 0||> 5||
 +|> 0||> -5||> 0||> 0||> -5||
 +|> -10||> 0||> 0||> -10||> 0||
 +|> -10||> -5||> -5||> -5||> 0||
 +|> -10||> -10||> -10||> 0||> 0||
 +|> -10||> -15||> -10||> 0||> -5||
 +|> -10||> 5||> 0||> -10||> 5||
  
-Examples of these terms in various scenarios+**Notes**
  
- +   * Used Estimated + Unused Estimated will always equal Estimated Quantity
- +
-||~ Estimated ​ \\ Quantity ||~ Actual ​ \\ Usage ||~ Used  \\ Estimated ||~ Unused ​ \\ Estimated ||~ Used Beyond ​ \\ Estimated || +
-||> 10 ||> 0 ||> 0 ||> 10 ||> 0 || +
-||> 10 ||> 5 ||> 5 ||> 5 ||> 0 || +
-||> 10 ||> 10 ||> 10 ||> 0 ||> 0 || +
-||> 10 ||> 15 ||> 10 ||> 0 ||> 5 || +
-||> 10 ||> -5 ||> 0 ||> 10 ||> -5 || +
-||> 0 ||> 5 ||> 0 ||> 0 ||> 5 || +
-||> 0 ||> -5 ||> 0 ||> 0 ||> -5 || +
-||> -10 ||> 0 ||> 0 ||> -10 ||> 0 || +
-||> -10 ||> -5 ||> -5 ||> -5 ||> 0 || +
-||> -10 ||> -10 ||> -10 ||> 0 ||> 0 || +
-||> -10 ||> -15 ||> -10 ||> 0 ||> -5 || +
-||> -10 ||> 5 ||> 0 ||> -10 ||> 5 || +
-**Notes** +
-  ​* Used Estimated + Unused Estimated will always equal Estimated Quantity+
   * Used Estimated + Used Beyond Estimated will always equal Actual Usage   * Used Estimated + Used Beyond Estimated will always equal Actual Usage
   * The only time Unused Estimated and Used Beyond Estimated will both be non-zero is when Estimated Quantity greater than zero and Actual Usage is less than zero or vice-versa.   * The only time Unused Estimated and Used Beyond Estimated will both be non-zero is when Estimated Quantity greater than zero and Actual Usage is less than zero or vice-versa.
  
 +===== Sequence for distributing usage =====
  
 +When usage is added, Control will go through each of these steps, applying as much usage in each step. Once the new usage remaining get to zero, the process is complete and it does not continue to the next step.
  
-Sequence for distributing ​usage+**Added ​usage (when the Added Usage is greater than zero)**
  
- 
- 
-When usage is added, Control will go through each of these steps, applying as much usage in each step.  Once the new usage remaining get to zero, the process is complete and it does not continue to the next step. 
- 
-**Added usage (when the Added Usage is greater than zero)** 
   - If any parts have a Used Beyond Estimate amount that is less than zero, apply the usage to them to attempt to raise the amount to zero.   - If any parts have a Used Beyond Estimate amount that is less than zero, apply the usage to them to attempt to raise the amount to zero.
   - If any parts have a Used Estimates amount that is less than zero, apply the usage to them to attempt to raise the amount to zero.   - If any parts have a Used Estimates amount that is less than zero, apply the usage to them to attempt to raise the amount to zero.
   - If any parts have an Unused Estimated amount that is greater than zero, apply the usage to them to attempt to lower the amount to zero.   - If any parts have an Unused Estimated amount that is greater than zero, apply the usage to them to attempt to lower the amount to zero.
   - Attempt to rebalance actual usage of parts that have an Estimated Quantity that is greater than zero.   - Attempt to rebalance actual usage of parts that have an Estimated Quantity that is greater than zero.
-  - Distribute proportionately among parts that have an Estimated Quantity that is greater than zero.  If every part has an Estimated Quantity of zero, then distribute evenly among all the parts. ​ If every part has an Estimated Quantity that is less than or equal to zero, then distribute proportionately among parts with an Estimated Quantity that is less than zero.+  - Distribute proportionately among parts that have an Estimated Quantity that is greater than zero. If every part has an Estimated Quantity of zero, then distribute evenly among all the parts. If every part has an Estimated Quantity that is less than or equal to zero, then distribute proportionately among parts with an Estimated Quantity that is less than zero.
  
 **Removing usage (when then Added Usage is less than zero)** **Removing usage (when then Added Usage is less than zero)**
 +
   - If any parts have a Used Beyond Estimate amount that is greater than zero, apply the usage to them to attempt to lower the amount to zero.   - If any parts have a Used Beyond Estimate amount that is greater than zero, apply the usage to them to attempt to lower the amount to zero.
   - If any parts have a Used Estimates amount that is greater than zero, apply the usage to them to attempt to lower the amount to zero.   - If any parts have a Used Estimates amount that is greater than zero, apply the usage to them to attempt to lower the amount to zero.
   - If any parts have an Unused Estimated amount that is less than zero, apply the usage to them to attempt to raise the amount to zero.   - If any parts have an Unused Estimated amount that is less than zero, apply the usage to them to attempt to raise the amount to zero.
   - Attempt to rebalance actual usage of parts that have an Estimated Quantity that is less than zero.   - Attempt to rebalance actual usage of parts that have an Estimated Quantity that is less than zero.
-  - Distribute proportionately among parts that have an Estimated Quantity that is less than zero.  If every part has an Estimated Quantity of zero, then distribute evenly among all the parts. ​ If every part has an Estimated Quantity that is greater than or equal to zero, then distribute proportionately among parts with an Estimated Quantity that is greater than zero.+  - Distribute proportionately among parts that have an Estimated Quantity that is less than zero. If every part has an Estimated Quantity of zero, then distribute evenly among all the parts. If every part has an Estimated Quantity that is greater than or equal to zero, then distribute proportionately among parts with an Estimated Quantity that is greater than zero.
  
 **Note:** **Note:**
 +
   * If there are parts with an Estimated Quantity of zero, but not all of the parts have an Estimated Quantity of zero, then those parts with never get usage added to them with this method.   * If there are parts with an Estimated Quantity of zero, but not all of the parts have an Estimated Quantity of zero, then those parts with never get usage added to them with this method.
   * Though, any actual usage that is applied to parts with zero Estimated Quantity can be backed out.   * Though, any actual usage that is applied to parts with zero Estimated Quantity can be backed out.
  
- +===== Details of the steps =====
- +
-Details of the steps+
  
 **Steps 1-3:** **Steps 1-3:**
  
- +If the quantity added is greater than the total amount it is being applied to, then the full amount will be applied and the remainder will be carried over to the next step. Otherwise, the quantity added will be distributed proportionately based on the amounts being applied to.
- +
-If the quantity added is greater than the total amount it is being applied to, then the full amount will be applied and the remainder will be carried over to the next step.  Otherwise, the quantity added will be distributed proportionately based on the amounts being applied to. +
- +
- +
- +
-  ​+
  
 **Example:​** **Example:​**
- 
- 
  
 You have 3 parts with estimated quantities of 10, 20, and 30, and zero actual quantity for all three. You have 3 parts with estimated quantities of 10, 20, and 30, and zero actual quantity for all three.
- 
- 
  
 If you were to add an actual quantity of 70, then 10, 20, and 30 would be added to the actual quantities, and a quantity of 10 would be carried on to the next step. If you were to add an actual quantity of 70, then 10, 20, and 30 would be added to the actual quantities, and a quantity of 10 would be carried on to the next step.
- 
- 
  
 If you were to add an actual quantity of 30, then 5, 10, and 15 would be added to the actual quantities, and the distribution of the added actual quantity would be complete. If you were to add an actual quantity of 30, then 5, 10, and 15 would be added to the actual quantities, and the distribution of the added actual quantity would be complete.
- 
- 
- 
-  ​ 
  
 **Step 4:** **Step 4:**
  
- +In this step, the current actual usage plus the newly added usage from steps 1-3 for each part is examined to compare the actual distribution with the distribution of the estimated quantity. From there will will attempt to use the remaining added quantity to adjust the actual usage so the distribution matches the estimated distribution.
- +
-In this step, the current actual usage plus the newly added usage from steps 1-3 for each part is examined to compare the actual distribution with the distribution of the estimated quantity. ​ From there will will attempt to use the remaining added quantity to adjust the actual usage so the distribution matches the estimated distribution.+
  
 **Note:** **Note:**
- 
- 
  
 The existing actual usage will not be reduced. The existing actual usage will not be reduced.
- 
- 
- 
-  ​ 
  
 **Step 5:** **Step 5:**
  
 +At this point, any remaining added usage will be distributed based on the distribution of the estimated quantities. If all of the estimated quantities are zero, then the added amount will be distributed evenly.
  
 +See Also
  
-At this point, any remaining added usage will be distributed based on the distribution of the estimated quantities. ​ If all of the estimated quantities are zero, then the added amount will be distributed evenly. +\\
- +
- +
- +
-See Also+