{"id":212,"date":"2023-12-07T17:44:35","date_gmt":"2023-12-07T17:44:35","guid":{"rendered":"https:\/\/agecoresearch.tamu.edu\/mccarl\/?page_id=212"},"modified":"2023-12-08T20:36:21","modified_gmt":"2023-12-08T20:36:21","slug":"hands-on-3-errors","status":"publish","type":"page","link":"https:\/\/agecoresearch.tamu.edu\/mccarl\/classes-i-teach\/hands-on-3-errors\/","title":{"rendered":"Hands On 3 Errors"},"content":{"rendered":"\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<ul class=\"wp-block-list\">\n<li>File contains errors, both theoretical and syntax-related, *<\/li>\n\n\n\n<li>find them and interpret the results of the corrected model *<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<p>SETS<br>Sources cities that have canning plants that produce cases of canned peaches<br>\/ Seattle<br>&#8220;San Diego&#8221;<br>Topeka<br>Houston<br>\/<br>Destination cities that are markets for the canned peaches<br>\/ &#8220;New York&#8221;<br>Chicago<br>\/<\/p>\n\n\n\n<p>PARAMETERS<br>Supply(Sources) Supply available of canned peaches at each source plant in cases<br>\/Seattle 50<br>&#8220;San Diego&#8221; 30<br>Topeka 20<br>Houston 10<br>\/<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Need(Destination) Amount neeeded at each market destination in cases of canned peaches\n  \/\"New York\"   55\n   Chicago      45\n  \/;<\/code><\/pre>\n\n\n\n<p>TABLE Distance(Sources,Destination) Distance in miles<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>                \"New York\"     Chicago\n  Seattle          20          25\n  \"San Diego\"      15          32\n  Topeka           10          15\n  Houston          17          19          ;<\/code><\/pre>\n\n\n\n<p>SCALAR<br>PrMileCst Freight cost in $ per miles \/0.5\/ ;<\/p>\n\n\n\n<p>PARAMETER<br>TranCost(Sources,Destination) Transport cost in dollars per case ;<br>Trancost(Sources,Destination)<br>= PrMileCst*Distance(Sources,Destination)<\/p>\n\n\n\n<p>VARIABLE<br>TotalCost total transportation costs in dollars ;<\/p>\n\n\n\n<p>POSITIVE VARIABLE<br>Transport(Sources,Destination) shipment quantities in cases ;<\/p>\n\n\n\n<p>EQUATIONS<br>Costsum total transport cost &#8212; objective function<br>Supplbal(Sources) supply limit at source plants<br>Demandbal(Destination) demand at destinations ;<\/p>\n\n\n\n<p>Costsum..<br>TotalCost<br>=e= SUM((Sources,Destination),<br>Trancost(Sources,Destination)*Transport(Sources,Destination)) ;<\/p>\n\n\n\n<p>Supplbal(Sources)..<br>SUM(Destination, Transport(Sources,Destination))<br>=l= Supply(Sources) ;<\/p>\n\n\n\n<p>Demandbal(Destination)..<br>SUM(Sources, Transport(Sources,Destination))<br>=e= Need(Destination);<\/p>\n\n\n\n<p>MODEL Transports \/All\/ ;<\/p>\n\n\n\n<p>SOLVE Transports using lp minimizing TotalCost ;<br>display transport.L, transport.M;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The display command is used simply to build a simple report for the optimal solution level (transport.L) and reduced costs<\/li>\n\n\n\n<li>of transport (transport.M) var<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>SETSSources cities that have canning plants that produce cases of canned peaches\/ Seattle&#8220;San Diego&#8221;TopekaHouston\/Destination cities that are markets for the canned peaches\/ &#8220;New York&#8221;Chicago\/ PARAMETERSSupply(Sources) Supply available of canned peaches at each source plant in cases\/Seattle 50&#8220;San Diego&#8221; 30Topeka 20Houston 10\/ TABLE Distance(Sources,Destination) Distance in miles SCALARPrMileCst Freight cost in $ per miles \/0.5\/ ; [&hellip;]<\/p>\n","protected":false},"author":18,"featured_media":0,"parent":90,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"psi_page_style":"none","footnotes":""},"class_list":["post-212","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/agecoresearch.tamu.edu\/mccarl\/wp-json\/wp\/v2\/pages\/212","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/agecoresearch.tamu.edu\/mccarl\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/agecoresearch.tamu.edu\/mccarl\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/agecoresearch.tamu.edu\/mccarl\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/agecoresearch.tamu.edu\/mccarl\/wp-json\/wp\/v2\/comments?post=212"}],"version-history":[{"count":0,"href":"https:\/\/agecoresearch.tamu.edu\/mccarl\/wp-json\/wp\/v2\/pages\/212\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/agecoresearch.tamu.edu\/mccarl\/wp-json\/wp\/v2\/pages\/90"}],"wp:attachment":[{"href":"https:\/\/agecoresearch.tamu.edu\/mccarl\/wp-json\/wp\/v2\/media?parent=212"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}