{"id":1614,"date":"2016-11-09T11:17:28","date_gmt":"2016-11-09T10:17:28","guid":{"rendered":"http:\/\/www.supagro.fr\/wordpress\/modeleco\/?page_id=1614"},"modified":"2019-06-28T14:24:20","modified_gmt":"2019-06-28T12:24:20","slug":"activite-12a-ecrire-un-modele-avec-periodes-et-afficher-les-resultats","status":"publish","type":"page","link":"https:\/\/www.supagro.fr\/wordpress\/modelecoen\/auto-formation\/sequence2\/cours1-enrichir-le-modele-de-base\/lecon-12-contrainte-par-periode\/activite-12a-ecrire-un-modele-avec-periodes-et-afficher-les-resultats\/","title":{"rendered":"Activity 12A : \u00ab Wheat\/maize \u00bb model \u2013 i. Adding periods ii. Displaying results"},"content":{"rendered":"<h4 style=\"text-align: right\"><u>Length : around 25 minutes<\/u><\/h4>\n<p><strong>The model now takes into account the seasonal nature of labour needs. There are two periods, summer and winter.<\/strong><\/p>\n<p><strong>i. Adding periods <img loading=\"lazy\" decoding=\"async\" class=\"\" src=\"http:\/\/www.supagro.fr\/wordpress\/modeleco\/files\/2017\/11\/N1-1.png\" alt=\"\" width=\"25\" height=\"24\" \/><\/strong><\/p>\n<p><strong>Run the\u00a0<a href=\"https:\/\/www.supagro.fr\/ModelEco\/en\/modeles\/modelEco_techn2.zip\">techn2.gms<\/a>\u00a0model (written in activity 11B or downloadable from the Model Library) and save it under the name travail1.gms. Modify it and add the periods.<\/strong><\/p>\n<p><em>\u00a0\u00ab\u00a0A 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 :<\/em><\/p>\n<p><em>The objective of the farmer is to maximize his income.<br \/>\n<\/em><em>Water needs are as follows :<\/em><\/p>\n<table width=\"305\">\n<tbody>\n<tr>\n<td width=\"115\"><\/td>\n<td colspan=\"2\" width=\"191\">Water needs (thousands of m3)<\/td>\n<\/tr>\n<tr>\n<td width=\"115\">Technology<\/td>\n<td width=\"93\">extensive<\/td>\n<td width=\"98\">intensive<\/td>\n<\/tr>\n<tr>\n<td width=\"115\">Wheat<\/td>\n<td width=\"93\">0<\/td>\n<td width=\"98\">2<\/td>\n<\/tr>\n<tr>\n<td width=\"115\">Maize<\/td>\n<td width=\"93\">4<\/td>\n<td width=\"98\">6<\/td>\n<\/tr>\n<tr>\n<td width=\"115\">Tomato<\/td>\n<td width=\"93\">3<\/td>\n<td width=\"98\">5<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><em>\u00a0<\/em><em>Labour needs are as follows<strong>\u00a0:<\/strong><\/em><\/p>\n<table width=\"468\">\n<tbody>\n<tr>\n<td width=\"97\"><\/td>\n<td colspan=\"3\" width=\"371\">Labour needs (h\/ha)<\/td>\n<\/tr>\n<tr>\n<td width=\"97\"><\/td>\n<td width=\"179\">Technology<\/td>\n<td colspan=\"2\" width=\"192\">\u00a0Period<\/td>\n<\/tr>\n<tr>\n<td width=\"97\"><\/td>\n<td width=\"179\"><\/td>\n<td width=\"94\">Winter<\/td>\n<td width=\"98\">Summer<\/td>\n<\/tr>\n<tr>\n<td width=\"97\">Wheat<\/td>\n<td width=\"179\">extensive<\/td>\n<td width=\"94\">10<\/td>\n<td width=\"98\">5<\/td>\n<\/tr>\n<tr>\n<td width=\"97\"><\/td>\n<td width=\"179\">intensive<\/td>\n<td width=\"94\">15<\/td>\n<td width=\"98\">10<\/td>\n<\/tr>\n<tr>\n<td width=\"97\">Maize<\/td>\n<td width=\"179\">extensive<\/td>\n<td width=\"94\">10<\/td>\n<td width=\"98\">35<\/td>\n<\/tr>\n<tr>\n<td width=\"97\"><\/td>\n<td width=\"179\">Intensive<\/td>\n<td width=\"94\">10<\/td>\n<td width=\"98\">40<\/td>\n<\/tr>\n<tr>\n<td width=\"97\">Tomato<\/td>\n<td width=\"179\">extensive<\/td>\n<td width=\"94\">10<\/td>\n<td width=\"98\">70<\/td>\n<\/tr>\n<tr>\n<td width=\"97\"><\/td>\n<td width=\"179\">Intensive<\/td>\n<td width=\"94\">10<\/td>\n<td width=\"98\">90<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><em><strong>Yields and costs are as follows\u00a0:<\/strong><\/em><\/p>\n<table width=\"494\">\n<tbody>\n<tr>\n<td width=\"115\"><\/td>\n<td colspan=\"2\" width=\"187\">Yield (ton\/ha)<\/td>\n<td colspan=\"2\" width=\"192\">Cost (\u20ac\/ha)<\/td>\n<\/tr>\n<tr>\n<td width=\"115\">Technology<\/td>\n<td width=\"93\">extensive<\/td>\n<td width=\"94\">intensive<\/td>\n<td width=\"94\">extensive<\/td>\n<td width=\"98\">Intensive<\/td>\n<\/tr>\n<tr>\n<td width=\"115\">Wheat<\/td>\n<td width=\"93\">4.5<\/td>\n<td width=\"94\">5.0<\/td>\n<td width=\"94\">250<\/td>\n<td width=\"98\">300<\/td>\n<\/tr>\n<tr>\n<td width=\"115\">Maize<\/td>\n<td width=\"93\">8.0<\/td>\n<td width=\"94\">10.0<\/td>\n<td width=\"94\">400<\/td>\n<td width=\"98\">500<\/td>\n<\/tr>\n<tr>\n<td width=\"115\">Tomato<\/td>\n<td width=\"93\">13.0<\/td>\n<td width=\"94\">16.0<\/td>\n<td width=\"94\">1200<\/td>\n<td width=\"98\">1350<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><em>\u00a0<\/em><em>The selling price of wheat is 150\u20ac\/ton, that of maize is 150\u20ac\/ton, and that of tomato 185\u20ac\/ton.<\/em><\/p>\n<p><em>The farm area is 50 ha, and the farmer can work 1000 hours in summer and 1000 hours in winter, and has 150 tho<\/em><em>usand <\/em><em>m<\/em><em>3<\/em><em>\u00a0for irrigation<\/em><em>.\u00a0\u00bb<\/em><\/p>\n<p><em>\u00a0<\/em><\/p>\n<p><strong>Answer the following questions :<\/strong><\/p>\n<ul>\n<li><strong>What effects does adding periods to the constraints and variables have ?<\/strong><\/li>\n<li><strong>The new cropping pattern approach is different, why ?<\/strong><\/li>\n<\/ul>\n<p><strong>Then check the solution :\u00a0<\/strong><\/p>\n<p><strong><a href=\"http:\/\/www.supagro.fr\/wordpress\/modelecoen\/auto-formation\/sequence2\/cours1-enrichir-le-modele-de-base\/lecon-12-contrainte-par-periode\/activite-12a-ecrire-un-modele-avec-periodes-et-afficher-les-resultats-solution\/\" rel=\"attachment wp-att-961\"><img loading=\"lazy\" decoding=\"async\" class=\"\" src=\"http:\/\/www.supagro.fr\/wordpress\/modeleco\/files\/2016\/08\/solution.png\" alt=\"solution\" width=\"92\" height=\"45\" \/><\/a><\/strong><\/p>\n<p style=\"text-align: center\"><strong>ii. Displaying results<em><img loading=\"lazy\" decoding=\"async\" class=\"\" src=\"http:\/\/www.supagro.fr\/wordpress\/modeleco\/files\/2017\/11\/N2.png\" alt=\"\" width=\"25\" height=\"24\" \/><\/em><\/strong><\/p>\n<p><strong>All results will be displayed in a table (the shaded areas are those where the results appear) :<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-4674\" src=\"http:\/\/www.supagro.fr\/wordpress\/modelecoen\/files\/2019\/06\/act12-300x109.png\" alt=\"\" width=\"300\" height=\"109\" srcset=\"https:\/\/www.supagro.fr\/wordpress\/modelecoen\/files\/2019\/06\/act12-300x109.png 300w, https:\/\/www.supagro.fr\/wordpress\/modelecoen\/files\/2019\/06\/act12-768x280.png 768w, https:\/\/www.supagro.fr\/wordpress\/modelecoen\/files\/2019\/06\/act12.png 791w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>The incomplete lines of code below (you need to change the %) which make it possible to create this table may help you.\u00a0<strong>Warning : if you copy-paste, the inverted commas must be replaced in order for GAMS to accept them.<\/strong><\/p>\n<p>Parameter RESULT(*,*);<br \/>\nRESULT(c,t) = X.L(c,t);<br \/>\nRESULT(\u2018Terre\u2019, \u2018Marginal\u2019)=%%%%%%;<br \/>\nRESULT(\u2018Travail_Hiver\u2019, \u2018Total\u2019) = TRAVAIL.L(\u2018hiver\u2019);<br \/>\nRESULT(\u2018Travail_Hiver\u2019, \u2018Marginal\u2019)= TRAVAIL.M(\u2018hiver\u2019);<br \/>\nRESULT(\u2018Travail_Ete\u2019, \u2018Total\u2019) = %%%%%;<br \/>\nRESULT(\u2018Travail_Ete\u2019, \u2018Marginal\u2019)= %%%%%;<br \/>\nRESULT(\u2018Eau\u2019, \u2018Total\u2019) = EAU.L;<br \/>\n%%%%%%= EAU.M;<br \/>\nRESULT(c,\u2019TOTAL\u2019) = %%%%%%%;<br \/>\n%%%%%%% = Z.L ;<br \/>\nDisplay RESULT ;<\/p>\n<p><strong>Then check the solution<\/strong> <strong>: <a href=\"http:\/\/www.supagro.fr\/wordpress\/modelecoen\/auto-formation\/sequence2\/cours1-enrichir-le-modele-de-base\/lecon-12-contrainte-par-periode\/activite-12a-ecrire-un-modele-avec-periodes-et-afficher-les-resultats-solution-2\/\" rel=\"attachment wp-att-961\"><img loading=\"lazy\" decoding=\"async\" class=\"\" src=\"http:\/\/www.supagro.fr\/wordpress\/modeleco\/files\/2016\/08\/solution.png\" alt=\"solution\" width=\"92\" height=\"45\" \/><\/a><\/strong><br \/>\n<a href=\"http:\/\/www.supagro.fr\/wordpress\/modelecoen\/auto-formation\/sequence2\/cours1-enrichir-le-modele-de-base\/\"><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>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\u00a0techn2.gms\u00a0model (written in activity 11B or downloadable from the Model Library) and <a class=\"more-link\" href=\"https:\/\/www.supagro.fr\/wordpress\/modelecoen\/auto-formation\/sequence2\/cours1-enrichir-le-modele-de-base\/lecon-12-contrainte-par-periode\/activite-12a-ecrire-un-modele-avec-periodes-et-afficher-les-resultats\/\">Continue reading <span class=\"screen-reader-text\">  Activity 12A : \u00ab Wheat\/maize \u00bb model \u2013 i. Adding periods ii. Displaying results<\/span><span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":92,"featured_media":0,"parent":1788,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1614","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.supagro.fr\/wordpress\/modelecoen\/wp-json\/wp\/v2\/pages\/1614","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=1614"}],"version-history":[{"count":39,"href":"https:\/\/www.supagro.fr\/wordpress\/modelecoen\/wp-json\/wp\/v2\/pages\/1614\/revisions"}],"predecessor-version":[{"id":4676,"href":"https:\/\/www.supagro.fr\/wordpress\/modelecoen\/wp-json\/wp\/v2\/pages\/1614\/revisions\/4676"}],"up":[{"embeddable":true,"href":"https:\/\/www.supagro.fr\/wordpress\/modelecoen\/wp-json\/wp\/v2\/pages\/1788"}],"wp:attachment":[{"href":"https:\/\/www.supagro.fr\/wordpress\/modelecoen\/wp-json\/wp\/v2\/media?parent=1614"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}