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(r_vals=None)

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]. However, the impact of frost varies based on sowing date. Thus, frost is accounted for in the seeding penalty in Mach.py.

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_deepflow(r_vals)

Tallies the water that is not used by plants and leaks through the soil to the groundwater. This depends on landuse, soil type and rainfall.

Future improvement would be to adjust the input by weather year.

AfoLogic.Phase.f_farmgate_grain_price(k_type, 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={}, option=1)

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

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 rate for non-arable areas are calculated as a scalar of the arable area. The standard assumption is that fertiliser is only applied to non-arable area in pasture phases It is not applied to the non-arable area in the crop phase because the non-arable pasture in a crop phase is only grazed at the end of the year when the pasture is rank and therefore fertiliser is not cost-effective.

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 costs are 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.

Parameters:

option – option changes when the function returns. Option 2 is used for calculating fert rate for application cost and emission calculations.

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_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, r_vals=None)

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

The crop yield for each rotation phase, on the base LMU [3], at the optimal time of seeding and before 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.

Dry sown land uses can have a lower yield input to represent the risks associated with dry sowing such as less effective weed control (i.e. crops germinate at the same time as the weeds so you miss out on a knock down spray opportunity), poor crop emergence (if opening rains are spasmodic patchy crop germination is possible and early crop vigour may be absent without adequate follow up rain) [MFMC]. Dry sowing may not incur a yield penalty in seasons with a late break or if more/better herbicide is applied.

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).

Furthermore, as detailed in the machinery chapter, sowing timeliness can also impact yield. For example, sowing to early may incur a yield reduction due to increased frost or 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.

AfoLogic.Phase.f_spraying_spreading_dep(r_vals)

Average variable dep for seeding $/ha.

Variable depreciation is use depreciation and is dependent on the number of hours the equipment is used.