User Tools

Site Tools


2.3._calibration_of_the_supply_module

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
2.3._calibration_of_the_supply_module [2022/09/19 15:42] – [Additional Reading] stepanyan2.3._calibration_of_the_supply_module [2023/09/20 10:47] (current) – [Downloads] stepanyan
Line 8: Line 8:
  
 ===== Downloads ===== ===== Downloads =====
-Download presentation:  {{ ::pmp_t.pptx |}}\\ 
-Download Excel exercise:  {{ ::pmp.xlsx |}}   \\ 
 Download Excel exercise solution {{ ::pmp_solution.xlsx |}}  \\ Download Excel exercise solution {{ ::pmp_solution.xlsx |}}  \\
-Download GAMS  exercise:  \\+
  
 ===== Lecture ===== ===== Lecture =====
Line 23: Line 21:
  
  
-<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 €/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; 
-                                        
- 
-</code> 
2.3._calibration_of_the_supply_module.1663602133.txt · Last modified: 2022/11/07 10:23 (external edit)