{"id":2066,"date":"2016-12-06T14:36:08","date_gmt":"2016-12-06T13:36:08","guid":{"rendered":"http:\/\/www.supagro.fr\/wordpress\/modeleco\/?page_id=2066"},"modified":"2019-06-27T14:20:14","modified_gmt":"2019-06-27T12:20:14","slug":"l19-introduire-le-risque","status":"publish","type":"page","link":"https:\/\/www.supagro.fr\/wordpress\/modelecoen\/auto-formation\/sequence3\/cours-1-lagriculture-une-activite-risquee\/l19-introduire-le-risque\/","title":{"rendered":"Lesson 21 : Agriculture, a risky activity"},"content":{"rendered":"<p><em>This lesson is divided into two parts : the information needed to model risk and how to write in GAMS. Watch the first video and try to write the model in question ON YOUR OWN before you watch the second one.<\/em><\/p>\n<table>\n<colgroup>\n<col span=\"1\" width=\"80\" \/> <\/colgroup>\n<tbody>\n<tr>\n<td style=\"text-align: center\" colspan=\"2\"><strong>1) Video 1 : Theory<\/strong><\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\" width=\"120\">\n<h6><\/h6>\n<h6><strong><em>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/em><\/strong> <a href=\"http:\/\/www.supagro.fr\/ModelEco\/en\/video\/L21_video1.mp4\"><img loading=\"lazy\" decoding=\"async\" class=\"\" src=\"http:\/\/www.supagro.fr\/wordpress\/modeleco\/files\/2016\/05\/video.png\" alt=\"video\" width=\"59\" height=\"67\" \/><\/a><em><span style=\"font-size: 80%\">(15 min)<\/span><\/em><\/h6>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\" colspan=\"2\"><strong>2) Example : Income variability<\/strong><\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\" width=\"120\">\n<ul>\n<li>open GAMS<\/li>\n<li>open the model <a href=\"http:\/\/www.supagro.fr\/ModelEco\/en\/modeles\/modelEco_primal0_risk_base.zip\">primal0_risk_base.gms<\/a><\/li>\n<li>Add the equations of random income calculation and check the random income values in the output file<\/li>\n<\/ul>\n<table width=\"378\">\n<tbody>\n<tr>\n<td width=\"114\">State of nature<\/td>\n<td width=\"118\">Probability<\/td>\n<td width=\"72\">Gross margin of wheat<\/td>\n<td width=\"75\">Gross margin of maize<\/td>\n<\/tr>\n<tr>\n<td width=\"114\">E1<\/td>\n<td width=\"118\">0.2<\/td>\n<td width=\"72\">460<\/td>\n<td width=\"75\">2000<\/td>\n<\/tr>\n<tr>\n<td width=\"114\">E2<\/td>\n<td width=\"118\">0.2<\/td>\n<td width=\"72\">440<\/td>\n<td width=\"75\">500<\/td>\n<\/tr>\n<tr>\n<td width=\"114\">E3<\/td>\n<td width=\"118\">0.2<\/td>\n<td width=\"72\">450<\/td>\n<td width=\"75\">300<\/td>\n<\/tr>\n<tr>\n<td width=\"114\">E4<\/td>\n<td width=\"118\">0.2<\/td>\n<td width=\"72\">430<\/td>\n<td width=\"75\">1400<\/td>\n<\/tr>\n<tr>\n<td width=\"114\">E5<\/td>\n<td width=\"118\">0.2<\/td>\n<td width=\"72\">470<\/td>\n<td width=\"75\">800<\/td>\n<\/tr>\n<tr>\n<td width=\"114\"><strong>AVERAGE<\/strong><\/td>\n<td width=\"118\"><\/td>\n<td width=\"72\"><strong>450<\/strong><\/td>\n<td width=\"75\"><strong>1000<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The model is therefore written as follows :<br \/>\n<span style=\"font-family: Courier New\"><br \/>\nMax Z = 450\u00d71+1000\u00d72<br \/>\navec\u00a0 x1+x2 \u2264 50<br \/>\n25\u00d71+50\u00d72 \u2264 2000<br \/>\n460\u00d71+2000\u00d72 = RAL1<br \/>\n440\u00d71+500\u00d72 = RAL2<br \/>\n450\u00d71+300\u00d72 = RAL3<br \/>\n430\u00d71+1400\u00d72 = RAL4<br \/>\n470\u00d71+800\u00d72 = RAL5 \u00a0 \u00a0\u00a0 x1,x2 \u2265 0<br \/>\n<\/span><br \/>\nAdd 5 calculation constraints such as :<br \/>\n<span style=\"font-family: Courier New\"><br \/>\nequations<br \/>\nrevenuAlea1;<br \/>\nrevenuAlea1.. RAL1=e=sum(C, MB(\u2018E1\u2019,C)*X(C)] ;<br \/>\n<\/span><br \/>\nOr ass a <u>constraint that is dependent on set E<\/u> (like in lesson 12 concerning periods)<br \/>\n<span style=\"font-family: Courier New\"><br \/>\nequations<br \/>\nrevenuAlea(E);<br \/>\nrevenuAlea(E).. RAL(E)=e=sum(C, MB(E,C)*X(C)];<br \/>\n<\/span><br \/>\nIt is now your turn to write in GAMS !<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\" colspan=\"2\"><strong>3) Correction-lesson<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\">\n<h6><a href=\"http:\/\/www.supagro.fr\/ModelEco\/en\/video\/L21_video2.mp4\"><img loading=\"lazy\" decoding=\"async\" class=\"\" src=\"http:\/\/www.supagro.fr\/wordpress\/modeleco\/files\/2016\/05\/video.png\" alt=\"video\" width=\"59\" height=\"67\" \/><\/a><em><span style=\"font-size: 80%\">(6 min)<\/span><br \/>\n<a href=\"http:\/\/www.supagro.fr\/ModelEco\/S3\/C1\/L19_Introduire_le_risque.pdf\" rel=\"attachment wp-att-940\"><br \/>\n<\/a><a href=\"http:\/\/www.supagro.fr\/ModelEco\/en\/modeles\/modelEco_primal0_risk.zip\">Random income calculation model &#8211; primal0_risk.gms<\/a><br \/>\n<\/em><\/h6>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><a href=\"http:\/\/www.supagro.fr\/wordpress\/modelecoen\/auto-formation\/sequence3\/cours-1-lagriculture-une-activite-risquee\/\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-4121 alignright\" src=\"http:\/\/www.supagro.fr\/wordpress\/modelecoen\/files\/2018\/11\/backUnit.png\" alt=\"\" width=\"211\" height=\"66\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This lesson is divided into two parts : the information needed to model risk and how to write in GAMS. Watch the first video and try to write the model in question ON YOUR OWN before you watch the second <a class=\"more-link\" href=\"https:\/\/www.supagro.fr\/wordpress\/modelecoen\/auto-formation\/sequence3\/cours-1-lagriculture-une-activite-risquee\/l19-introduire-le-risque\/\">Continue reading <span class=\"screen-reader-text\">  Lesson 21 : Agriculture, a risky activity<\/span><span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":92,"featured_media":0,"parent":705,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-2066","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.supagro.fr\/wordpress\/modelecoen\/wp-json\/wp\/v2\/pages\/2066","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.supagro.fr\/wordpress\/modelecoen\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.supagro.fr\/wordpress\/modelecoen\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.supagro.fr\/wordpress\/modelecoen\/wp-json\/wp\/v2\/users\/92"}],"replies":[{"embeddable":true,"href":"https:\/\/www.supagro.fr\/wordpress\/modelecoen\/wp-json\/wp\/v2\/comments?post=2066"}],"version-history":[{"count":26,"href":"https:\/\/www.supagro.fr\/wordpress\/modelecoen\/wp-json\/wp\/v2\/pages\/2066\/revisions"}],"predecessor-version":[{"id":4615,"href":"https:\/\/www.supagro.fr\/wordpress\/modelecoen\/wp-json\/wp\/v2\/pages\/2066\/revisions\/4615"}],"up":[{"embeddable":true,"href":"https:\/\/www.supagro.fr\/wordpress\/modelecoen\/wp-json\/wp\/v2\/pages\/705"}],"wp:attachment":[{"href":"https:\/\/www.supagro.fr\/wordpress\/modelecoen\/wp-json\/wp\/v2\/media?parent=2066"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}