Energy. A hen eats to satisfy its metabolisable-energy (ME) need. Using the form of the classic NRC poultry relation (coefficients rounded):
ME_req = W^0.75 (173 - 1.95 T) + 5.5 dW + 2.07 EM [kcal/hen/day]
intake FI = ME_req / ME_diet [g/hen/day]
W is body weight (kg), T air temperature (°C), dW weight change (g/day) and EM egg mass (g/day). Each degree of warming trims maintenance by about 3 kcal, i.e. about 1 g of feed per hen per day, which is why intake falls as it gets hot and rises in winter.
Photoperiod. Lay potential follows a logistic curve in light hours, centred near 10.5 h and saturating by about 14-16 h, times an age factor (about -0.45 % of peak per week after week 28) and a heat penalty above 28 °C. Real flocks also respond to changes in daylength; here only the steady-state level is modelled.
Protein and calcium. An egg is about 12.5 % protein, and net protein use is about 45 %; maintenance takes about 1.4 g crude protein x W^0.75. A shell holds about 2.1 g calcium (about 5.5 g of shell at 38 % Ca), of which about 55 % of dietary calcium is retained (falling by about 3 % of itself per °C above 28 °C because panting upsets acid-base balance - an illustrative heat-stress effect) and about 0.3 g/day goes to maintenance.
EM_E = (ME_in - maint) / 2.07
EM_P = (CP_in - 1.4 W^0.75) / 0.278
lay = min(potential, EM_E / eggWt, EM_P / eggWt)
shell soundness = min(1, ((0.55 Ca_in - 0.3) / 2.1) / lay)
Energy and protein can limit the number of eggs (Liebig-style minimum); calcium limits shell quality, so a calcium-poor ration still produces eggs, but thin or soft-shelled ones that cannot be sold. Hens show a specific calcium appetite, so they take oyster shell only up to what they need.
Efficiency and cost. FCR = feed eaten / egg mass laid (kg/kg). Cost per dozen = 12 x feed cost per hen-day / sellable eggs per hen-day. Prices are illustrative round numbers; only feed is costed (not labour, housing, chicks or vet care).
Honest simplifications. Flock-average hens with small random weight differences; no vitamins, phosphorus, amino-acid balance or disease; eggs appear the day after the feed that made them (about 25 h ovulation cycle); hens do not pick favourite particles (in real life they strongly prefer grain, which unbalances the diet); egg weight changes only with age and protein; weight gain uses 5.5 kcal/g. Numbers are for learning, not husbandry advice. Real hens also need space, dust-baths, perches and shade.