### Model Algorithm Development

CropOptimiser employs a LP model to optimise cropping strategy. In general, these models involve the optimization of a linear objective function subject to a series of linear constraints. They provide a means to maximize profit given a list of requirements presented as linear constraints. Mathematically, in canonical form, they can be expressed as:

where, Eqn. 1 is the objective function and Eqn. 2 is the matrix of system constraints. In these equations, *X* represents the vector of variables to be determined (in this case, crop-areas), *C *is a vector of objective function coefficients (crop profit factors), *A* is a matrix of constraint coefficients (water user or land use coefficients), and *B* is a vector of constraint limits (land use or water use limits).

The formulation of the LP model for the Lombok scenario can be split into three components: formulating the objective function (maximization of profit); defining the fixed (physical) constraints; and defining the user-defined (social) constraints.

#### Objective Function

The objective of this LP model is to maximize the annual (cropping year) fiscal profit, or annual gross margin, across an irrigated (or rainfed) agricultural system. The annual gross margin is defined as the gross income of the crops minus the cost of production over different seasons, subject to a range of physical (land-area and water-availability) and social constraints. The objective function depends upon the irrigation system being broken up into a series of irrigation command areas, or "sub-areas", for which data on crop water supply is available and optimal crop type and proportions will be determined. Annual cropping cycles must be predefined through designated cropping "seasons", along with the types of crops that can be planted in each season. Climate information is captured through separate optimisations. Therefore, for a predefined climate condition (such as El Niño, or La Niña), the objective function can be defined mathematically as:

where, for any crop *k*, at sub-area *j* and season *i;* *X _{ijk} *represents the planted-area in hectares;

*Yield*is the potential yield in t/ha;

_{ijk}*Price*is the unit-price of marketable yield per hectare; and

_{ijk}*Costs*are the total costs per hectare of agricultural production for that crop.

_{ijk}

One limitation of this function is that it assumes a fixed unit-price for crops regardless of the quantity produced. In reality, the unit-price of each crop will reduce non-linearly with increase in regional crop yield. This would make the objective-function non-linear requiring a much more complex non-linear solution process. However, in all practicality, it can be assumed that the unit-price of crops remains constant over the range of system constraints defined by the user. This means that the user has direct control of the constraints to ensure that this assumption is not violated.

*Yield _{ijk}* is calculated simply by:

where, *PotentialYield _{i}* is the maximum achievable yield for a crop in t/ha; and

*ProductivityIndex*is a penalty coefficient combining a range of soil, seasonal and crop variety factors.

_{ijk}This yield function is limiting in practice, since crops can still be grown when water supplies are scarce, with an associated reduction in yield. Therefore a modified yield function can be included (through the user-defined constraints) based on the methodology of Dorenboos and Kassam (1979), and FAO (1982). The modified yield function is defined as:

where, *Ky _{i}* is a production coefficient with typical values ranging form 0.7 to 1.3; and

*WS*

_{ijk}_{ }represents the water supplied to the crop

*k*; and

*WD*is the water required by the crop. A limitation of using this function is that the optimized parameters may not reflect the true optimum conditions since the

_{ijk}*WS*component is fixed at the start of the optimization with no adjustment during iterations.

_{ijk}/WD_{ijk}