House Projection Schedule Daily Calculations

 

 

Description

Projection schedules are core pre-requisites to almost all projection calculations.  They are generated once per flock/house, and their results are reused throughout the projection report for every period in various calculations.   Projection schedules are composed of projection days.  Each day has a value which is either generated from actual transactions, from standard projections, or from a combination of the two.   This document describes the logic for projection day calculations integrated into the projection report.  In addition, it describes the generic algorithm for the projection configuraiton adjustment, also known as standard adjustment value (SAV).   The SAV is applied to all projection schedules to 'even out' the transition from actual to projected values.

Egg_SinglesProduced_Day

Description

  • Projected house quantity of single eggs produced the day being processed.

Calculation

  • If a egg production transaction record exists on or after the day being processed;

    • Return the single egg quantity of eggs produced for the day being processed.

  • If a egg production transaction record does not exists on or after the day being processed;

    • Get the percent hen day production system table for the day in decimal format.

      • Get the Projection System Table value, if one has not been applied, then return the standard system table value.

      • Apply any group or house percent table adjustments to the system table value.

      • Apply Projection Configuration Adjustment (SAV).

        • Adjusted Percent Hen Day Production = System Table value + SAV

          • If the Adjusted Percent Hen Day Production is greater than 99%, reset value to equal 99% (temporary value ceiling).

    • Multiply the system table percent hen day production by the number of hen days for the day.

      • Egg_SinglesProduced_Day = Adjusted Percent Hen Day Production * HouseCount_AnimalDays_Day

EggSizePrj_*_Pct _Day

Description

  • The projected percent of eggs produced by egg size type using the egg size matrix applied to the group.

Calculation

  • Calculate the Adjusted Case Weight

  • Look up the record in the Egg Size Matrix assigned to the group for the group’s age as of the day.

  • Compare the Adjusted Case Weight to the case weight on the Egg Size Matrix record.

    • If the Adjusted Case Weight for the day and the case weight on the Egg Size Matrix record are equal or within +/- .05 pounds, return the percents for all the egg size types.

    • If the Adjusted Case Weight for the day is greater or lesser than .05 pounds of the case weight on the Egg Size Matrix record, scan the Egg Size Matrix for a closer matching case weight.

    • Get the Days to Average from the Projection Configuration applied to the Egg Size Matrix table type (assuming Projection Config will have this setting, yet to be developed).

    • Get the age of the house as of the day being process and add the days to average to the age, resulting in the max age to scan.

    • Get the age of the house as of the day being process and subtract the days to average from the age, resulting in the min age to scan.

    • Compare the Adjusted Case Weight for the day to all the case weights in the Egg Size Matrix with ages that are equal to or less than the max age and greater than or equal to the min age.

    • Locate the Egg Size Matrix record with the closest matching case weight and return the percents for all the egg size types.

EggSizePrj_*_SngEggs _Day

Description

  • The projected number of single eggs produced by size for each day.

Calculation

  • Get the projected single eggs produced for the day (Egg_SinglesProduced_Day).

  • Multiple the single egg produced for the day by egg each size percentage form the egg size matrix applied to the group and round each result to the nearest whole integer.

    • Each Egg Size System Type

      • EggSizePrj_*_SngEggs _Day = Round(EggSizePrj_*_Pct _Day * Egg_SinglesProduced_Day, 0)

        • Sample:

          • EggSizePrj_Large_ SngEggs _Day =  EggSizePrj_Large_US_Pct_Day * Egg_SinglesProduced_Day

    • Once all the EggSizePrj_*_SngEggs _Day has been calculated for each egg size system type in the matrix applied to the group.

      • Aggregate all the single egg by size to calculate the total produced by size.

        • Total Produced by Size = SUM(EggSizePrj_*_SngEggs _Day)

      • Compare the total produced by size to the projected single egg produced for the day and get the difference between the two values.

        • Single Egg Difference = Egg_SinglesProduced_Day - Total Produced by Size

      • Find the Egg Size Type with the largest value of single eggs.

        • Large Egg Size Value = MAX(EggSizePrj_*_SngEggs _Day)

      • Add the single egg difference to the largest egg size type.

        • Largest Egg Size Value [EggSizePrj_*_SngEggs _Day] = Largest Egg Size Value [EggSizePrj_*_SngEggs _Day] + Single Egg Difference

EggWt_LbsEggProd_Day

Description

  • Pounds of eggs produced in the current period.

