Phase module

author: young

The phase module calculates the costs and crop production of each phase. For pasture phases, production is calculated in the pasture module.

The inputs [1] include phase yield (for pasture this is 0), fertiliser and chemical requirements, frost damage, seeding rates, soil type, residue management, proportion of arable area, commodity prices, fees and levies. To accurately reflect rotation history, soil type and weather effects on phase production and management, many of these user inputs vary by rotation history, soil type and weather conditions. For example, the rotation phase history can influence the soil fertility, weed burden and disease and pest levels. These factors impact the potential yield and the level of fertiliser and chemicals.

Each phase provides a certain amount of biomass based on the inputs above. Accordingly, AFO can optimise the area of each rotation phase on each LMU and the best way to utilise the biomass of each rotation phase. Biomass can be either harvested for grain, baled for hay or grazed as standing fodder. AFO does not currently simulate the biology of crop plant growth under different technical management. Thus, AFO does not optimise technical aspects of cropping such as timing and level of fertiliser applications. However, the user has the capacity to do this manually by altering the inputs (à la management of inputs in simulation modelling) or by including additional land uses which represent varying levels of inputs and production.

There are two methods that can be used to generate cropping inputs for the model:

  1. Manually enter the inputs for selected rotation phases:

    The user can manually input the fertiliser and chemical requirements and resulting yields of each rotation phase. To do this accurately requires an in-depth knowledge of cropping in the location being modelled. Thus, the process is often done in collaboration with a consultant or specialist in the field. This input method can be limiting if the user is hoping to include a large number of rotation phases or landuses that are not well established in the given location because it can be difficult to determine accurate inputs.

  2. Generate using simulation modelling:

    APSIM is a whole farm simulation model widely used in Australia. APSIM has detailed modules which use robust relationships to simulate plant growth. The parameters used in APSIM can be altered to represent plant growth in many different situations. For example, different rainfall or soil conditions. AFO users can use APSIM to generate yield of crops in a given rotation under a specified fertiliser and chemical regime.

The crop management decisions that are optimised can include:

  1. Area of each rotation phase on each soil type in each weather year depending on paddock history.

  2. Area of each crop harvested, baled or grazed.

  3. Contractual services for seeding or harvesting.

  4. Labour allocation.

  5. Time of sowing.

The model can also represent and compare (but not optimise in a single model solution):

  1. Fertiliser application rate and timing.

  2. Chemical application rate and timing.

  3. Seeding rate.

  4. Alternative cultivars.

  5. Seeding technology.

AfoLogic.Phase.f_biomass2product()

Relationship between biomass and saleable product. Where saleable product is either grain or hay.

Biomass is related to product through harvest index, harvest proportion and biomass scalar. Harvest index is the amount of the target product (grain or hay) per unit of biomass at harvest (which is the unit of the biomass DV). Harvest proportion accounts for grain that is split/spilt during the harvesting process. Biomass scalar is the total biomass production from the area baled net of respiration losses relative to biomass at harvest if not baled. This is to account for difference in biomass between harvest and baling time.

Crop yield can also be adversely impacted by frost during the plants flowing stage [ZCC+15]. Thus, the harvest index of each rotation phase is adjusted by a frost factor. The frost factor can be customised for each crop which is required because different crops flower at different times, changing the impact and probability of frost biomass reduction. Frost factor can be customised for each LMU because frost effects can be altered by the LMU topography and soil type. For example, sandy soils are more affected by frost because the lower moisture holding capacity reduces the heat buffering from the soil.

Note

Potentially frost can be accounted for in the inputs (particularly if the simulation model accounts for frost). The LMU yield factor must then capture the difference of frost across LMUS.

AfoLogic.Phase.f_chem_application()

Number of applications of each chemical option for each rotation.

The number of applications at each spraying time (e.g. pre-seeding knock down, pre-emergent, post-emergent and fungicide) for each rotation phase is entered by the user or obtained from the simulation output . When determining the number of applications, the user must consider both the rotation history and the current landuse. The rotation history is important because it impacts the initial levels of weed and disease burden and fungi. The current landuse is important because different landuses are susceptible to different weeds and diseases. Furthermore, chemicals can be specific for certain crops and have varying levels of effectiveness for different weeds and diseases.

Similar to fertiliser, the number of chemical applications is the same for all LMUs because it is assumed that the spray rate varies rather than the frequency of application. However, the area sprayed is adjusted by the arable proportion for each LMU. The assumption is that non-arable areas are not sprayed.

AfoLogic.Phase.f_chem_cost(r_vals)

Calculates the cost of spraying for each rotation phase on each LMU.

The total cost of spraying is made up from the cost of the chemical (herbicide and fungicide) and the machinery cost of application (detailed in the machinery section). The chemical cost is incurred in the cashflow period when it is applied. The assumption is that chemical is purchased shortly before application because farmers wait to see how the year unfolds before locking in a spraying plan.

