Software Tool For Crop Planning Under Risk Computer Science Essay


This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

In the paper is presented a software tool for crop planning under risk. The software tool is based on a mathematical model for crop planning. The model is a minimum financial risk model, based on portfolio theory. It takes into account climate risk and market risk. The decision variable describes the land allocation to crops. The model was solved with the MINLP solver from GAMS. The software tool has an interface that facilitates the construction of the input data collection and the user parameters. It gives a flexible way of working and is mainly user oriented. Numerical results obtained with this software tool are analyzed.

Key-Words: - decision support, software tool, mathematical model, crop planning, risk, portfolio theory

Computer-based decision support systems (DSSs) have a well-established tradition within agriculture. The DSS range from simple accounting-based systems to systems based on detailed deterministic or stochastic models.

Romanian agriculture, which was for a long time considered a traditional, slow moving economic activity strongly dependent on subsidies and public support, is now a sector affected by many political changes and social pressures derived from environmental concerns and trade liberalizations requirements. Furthermore, the sector dynamic has dramatically speeded due to technological innovations, rising world demand for food and raw materials and new uses of traditional crops as energy sources.

One of the most important decisions faced by farmers is the selection of crops they want to grow. Prospective growers must know how to use risk management strategies in order to select the crops that best suit their needs. One of the most popular approaches to managing risk is to reduce risk exposure through diversification. The uncertainty from the agriculture problems is modeled with the help of probability theory. Many of the practical problems that occur in agriculture are stochastic programming problems with multiple objectives. In practice, in the process of mathematical modeling, one cannot take into account all the factors that have an impact to agricultural production. The number of such factors is large and the growth of their number determines the rapid growth of the complexity of the models. An important mathematical instrument which was successfully applied to modeling the problems from agriculture was portfolio theory. The above mentioned theory was developed as a result of the research in the domain of financial management. The application of portfolio theory for finding an optimal allocation of agricultural land is popular in the literature. The first application of the portfolio theory to crop planning goes back to Freund [5]. In Hardaker [6], Hazell and Norton [7], [8] and Blank [1]-[3] were presented or applied various variants of portfolio theory to the land allocation decisions. In Collender [4], Romero [10]-[12], were studied several models for resources allocation in agriculture that are taking into account specific risks. For other references regarding applications of portfolio theory to agriculture see Radulescu [9].

Our research has focused on the formulation of an original model for crop planning, based on portfolio theory and the design of a software tool based on this model. The paper is organized as it follows. First a crop planning model is proposed. The model is a minimum financial risk model. The model considers several classes of land quality, historical data of land productivity and crop market prices. The farmer intends to obtain optimal production plans that minimize the financial risk. A software tool based on this model is described. The model was solved with the MINLP solver from GAMS. The software application has an interface that facilitates the construction of the input data collection and the user parameters. It gives a flexible way of working and is mainly user oriented. A practical example is given before presenting the paper conclusions.

A minimum financial risk model

In the following is formulated a 0-1 integer programming model for crop planning in agriculture. The model takes into account weather risks and market risks. Input data include historical land productivities data for various crops and soil types.

Consider a farm which has an agricultural land divided into several plots . We consider that if a plot is cultivated then it is cultivated with the same crop. Also we consider that the soil quality of a plot is homogeneous.

Denote by the area of the plot , j=1, 2,..., m. We consider that the farmer have to choose a crop plan from n crops , that is to make an allocation of crops to plots.

Consider the probability space . Denote ,. For every , we define the random variables and . are called the plot productivity functions and are called the market price functions. is the quantity of crop that can be produced on an area of one hectare of plot and is the market price for a quantity of one kg of crop . For every , , denote by:

- aij the cost for cultivating one ha of the plot with crop

- - the plot productivity coefficient, that is the quantity of crop obtained from an area of one hectare of plot .

- - the decision variable that takes the value 1 if the crop is cultivated on plot and takes value zero if the crop is not cultivated on the plot .

- the range for the sum of money available for investment

- the lower bound for the yield of crop necessary to be obtained (contractual levels)

The yield of crop is equal to , . The cultivation cost when the land allocation of crops to plots is applied is equal to . The constraints, show that every plot is cultivated with at most one crop. The return (respectively the expected return) obtained when the decision matrix x is used is equal to (respectively)

Then the variance of the return is equal to . The variance of the return has the meaning of financial risk.

In the frame of this problem the farmer tries to find an optimal allocation of crops to plots that minimize the financial risk taking into account that the expected return is greater than a given level W.

An important problem in the decision process of the choice of a crop allocation to plots is the existence of some indicators that will guide the farmer in the selection of the parameters of the problem: and W. These indicators can be computed by solving several binary programming problems.

Denote by (respectively by ) the optimal value of the following two binary programming problems:


The farmer has to choose the parameters in the range . After that the farmer has to determine the range from where he has to choose the parameter W . Denote by (respectively by ) the optimal value of the following binary programming problems:

The farmer has to choose the parameter W in the interval .

A software tool for crop planning under risk

Based on the crop planning model presented above, a software application was developed. Its name is MINRISK. The crop planning model in the software application MINRISK was solved with the solver MINLP from GAMS. The software application MINRISK is composed from the following modules: "User Interface", "Input data", "Model resolution", and "Sensitivity analysis".

The input data collection is built and validated in the module "Input data" following a set of rules.