Calculation

  • Calculate the Adjusted Case Weight

    • Get the Projection System Table value, if one has not been applied, then return the standard system table value.

    • Apply any group or house percent table adjustments to the system table value.

    • Apply Projection Configuration Adjustment (SAV).

    • Adjusted Case Weight = System Table value + SAV

  • If the Division setting for Apply Egg Weight equals Forward

    • If the day being processed is equal to less than 7 days since the date of the last recorded actual case weight.

      • Get the days number of eggs produced in cases and multiply it by the last recorded case weight.

        • EggWt_LbsEggProd_Day = ((Single Number of Eggs Produced / 360) * Last Case Weight

    • If the day being processed is greater than 7 days since the date of the last recorded actual case weight.

      • Get the days number of eggs produced in cases for the day and multiply it by the Adjusted Case Weight.

        • EggWt_LbsEggProd_Day = ((Single Number of Eggs Produced / 360) * Adjusted Case Weight

  • If the Division setting for Apply Egg Weight equals Back

    • If a egg production record with a case weight exists on or after the day being processed

      • Get the days number of eggs produced in cases for the day and multiply it by the case weight on or following the day being processed.

        • EggWt_LbsEggProd_Day = ((Single Number of Eggs Produced / 360) * Next Case Weight

    • If a egg production record with a case weight does not exists on or after the day being processed.

      • Get the days number of eggs produced in cases for the day and multiply it by Adjusted Case Weight.

        • EggWt_LbsEggProd_Day = ((Single Number of Eggs Produced / 360) * Adjusted Case Weight

FC_CaloriesConsumed_Day

Description

  • Calories consumed for a day.

Calculation

  • For each day that has a FC_LbsFeedConsumed_Day value from an actual feed delivery

    • Get the pounds consumed for the day and multiply it by the formula calories

      •  Actual Calories Consumed = FC_LbsFeedConsumed_Day * Formula Calories/Lb

  • For each day that has a projected FC_LbsFeedConsumed_Day value

    • Multiply the system table calories consumed for the day by the animal days value for the house.

      • Calculated Calories Consumed = HouseCount_AnimalDays_Day * System Table - Calorie Consumed

FC_LbsFeedConsumed_Day

Description

  • House pounds of feed consumed for the current period.

Calculation

  • Calculate the Adjusted Lbs/100/Day

    • Get the Projection System Table value, if one has not been applied, then return the standard system table value.

    • Apply any group or house percent table adjustments to the system table value.

    • Apply Projection Configuration Adjustment (SAV).

      • Adjusted Lbs/100/Day = System Table value + SAV

  • If an ending inventory exist on the day or after;

    • Pounds of feed consumed for each day in the life of the group in the house (see FC_LbsFeedConsumed calculation).

    • FC_LbsFeedConsumed_Day = Actual Daily Pounds Consumed

  • If an ending inventory does not exist on or after the day;

    • Divide the Adjusted Lbs/100/Day by 100 and multiply the result by the number of animal days.

      • FC_LbsFeedConsumed_Day = (Adjusted Lbs/100/Day  / 100) * HouseCount_AnimalDays_Day

HouseCount_AnimalDays_Day

Description

  • Average number of head for the day.

Calculation

  • The starting number of head for the day plus the ending number of head for the day, divided by two.

    • HouseCount_AnimalDays_Day = (HouseCount_StartCount_Day + HouseCount_EndCount_Day) /2

HouseCount_AvgNo_Day

Description

  • Average number of head for the day.

Calculation

  • The starting number of head for the day plus the ending number of head for the day, divided by two.

    • HouseCount_AnimalDays_Day = (HouseCount_StartCount_Day + HouseCount_EndCount_Day) /2

HouseCount_EndCount_Day

Description

  • Ending number of head for the day.

Calculation

  • The starting head count plus transfer in head, minus the mortality head count, transfer out head, cull head and depopulation head.

    • HouseCount_EndCount_Day = HouseCount_StartCount_Day  + HouseCount_HeadAdded_Day - HouseCount_Mortality_Day HouseCount_HeadTransOut_Day  - HouseCount_Culls_Day - HouseCount_HeadSold_Day

HouseCount_HeadAdded_Day

Description

  • Number of head added to a house for the day.

 

Calculation

  • Group Placement(s) are finalized;

    • Aggregate the quantity of placements and transfer in on the day.

      • HouseCount_HeadAdded_Day = Placement quantity

  • Group Placement(s) are not finalized

    • Get the aggregated quantity of all estimates, resulting in total estimate quantity.

    • Get the aggregated quantity of all actual placements, resulting in total actual placements.

    • If the total actual placement quantity is greater than the total estimate quantity, return only the placement quantity on the dates they occur.

    • If the total actual placement quantity is less than the total estimate quantity, reduce each estimated placement quantity so that the remaining estimate quantities plus the actual placement quantities are equal to the original total estimate quantity.

      • Process each estimated record from earliest date to the most recent date.

      • Lower the first estimated quantity by the total actual placement quantity or zero the estimate quantity if it’s value is less than the total actual placement quantity.

      • Calculate the remaining total actual placement quantity is the first estimate quantity was less than the total actual placement quantity

      • If remaining total actual placement quantity is still greater than zero, reduce the next estimated quantity in date sequence by the remaining total actual placement quantity

      • Continue reducing estimated quantities until remaining total actual placement quantity is zero

HouseCount_Mortality_Day

Description

  • Actual or projected number of dead for the day.

Calculation

  • If a mortality record exists on or after the day being processed;

    • Aggregate the total quantity of mortality on the day being processed.

  • If a mortality record does not exist on the day being processed or after;

    • Calculate the Mortality Pct Adjustment (SAV).

      • Use the house percent mortality and system percent mortality values through the Projection Configuration Adjustment

    • Calculate the Projected Percent Mortality (PPM)

      • Add the SAV value to the System table Percent Mortality for the day being processed.

        • PPM = System table % Mortality + SAV

      • If the value exceeds the Maximum Value set in the Projection Configuration, set it equal to the Maximum Value.

        • If PPM > Maximum Value, then PPM = Maximum Value

      • If the value is below the Minimum Value set in the Projection Configuration, set it equal to the Minimum Value.

        • If PPM < Minimum Value, then PPM = Minimum Value

    • Calculate the HouseCount_Mortality_Day for the day being processed

      • Multiple the PPM by the starting head count for the day.

        • Mortality Count = HouseCount_StartCount_Day * PPM

      • Add any remaining decimal values from the previous day to the Mortality Count value.

        • Mortality Count + Mortality Remaining Decimal Value

      • Truncate Mortality Count to an integer for the day’s HouseCount_Mortality_Day.

        • HouseCount_Mortality_Day = Integer of Mortality Count

    • Calculate the new Mortality Remaining Decimal Value to be saved for the next date to be processed.

      • Mortality Count, minus the HouseCount_Mortality_Day.

        • Mortality Remaining Decimal Value  = Mortality Count – HouseCount_Mortality_Day

HouseCount_StartCount_Day

Description

  • Start number of head for the day.

Calculation

  • Get the ending head for the previous day.

    • HouseCount_StartCount_Day = previous dates (HouseCount_EndCount_Day)

Stats_BodyWtLbs_Day

Description

  • Body weight in pounds.

Calculation

  • Calculate the Adjusted Body Weight in Lbs

    • Get the Projection System Table value, if one has not been applied, then return the standard system table value.

    • Get the Projection Configuration Adjustment (SAV) and add it to the System table value.

    • Adjusted Body Weight in Lbs = System Table value + SAV

  • If a Record keeping record exists with a body weight on the day being process;

    • Return Actual Body Weight Value

      • Stats_BodyWtLbs_Day =  convert to pounds (Actual Body Weight Value)

  • If a Record keeping record does not exist with a body weight on the day being process;

    • Return the Adjusted Body Weight in Lbs value

      • Stats_BodyWtLbs_Day = Adjusted Body Weight in Lbs

Stats_WaterGalGons_Day

Description

  • Gallons of water consumed by the animals in the house for the day.

Calculation

  • Calculate the Adjusted Gallons/100/Day

    • Get the Projection System Table value, if one has not been applied, then return the standard system table value.

      • Get the Projection Configuration Adjustment (SAV) and add it to the System table value.

        • Adjusted Gallons/100/Day = System Table value + SAV

  • If an water consumed record exists for the day

    • Convert the units to gallons and aggregate the values for the day.

  • If an water consumed record does not exist for the day

    • Multiple the Adjusted Gallons/100/Day by the number of animal days for the day.

      • Stats_WaterGalCons_Day  = ((Adjusted Gallons/100/Day / 100)* HouseCount_AnimalDays_Day

Projection Configuration Adjustment

Description

  • The projection adjustments using the settings in the Projection Configuration.

Calculation

  • Calculate the Standard Adjustment Value (SAV).

    • Averages Start and End Date

      • Start date to average

        • Date Being Processed – Days to Average

      • End date to average

        • Date Being Processed – 1 day

    • The Days  to Average will be less than the set value if;

      • Days to Average past the earliest placement of the group.

      • Days to Average past the start of the second or third cycle. All the days included in the average will be within the same period.

        • PS, PC and C1 is the first period

        • M1 and C2 is the second period

        • M2 and C3 is the third period

    • Actual Value

      • Aggregate the house actual values from the start date to the end date and calculate a simple average.

        • This value can include actual house values and previously projected values.

    • System Value

      • Aggregate the calculated system values for each corresponding age from the average start date to the end date

        • System table adjusted by group and house adjustments

      • Calculate a simple average

        • Aggregate value / number of included values

    • Get the difference between the Actual value average and the System value average

      • SAV = Actual Value Avg. – System Value Avg.

    • Validate the SAV value to the +/- Adjustment settings for the table type in the Projection Configuration

      • Calculate the percent change (decimal value) of the SAV

        • Percent Change = SAV /  Actual Value Avg.

      • Compare the Percent Change (decimal value) to the +/- Adjustment  settings (decimal values) for the table type.

        • If [+ Adj] > Percent Change > [- Adj] is true then return the SAV value

        • If [+ Adj] < Percent Change is true then adjust the SAV

          • SAV = Actual Value Avg. * [+ Adj]

        • If [- Adj] > Percent Change is true then adjust the SAV

          • SAV = Actual Value Avg. * [- Adj]