Activity 12A : « Wheat/maize » model – i. Adding periods ii. Displaying results

Length : around 25 minutes

The model now takes into account the seasonal nature of labour needs. There are two periods, summer and winter.

i. Adding periods

Run the techn2.gms model (written in activity 11B or downloadable from the Model Library) and save it under the name travail1.gms. Modify it and add the periods.

 « A given farm can grow three types of crop, wheat, maize and tomato, and use two different crop practices, extensive and intensive. The area to be cultivated and technology to be used must be determined, knowing that :

The objective of the farmer is to maximize his income.
Water needs are as follows :

Water needs (thousands of m3)
Technology extensive intensive
Wheat 0 2
Maize 4 6
Tomato 3 5

 Labour needs are as follows :

Labour needs (h/ha)
Technology  Period
Winter Summer
Wheat extensive 10 5
intensive 15 10
Maize extensive 10 35
Intensive 10 40
Tomato extensive 10 70
Intensive 10 90

Yields and costs are as follows :

Yield (ton/ha) Cost (€/ha)
Technology extensive intensive extensive Intensive
Wheat 4.5 5.0 250 300
Maize 8.0 10.0 400 500
Tomato 13.0 16.0 1200 1350

 The selling price of wheat is 150€/ton, that of maize is 150€/ton, and that of tomato 185€/ton.

The farm area is 50 ha, and the farmer can work 1000 hours in summer and 1000 hours in winter, and has 150 thousand m3 for irrigation. »

 

Answer the following questions :

  • What effects does adding periods to the constraints and variables have ?
  • The new cropping pattern approach is different, why ?

Then check the solution : 

solution

ii. Displaying results

All results will be displayed in a table (the shaded areas are those where the results appear) :

The incomplete lines of code below (you need to change the %) which make it possible to create this table may help you. Warning : if you copy-paste, the inverted commas must be replaced in order for GAMS to accept them.

Parameter RESULT(*,*);
RESULT(c,t) = X.L(c,t);
RESULT(‘Terre’, ‘Marginal’)=%%%%%%;
RESULT(‘Travail_Hiver’, ‘Total’) = TRAVAIL.L(‘hiver’);
RESULT(‘Travail_Hiver’, ‘Marginal’)= TRAVAIL.M(‘hiver’);
RESULT(‘Travail_Ete’, ‘Total’) = %%%%%;
RESULT(‘Travail_Ete’, ‘Marginal’)= %%%%%;
RESULT(‘Eau’, ‘Total’) = EAU.L;
%%%%%%= EAU.M;
RESULT(c,’TOTAL’) = %%%%%%%;
%%%%%%% = Z.L ;
Display RESULT ;

Then check the solution : solution