2.3._calibration_of_the_supply_module
This is an old revision of the document!
Calibration of the Supply Model
Presenter: Davit Stepanyan
- Positive Mathematical Programing
- Hands-on exercise in Excel
- Hands-on exercise in GAMS
Downloads
Download presentation: pmp_t.pptx
Download Excel exercise: pmp.xlsx
Download Excel exercise solution pmp_solution.xlsx
Download GAMS exercise:
Lecture
Additional Reading
*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX*
$ontext
* Exercise (3): MY FARM Model with sets and sum
*### The objective of the exercise:
1) Getting acquainted with the GAMS programming language.
*### The problem:
A farmer wants to maximize his profit using 200 ha of land and 10000 hours of
labor available. He has the option of cultivating three types of crops: wheat,
barley, rapeseed and sugarbeet. The profit received and labor hours required for producing one
ha of each crop are presented in the table below. How much of each crop does he
need to cultivate in order to maximize his profit?
Item Wheat Barley Rapeseed Sugarbeet
Profit in €/ha 253 443 284 516
Required labor hours/ha 25 36 27 87
*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX*
$offtext
sets
crops /
wheat
barley
rapeseed
sugarbeet
/
;
Parameters
gm(crops) gross margin
lab(crops) labour quantity
;
gm("wheat") = 253;
gm("barley") = 443;
gm("rapeseed") = 284;
gm("sugarbeet") = 516;
lab("wheat") = 25;
lab("barley") = 36;
lab("rapeseed") = 27;
lab("sugarbeet") = 87;
Variables
Z objective function value
;
Positive variable
X(crops) land area planted with crop
;
Equations
land land constraint
labour labour constraint
obj objective function
;
obj .. Z =E= sum (crops, X(crops)*gm(crops));
land .. sum (crops, X(crops)) =L= 200;
labour .. sum (crops, lab(crops)*X(crops)) =L= 10000;
Model myfarm /all/;
Solve myfarm using lp maximizing Z;
2.3._calibration_of_the_supply_module.1663598556.txt · Last modified: 2022/11/07 10:23 (external edit)