To simplify the input process, the total cost of herbicide and fungicide on the base LMU for each land use is entered as an input by the user. This saves the step of going from a volume of chemical to a cost which means AFO does not need to represent the large array of chemical options available. Making it easier to keep AFO up to date. The chemical cost is adjusted by an LMU factor to account for the cost of herbicide/fungicide changing for different LMUs (e.g. a more expensive chemical package may be used on heavier soils compared to deep sand).

Returns:

Total cost of chemical and application for each rotation phase - summed with other cashflow items at the end of this section.

AfoLogic.Phase.f_farmgate_grain_price(r_vals={})

Calculates the grain price received by the farmer.

The farm gate grain price [2] is calculated for each grain pool. Different grain pools are included to represent different grain qualities. Depending on the grain variety used, and the season and the farmers skill, the grain produced will change quality and hence receive a different price. The price received by the farmer is the market price received less any selling costs. The selling costs includes the transport costs which are dependent on the location of the modelled farm, and the selling fees which often includes receival and testing fees, and government levies.

The market price is inputted for three different price percentiles. This is extrapolated to return the market price for the specified percentile.

AfoLogic.Phase.f_fert_cost(r_vals)

Cost of fertilising the arable areas. Includes the fertiliser cost and the application cost.

The cost of fertilising is made up from the cost of the fertilisers, the cost getting the fertiliser delivered to the farm and the machinery cost of application (detailed in the machinery section). The cost is incurred in the cashflow period when it is applied. The assumption is that fertiliser is purchased shortly before application because farmers wait to see how the year unfolds before locking in a fertiliser plan.

Fertiliser application cost is broken into two components (detailed in the machinery section).

  1. Application cost per tonne ($/rotation)

  2. Application cost per ha ($/rotation)

Returns:

Dataframe of fertiliser costs. Summed with other cashflow items at the end of the module

AfoLogic.Phase.f_fert_passes()

Hectares of fertilising required over arable area.

For both fixed and variable fertiliser the number of applications for each rotation phase is entered by the user or obtained from the simulation output. The number of fertiliser applications is the same for all LMUs because it is assumed that the rate of application varies rather than the frequency of application.

AfoLogic.Phase.f_fert_req()

Fert required by 1ha of each rotation phase (kg/ha) after accounting for arable area.

Different land uses have varying nutrient requirements, varying methods of obtaining nutrients from the soil and leave the soil in varying states (e.g. pulse crop fix nitrogen which typically reduces their requirement for external nitrogen and leaves the soil with a higher nitrogen content for the following year/s). To accommodate these factors the fertiliser requirement section is broken into three sections. Firstly, fixed fertiliser, which is the fertiliser that is applied to all rotation phases (e.g. lime which is typically applied routinely, irrelevant of the land use history). Secondly, land use specific fertiliser, which is applied based on the current land use independent of the phase history. Lastly, rotation phase specific fertiliser, which is applied based on both the current land use and the history.

Fertiliser is applied to non-arable area in pasture phases, it is not applied to non-arable pasture in a crop phase because the non-arable pasture in a crop phase is not able to be grazed until the end of the year, by which time it is rank and therefore a waste of money to fertilise. Fertiliser rate for non-arable areas can be adjusted separately to the arable area.

The fertiliser requirement is input by the user for the base LMU. The fertiliser requirement is then adjusted by an LMU factor and an arable area factor.

Note: this function is also used in the LabourCropPyomo

AfoLogic.Phase.f_grain_pool_proportions()

Calculate the proportion of grain in each pool.

The total adjusted yield is split into two pools (firsts and seconds) to represent the grain that does and does not meet the quality specifications. Grain that does not meet the specifications is downgraded and sold for a discount. Each grain pool is represented as a separate grain transfer constraint, providing the option for the model to optimise the grain outcome. For example, the model has the option to sell high quality grain (firsts) to market and retain the lower quality grain (seconds) for livestock feed.

AfoLogic.Phase.f_grain_price(r_vals)

Allocates grain price into a cashflow period and stores parameter data for pyomo.

Returns:

Dict of farm gate price received for each grain in each cashflow period.

AfoLogic.Phase.f_insurance(r_vals)

Crop insurance cost.

Crop insurance is typically based off the farmers estimation of yield in mid spring (hence active z axis). This is not going to exactly be equal to final yield, but it is closer than using the average yield. The small amount of error in this assumption will have little impact due to the small magnitude of financial impact of insurance.

Note

arable area is already counted for by the yield calculation.

AfoLogic.Phase.f_phase_sow_req()

Area of seeding required for 1ha of each rotation.

This accounts for arable area and includes any seeding (wet or dry or pasture).

AfoLogic.Phase.f_phase_stubble_cost(r_vals)

Cost to handle stubble for 1 ha.

The stubble handling cost per hectare is calculated based on machinery usage (see Mach.py). The cost is then adjusted by the probability of each rotation phase requiring handling which is determined by the ration of the crop yield to the critical threshold.

