Feed supply functions module

General feed supply equations used throughout AFO.

AfoLogic.FeedsupplyFunctions.f_effective_mei(dmi, md, threshold_f, confinement_inc, ri=1, eff_above=0.5)
According to the Australian Feeding Standards (Freer et al 2007) an animal that is gaining weight then

losing weight is less efficient than an animal that is maintaining weight on a constant diet. Therefore, switching between a high quality diet and a low quality diet to maintain weight requires more MJ of ME than using a consistent medium quality diet. This is represented by scaling the MEI that is above that required to meet the animal target with the animal target being based on the mid-point of the feed pool (hence effective mei varies for each feed pool (v) because the target profile varies between pools). This would be important to represent in the model for animals with a liveweight target set to reduce MEI and maximise SR. This occurs when animals are being retained on-farm over summer, and extra MEI with weight gain would not increase profit. However, for animals that are being fed to gain weight to achieve a target for turnoff, better quality feed with increased weight gain would increase profit due to faster growth with earlier turnoff. In situations where a animal decision variable with faster growth would be selected, if it were available, it would be better to not represent the reduced efficiency, whereas if that decision variable would not be selected then the reduction should be represented. Working conclusion: All feedstuffs should go through f_effective_mei. However, the highest nv pool should not be reduced, even if the feed quality is greater than then animal demand, on the assumption that the target for these animals is growth and that faster growth would be better. The exception to the above is supplement because the quantity of supplement can be controlled so as not to result in LWG followed by a period of LWL.

Parameters:
  • dmi – value or array - Dry matter intake of the feed decision variable (kg).

  • md – value or array - M/D of the feed (MJ of ME / kg of DM).

  • threshold_f – value or array - Diet quality (ME/Vol) required by animals (with a f axis). Below the threshold: effective m/d == m/d

  • confinement_inc – boolean stating if the confinement feed pool is included.

  • ri – value or array, optional (1.0) - Relative intake of the feed (quality and quantity).

  • eff_above – value or array, optional (0.5) - Efficiency that energy is used if above required quality, and animals are gaining then losing weight.

If inputs are provided in arrays then they must be broadcastable.

Returns:

ME available to the animal to meet their ME requirements for the target profile, from the quantity of DM consumed in the feed decision variable.

AfoLogic.FeedsupplyFunctions.f_foo_convert(cu3, cu4, foo, pasture_stage, legume=0, hr_scalar=1, cr=None, z_pos=-1, treat_z=False)

Adjust FOO for measurement method.

Depending on the region, FOO can be measured differently. For example, in WA when measuring FOO the pasture is cut to ground level using a scalpel versus NSW where it is cut at a higher level with shears. This results in the same amount of feed being valued at a higher FOO in WA. Furthermore, there are differences in sward morphology when comparing WA pasture with Victoria and NSW. WA has a higher clover content and for any level of FOO are more prostrate i.e. shorter. These conversion equations also make an adjustment for pasture height, which is returned in the hf variable. The FOO is adjusted in this function to the method which is used in the livestock production equations. This was the shears method but now appears to be total above ground biomass which is as used in WA.

FOO only needs to be adjusted for the intake equations. It does not need to be adjusted for the pasture growth calculations because the FOO in the inputs is consistent with the FOO in the pasture growth calculations.

The minimum grazing limit FOO level (level which grazing can not occur below) is specified in FOO units of the livestock grazing equations (this value is removed from available FOO in f_ra(). The base level in the pasture grazing intensity calculations is in units of FOO that have been used to define the PGR by FOO inputs. Thus, in WA, the base level FOO would be higher than NSW.

Parameters:
  • cu3 – this parameter should already be slice on the c4 axis.

  • cu4 – this parameter should already be slice on the c4 axis.

  • treat_z – boolean to control if z axis is treated. Pasture stage is used as an index so in the weighted average season model the z axis should get treated at the end of this function. This happens for stock but not for pasture because it would require doubling up lots of code.

AfoLogic.FeedsupplyFunctions.f_hf(hr, cr=None)

Calculate height factor of feed.

Parameters:
  • hr – the height of feed relative to 3cm per t/ha.

  • cr – cr12 effect of pasture height

Returns:

Height factor

AfoLogic.FeedsupplyFunctions.f_ra_cs(foo, hf, cr=None, zf=1)

CSIRO relative availability of a feed.

Relative availability is the availability of a feed to livestock. It is the product of two components; relative rate of eating (RR) and relative time spent grazing (RT).

NOTE: Only pass cr parameter if called from Stock_generator that have a g axis

Parameters:
  • foo – feed on offer (kg/ha dry matter)

  • hf – height factor

  • cr – parameters for prediction of relative intake

  • zf – mouth size factor. Accommodates the smaller mouth size of young animals, allowing them to achieve their potential intake at a lower level of herbage availability than would be needed by adults.

Returns:

Relative availability

AfoLogic.FeedsupplyFunctions.f_ra_mu(foo, hf, zf=1, cu0=None)

Murdoch relative availability of a feed.

Relative availability is the availability of a feed to livestock.

NOTE: Only pass cr parameter if called from Stock_generator that have a g axis

Parameters:
  • foo – feed on offer (kg/ha dry matter)

  • hf – height factor

  • zf – mouth size factor. Accommodates the smaller mouth size of young animals, allowing them to achieve their potential intake at a lower level of herbage availability than would be needed by adults.

  • cu0

Returns:

Relative availability

AfoLogic.FeedsupplyFunctions.f_rel_intake(ra, rq, legume, cr=None)

Relative intake – The proportion of livestock potential intake required to consume 1kg of feed given the availability and digestibility.

Calculation of relative intake includes the effect of feed availability, feed quality and the interaction. This function is not called for feeds (such as supplements) that do not have an ‘availability’ characteristic. The calculated RI can be greater than 1 - which implies that actual intake can be greater than the potential intake This can occur if rq is greater than 1, due to the ‘legume’ effect on the intercept or if DMD is greater than cr1.

NOTE: Only pass cr parameter if called from Stock_generator that have a g axis

AfoLogic.FeedsupplyFunctions.f_rq_cs(dmd, legume, cr=None, sf=0)

CSIRO relative ingestibility (rq) of a feed source.

NOTE: Only pass cr parameter if called from Stock_generator that have a g axis NOTE 2: sf is currently not used. Will be required if using tropical species

Parameters:
  • dmd – feed digestibility

  • legume – legume proportion.

  • cr – parameters for prediction of relative intake

  • sf – species factor. It is making an adjustment for the intake of C4 grasses being higher than C3 grasses if measured at the same digestibility.

Returns:

Relative ingestibility