The module "model resolution" facilitates the model building, transition of the model to the GAMS solver MINLP, solves the model and returns the results back. In order to make the validation of the user parameters the module solves several mathematical programming problems. As a result, ranges of variation for the user parameters are determined. For example, for the determination of the range of variation of the user parameter W, the module solves two linear programming problems.

The results are visualized and saved according to the user demand. The module "sensitivity analysis" allows by the variation of the user parameter W, the computation of the efficient frontier of the crop planning model. The module "User interface" gives a flexible way of working, user oriented.

The software application was realized in Visual Basic Net. The system architecture is presented in figure 1.

The input data for the model are:

The set of crops

The set of available plots for cultivation

The period that is taken into account

Historical data on market prices for crops

Historical data on crop productivities on plots

Cultivation cost (euro per ha) for each crop and plot

The areas of plots

Minimum quantities (quotas) for each crop

The user parameters are:

Minimum and the maximum value for the amount invested by the farmer (parameters )

Minimum profit that farmer wants to obtain (parameter W)

The decision variable is the allocation matrix whose entries are 0 and 1.

The output variables are:

Optimal allocation of crops to plots

The quantities of each crop in the case the allocation is optimal

The minimum value of the financial risk

User interface


Input data set

Model resolution

Sensitivity analysis

Values of the parameters selection

Computation of the ranges for the parameters

Model generation

Data base

Model Solver (GAMS)

Variation of the parameter W within the range


Input data

Computation of the range for parameter W

Model generation (depending on the value of the parameter W ).

Model solver (GAMS) (depending on the value of the

parameter W)


Figure 1. The system architecture of the software application

The return obtained as the result of application of the optimal allocation of crops

The sum invested for the optimum crop plan.

The constraints in the model are:

The average quantities from each crop are greater than the minimal quotas

The sum available for investment is in the range specified by the farmer

On each plot is cultivated at most one crop

The expected return is greater or equal than the user parameter W

Numerical example

We consider six crops and eight plots of cultivated land. The crops are C1= wheat, C2= rye, C3= barley, C4= oats, C5= maize, C6= sunflower.

The areas of the plots are =10 ha, =12 ha, =7 ha, =11 ha,=14 ha, =16 ha,=9 ha and =12 ha. The years for historical data are 2001 - 2007. Quantities (quotas) minimum for each crop are Q1 = 10000 kg wheat, Q2 = 12000 kg rye, Q3 = 12000 kg barley, Q4 = 10000 kg oats, Q5 = 20000 kg maize and Q6 = 10000 kg sunflower.

The data are from a agricultural farm in the South Muntenia Region of Romania.

The choice of user parameters is presented in figure 2. In the first box of the first row is displayed while in the second box is displayed . In the first box of the second row is displayed while in the second box is displayed. Note that and are computed while and are chosen by the farmer.




Figure 2. The choice of user parameters , and W

The optimal solution, allocation of crops on plots, is presented in figure 3 in two formats. In the first format the optimal solution is presented in a matrix of crops / plots. In the second format the optimal solution is presented in a vector. In figure 3 is also displayed the minimun value of the risk.

Figure 3. The optimal solution - allocation of crops on plots

The efficient frontier of the minimum financial risk problem is displayed in Figure 4. The efficient frontier is the graph of the map that associates to values of W the optimal value of the objective map of the minimum financial risk problem.

Figure 4. The efficient frontier of the minimum financial risk problem

The numerical results are obtained with the software tool MINRISK.


Our research has been focusing on the formulation of a minimum risk model for crop planning, based on portfolio theory and the design of a software tool based on this model. In order to facilitate the integration of the software tool in a decision support system the range of variation for the parameters of the model were computed. The model was solved with the MINLP solver from GAMS. A numerical result is analyzed and several captures of the screens from the software tool are displayed.


This work was supported by the National Center for Program Management under PN II Proiect 1762 "Improving the management of production structures Muntenia Sud to increase farm competitiveness" Financing Agreement 52126/2008 and by the CEEX, National Research and Development Program of the Ministry of Education and Research, contract 28/2005.

Writing Services

Essay Writing

Find out how the very best essay writing service can help you accomplish more and achieve higher marks today.

Assignment Writing Service

From complicated assignments to tricky tasks, our experts can tackle virtually any question thrown at them.

Dissertation Writing Service

A dissertation (also known as a thesis or research project) is probably the most important piece of work for any student! From full dissertations to individual chapters, we’re on hand to support you.

Coursework Writing Service

Our expert qualified writers can help you get your coursework right first time, every time.

Dissertation Proposal Service

The first step to completing a dissertation is to create a proposal that talks about what you wish to do. Our experts can design suitable methodologies - perfect to help you get started with a dissertation.

Report Writing

Reports for any audience. Perfectly structured, professionally written, and tailored to suit your exact requirements.

Essay Skeleton Answer Service

If you’re just looking for some help to get started on an essay, our outline service provides you with a perfect essay plan.

Marking & Proofreading Service

Not sure if your work is hitting the mark? Struggling to get feedback from your lecturer? Our premium marking service was created just for you - get the feedback you deserve now.

Exam Revision

Exams can be one of the most stressful experiences you’ll ever have! Revision is key, and we’re here to help. With custom created revision notes and exam answers, you’ll never feel underprepared again.