General rules regarding stubble handling:

  1. Stubble handling is not required if the land use is a legume crop, pasture or lucerne

  2. Once cereal crops are big enough to yield more than 3.5t of grain/ha their stubble residue starts to become an issue when sowing the next crop.

  3. Wheat stubble is the most problematic

  4. Barley stubble tends to be less problematic because barley crops tend to get harvested at a lower height, barley stubble seems to break down quicker than wheat and livestock tend to graze barley stubbles harder.

  5. Once canola crops are big enough to yield more than 2.3t of grain/ha their stubble residue starts to become an issue when sowing the next crop.

The biggest factor determining whether stubble will require handling is the amount of stubble present, which largely depends on season type (other factors include width between crop rows, what type of seeding setup is used, how low crop was harvested, if the header was equipped with a straw chopper). All of this makes the requirement for stubble handling hard to represent in a steady state model. Hence the probability-based approach adopted in this Table. This probability is calculated by dividing the average yield for that LMU by the critical grain yield. This means the likelihood of stubble handling being req’d increases for higher yielding soil types etc, which is logical. However, the probability isn’t accurately linked to the likelihood that stubble will actually require handling. For instance, just because the average steady-state wht yield of a LMU is 1.75t/ha doesn’t necessarily mean that the wheat stubble on that LMU will need handling 1.75/3.5 = 50% of the time. This structure assumes that even if the preceding landuse is pasture, the current phase will still get handling costs. This is because the rotation phases use sets so you can’t determine exactly which land use is before or after the current phase.

Note

An improvement could be to include harvest index in the calculation of handling probability. Also, with seasonal variation represented the probability is not required.

Note

arable area accounted for in the yield (it is the same as accounting for it at the end ie yield x 0.8 / threshold x cost == yield / threshold x cost x 0.8)

AfoLogic.Phase.f_rot_biomass(for_stub=False, for_insurance=False)

Calculates the biomass for each rotation. Accounting for LMU, arable area and frost.

The crop yield for each rotation phase, on the base LMU [3], before frost and harvested proportion adjustment (spilt/split grain), is entered as an input. The yield is inputted assuming seeding was completed at the optimal time. The base yield inputs are read in from either the simulation output or from Property.xl depending on what the user has specified to do. The yield input is dependent on the rotation history and hence accounts for the level of soil fertility, weed burden, disease prominence, and how the current land use is affected by the existing levels of each in the rotation. Biomass is calculated as a function of yield and harvest index. Yield is the input rather than biomass because that is easier to relate to and thus determine inputs. However, it is converted to biomass so that the optimisation has the option to tactically deviate from the overall strategy. For example, the model may select a barley phase at the beginning of the year with the expectation of harvesting it for saleable grain. However, based on spring conditions the model may choose to either cut the crop for hay or use it as standing fodder. To allow these tactics to be represented requires a common starting point which has been defined as phase biomass. Biomass can either be harvested for grain, cut for hay or grazed as standing fodder. The biomass is estimated at harvest time and is adjusted downwards for ‘baling’ because a crop is baled prior to harvest. Grazing of standing fodder is assumed to occur at or after harvest.

To extrapolate the inputs from the base LMU to the other LMUs an LMU adjustment factor is applied which determines the yield on each other LMU as a proportion of the base LMU. The LMU adjustment factor accounts for the variation in yield on different LMUs when management is the same.

The decision variable represented in the model is the biomass per hectare on a given LMU at harvest. To account for the fact that LMUs are rarely 100% arable due to patches of rocks, gully’s, waterlogged area and uncleared trees the yield is adjusted by the arable proportion. (e.g. if wheat yields 4 t/ha on LMU5 and LMU5 is 80% arable then 1 unit of the decision variable will yield 3.2t of wheat).

Frost does not impact total biomass however it does impact yield and stubble. Thus, frost is counted for in biomass2product and biomass2residue functions. See those functions for more documentation on frost.

Furthermore, as detailed in the machinery chapter, sowing timeliness can also impact yield. Dry sowing tends [4] to incur a yield reduction due to forgoing an initial knockdown spray. While later sowing incurs a yield loss due to a reduced growing season.

Parameters:

for_stub – Boolean set to true when calculating the yield that is used to calculate total stubble production.

Returns:

Dataframe of rotation yields - passed to pyomo and used to calc grain insurance & stubble handling cost

AfoLogic.Phase.f_seedcost(r_vals)

Seed costs includes:

  • seed treatment

  • raw seed cost (this assumes that farmers purchase seed rather than using seed from last years harvest)

  • crop insurance

  • arable area

AfoLogic.Phase.f_sow_prov()

Creates provide param for wet and dry sowing activities:

  • Area of wet seeding provided by 1ha of the wet seeding activity.

  • Area of dry seeding provided by 1ha of the dry seeding activity.

This accounts for period and crop e.g. wet seeding activity only provides sowing to crop after the break.

This also stop seeding (dry and wet) in a false break between the identification and the real break. This is because the soil is a “little bit wet”. So in the areas that are wet enough the seed will germinate and in other areas it won’t. So this will lead to a patchy crop establishment and make crop management difficult later in the season due to the variation in crop stages. This only effects crop because pasture seeding timing is an input with a z axis so it can be altered there if desired.