2.3._calibration_of_the_supply_module
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
2.3._calibration_of_the_supply_module [2022/09/19 14:42] – [Downloads] gocht | 2.3._calibration_of_the_supply_module [2023/09/20 10:47] (current) – [Downloads] stepanyan | ||
---|---|---|---|
Line 8: | Line 8: | ||
===== Downloads ===== | ===== Downloads ===== | ||
- | Download presentation: | ||
- | Download Excel exercise: | ||
Download Excel exercise solution {{ :: | Download Excel exercise solution {{ :: | ||
- | Download GAMS exercise: | + | |
===== Lecture ===== | ===== Lecture ===== | ||
Line 20: | Line 18: | ||
[[https:// | [[https:// | ||
[[https:// | [[https:// | ||
- | [[https://academic.oup.com/ajae/ | + | [[https://doi.org/10.2307/1243543|Howitt]] |
- | + | ||
- | + | ||
- | <code lang=gams> | + | |
- | + | ||
- | *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 €/ | + | |
- | Required labor hours/ | + | |
- | + | ||
- | + | ||
- | *XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX* | + | |
- | $offtext | + | |
- | + | ||
- | + | ||
- | sets | + | |
- | crops / | + | |
- | wheat | + | |
- | barley | + | |
- | rapeseed | + | |
- | sugarbeet | + | |
- | / | + | |
- | ; | + | |
- | + | ||
- | Parameters | + | |
- | | + | |
- | | + | |
- | ; | + | |
- | + | ||
- | gm(" | + | |
- | gm(" | + | |
- | gm(" | + | |
- | gm(" | + | |
- | + | ||
- | lab(" | + | |
- | lab(" | + | |
- | lab(" | + | |
- | lab(" | + | |
- | + | ||
- | + | ||
- | Variables | + | |
- | Z objective function value | + | |
- | ; | + | |
- | + | ||
- | Positive variable | + | |
- | X(crops) | + | |
- | ; | + | |
- | + | ||
- | + | ||
- | 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)