{"id":3776,"date":"2018-01-16T14:23:43","date_gmt":"2018-01-16T13:23:43","guid":{"rendered":"http:\/\/www.supagro.fr\/wordpress\/modeleco\/?page_id=3776"},"modified":"2019-06-28T14:25:55","modified_gmt":"2019-06-28T12:25:55","slug":"activite-12a-ecrire-un-modele-avec-periodes-et-afficher-les-resultats-solution-2","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-solution-2\/","title":{"rendered":"Activity 12A : Writing a model with periods and displaying results \u2013 Solution 2"},"content":{"rendered":"<p>You should find the following table in the display tab of your .lst file :<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-4677\" src=\"http:\/\/www.supagro.fr\/wordpress\/modelecoen\/files\/2019\/06\/act12_ii-300x115.png\" alt=\"\" width=\"300\" height=\"115\" srcset=\"https:\/\/www.supagro.fr\/wordpress\/modelecoen\/files\/2019\/06\/act12_ii-300x115.png 300w, https:\/\/www.supagro.fr\/wordpress\/modelecoen\/files\/2019\/06\/act12_ii-768x295.png 768w, https:\/\/www.supagro.fr\/wordpress\/modelecoen\/files\/2019\/06\/act12_ii.png 783w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>It was created thanks to the following code (* introduces a comment) :<\/p>\n<p>Parameter RESULT(*,*);<br \/>\n*a two dimension RESULT parameter was created, therefore with a row and a column. The content of the latter was not specified. The * were then replaced either by a SET, or by a name which was chosen and displayed.<\/p>\n<p>RESULT(c,t) = X.L(c,t);<br \/>\n*Firstly, RESULT is completed with c rows and t columns, the optimum value (.L for level) of the land area per crop and per technology is displayed in each table cell. It must be noted that the tomato does not appear in the table for its land area is equal to zero.<\/p>\n<p>RESULT(\u2018Land\u2019, \u2018Marginal\u2019)=LAND.M;<br \/>\n*A \u2018Land\u2019 row and a \u2018Marginal\u2019 column are created, the cell contains the marginal value of the land equation (.M for marginal). \u2018Land\u2019 and \u2018Marginal\u2019 are the terms which we wish to display in the table.<\/p>\n<p>RESULT(\u2018Labour_Winter\u2019, \u2018Total\u2019) = LABOUR.L(\u2018winter\u2019);<br \/>\n*a \u2018Labour_Winter\u2019 row and a \u2018Total\u2019 column are created, the cell is filled with the optimum value of the quantity of work (\u2018winter\u2019). \u2018winter\u2019 is presented with inverted commas for it is a component of a SET.<\/p>\n<p>RESULT(\u2018Labour_Winter\u2019, \u2018Marginal\u2019)= LABOUR.M(\u2018winter\u2019);<br \/>\n*The \u2018Labour_Winter\u2019 row and the \u2018Marginal\u2019 column have already existed, GAMS will therefore directly intervene in the cell and fill it with the marginal value of the labour equation (\u2018winter\u2019).<\/p>\n<p>RESULT(\u2018Travail_Ete\u2019, \u2018Total\u2019) = TRAVAIL.L(\u2018ete\u2019);<br \/>\nRESULT(\u2018Travail_Ete\u2019, \u2018Marginal\u2019)= TRAVAIL.M(\u2018ete\u2019);<br \/>\nRESULT(\u2018Eau\u2019, \u2018Total\u2019) = EAU.L;<br \/>\nRESULT(\u2018Eau\u2019, \u2018Marginal\u2019)= EAU.M;<br \/>\nRESULT(c,\u2019TOTAL\u2019) = sum(t, X.L(c,t));<br \/>\nRESULT(\u2018Revenu\u2019, \u2018TOTAL\u2019) = Z.L ;<\/p>\n<p>Display RESULT ;<br \/>\n*the results table is displayed.<\/p>\n<p><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><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\/\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-4326 alignleft\" src=\"http:\/\/www.supagro.fr\/wordpress\/modelecoen\/files\/2018\/11\/backStatement.png\" alt=\"\" width=\"191\" height=\"61\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>You should find the following table in the display tab of your .lst file : It was created thanks to the following code (* introduces a comment) : Parameter RESULT(*,*); *a two dimension RESULT parameter was created, therefore with a <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-solution-2\/\">Continue reading <span class=\"screen-reader-text\">  Activity 12A : Writing a model with periods and displaying results \u2013 Solution 2<\/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-3776","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.supagro.fr\/wordpress\/modelecoen\/wp-json\/wp\/v2\/pages\/3776","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=3776"}],"version-history":[{"count":4,"href":"https:\/\/www.supagro.fr\/wordpress\/modelecoen\/wp-json\/wp\/v2\/pages\/3776\/revisions"}],"predecessor-version":[{"id":4678,"href":"https:\/\/www.supagro.fr\/wordpress\/modelecoen\/wp-json\/wp\/v2\/pages\/3776\/revisions\/4678"}],"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=3776"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}