<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ERROR: The array element 'incost[P1,Barranqu,'Medellín']' has no value at line 114 column 63 in SAS Software for Learning Community</title>
    <link>https://communities.sas.com/t5/SAS-Software-for-Learning/ERROR-The-array-element-incost-P1-Barranqu-Medell%C3%ADn-has-no-value/m-p/805267#M456</link>
    <description>&lt;P&gt;I don't know where&amp;nbsp; is the problem&amp;nbsp; ?&lt;/P&gt;&lt;P&gt;this is my code&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Inputing values of multi-dimensional matrix incost in a table form first*/&lt;BR /&gt;Data incost;&lt;BR /&gt;infile datalines dsd delimiter='09'x;&lt;BR /&gt;input Product $ Plant $ DC $ incost;&lt;BR /&gt;datalines;&lt;BR /&gt;P1 Barranqu Bogotá 130&lt;BR /&gt;P1 Barranqu Medellín 90.6&lt;BR /&gt;P1 Barranqu Cali 142&lt;BR /&gt;P1 Santander Bogotá 53.6&lt;BR /&gt;P1 Santander Medellín 41.6&lt;BR /&gt;P1 Santander Cali 88.8&lt;BR /&gt;P2 Barranqu Bogotá 130&lt;BR /&gt;P2 Barranqu Medellín 90.6&lt;BR /&gt;P2 Barranqu Cali 142&lt;BR /&gt;P2 Santander Bogotá 53.6&lt;BR /&gt;P2 Santander Medellín 41.6&lt;BR /&gt;P2 Santander Cali 88.8&lt;/P&gt;&lt;P&gt;;&lt;BR /&gt;Run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc optmodel;&lt;/P&gt;&lt;P&gt;set Product = {'P1','P2'};&lt;BR /&gt;set Plant = {'Barranqu','Santander'};&lt;BR /&gt;set DC = {'Bogotá','Medellín','Cali'};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;number PlCapacity{Plant} = [610 350 ];&lt;/P&gt;&lt;P&gt;number incost{Product,Plant,DC};&lt;BR /&gt;Read data inCost into [Product Plant DC] inCost;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;number Demand{Product,DC} = [&lt;BR /&gt;276 210.4 137.6&lt;BR /&gt;69 52.6 34.4&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;var inflow{Product,Plant,DC} &amp;gt;= 0;&lt;/P&gt;&lt;P&gt;/* Minimize Total Transport cost = Inbound transport cost + Outbound transport cost */&lt;BR /&gt;minimize Z=sum{l in Product,i in Plant,k in DC}(inflow[l,i,k]*incost[l,i,k]);&lt;BR /&gt;con PlantCon{i in Plant}: sum{l in Product,k in DC}(inflow[l,i,k])&amp;lt;=PlCapacity[i];&lt;BR /&gt;con DCCon{l in Product,k in DC}: sum{i in Plant}(inflow[l,i,k])&amp;gt;=Demand[l,k];&lt;/P&gt;&lt;P&gt;solve;&lt;BR /&gt;print z inflow ;&lt;BR /&gt;quit;&lt;/P&gt;</description>
    <pubDate>Thu, 31 Mar 2022 13:52:58 GMT</pubDate>
    <dc:creator>Ibraheem123</dc:creator>
    <dc:date>2022-03-31T13:52:58Z</dc:date>
    <item>
      <title>ERROR: The array element 'incost[P1,Barranqu,'Medellín']' has no value at line 114 column 63</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/ERROR-The-array-element-incost-P1-Barranqu-Medell%C3%ADn-has-no-value/m-p/805267#M456</link>
      <description>&lt;P&gt;I don't know where&amp;nbsp; is the problem&amp;nbsp; ?&lt;/P&gt;&lt;P&gt;this is my code&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Inputing values of multi-dimensional matrix incost in a table form first*/&lt;BR /&gt;Data incost;&lt;BR /&gt;infile datalines dsd delimiter='09'x;&lt;BR /&gt;input Product $ Plant $ DC $ incost;&lt;BR /&gt;datalines;&lt;BR /&gt;P1 Barranqu Bogotá 130&lt;BR /&gt;P1 Barranqu Medellín 90.6&lt;BR /&gt;P1 Barranqu Cali 142&lt;BR /&gt;P1 Santander Bogotá 53.6&lt;BR /&gt;P1 Santander Medellín 41.6&lt;BR /&gt;P1 Santander Cali 88.8&lt;BR /&gt;P2 Barranqu Bogotá 130&lt;BR /&gt;P2 Barranqu Medellín 90.6&lt;BR /&gt;P2 Barranqu Cali 142&lt;BR /&gt;P2 Santander Bogotá 53.6&lt;BR /&gt;P2 Santander Medellín 41.6&lt;BR /&gt;P2 Santander Cali 88.8&lt;/P&gt;&lt;P&gt;;&lt;BR /&gt;Run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc optmodel;&lt;/P&gt;&lt;P&gt;set Product = {'P1','P2'};&lt;BR /&gt;set Plant = {'Barranqu','Santander'};&lt;BR /&gt;set DC = {'Bogotá','Medellín','Cali'};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;number PlCapacity{Plant} = [610 350 ];&lt;/P&gt;&lt;P&gt;number incost{Product,Plant,DC};&lt;BR /&gt;Read data inCost into [Product Plant DC] inCost;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;number Demand{Product,DC} = [&lt;BR /&gt;276 210.4 137.6&lt;BR /&gt;69 52.6 34.4&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;var inflow{Product,Plant,DC} &amp;gt;= 0;&lt;/P&gt;&lt;P&gt;/* Minimize Total Transport cost = Inbound transport cost + Outbound transport cost */&lt;BR /&gt;minimize Z=sum{l in Product,i in Plant,k in DC}(inflow[l,i,k]*incost[l,i,k]);&lt;BR /&gt;con PlantCon{i in Plant}: sum{l in Product,k in DC}(inflow[l,i,k])&amp;lt;=PlCapacity[i];&lt;BR /&gt;con DCCon{l in Product,k in DC}: sum{i in Plant}(inflow[l,i,k])&amp;gt;=Demand[l,k];&lt;/P&gt;&lt;P&gt;solve;&lt;BR /&gt;print z inflow ;&lt;BR /&gt;quit;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2022 13:52:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/ERROR-The-array-element-incost-P1-Barranqu-Medell%C3%ADn-has-no-value/m-p/805267#M456</guid>
      <dc:creator>Ibraheem123</dc:creator>
      <dc:date>2022-03-31T13:52:58Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: The array element 'incost[P1,Barranqu,'Medellín']' has no value at line 114 column 63</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/ERROR-The-array-element-incost-P1-Barranqu-Medell%C3%ADn-has-no-value/m-p/805331#M457</link>
      <description>&lt;P&gt;Look at your incost dataset. Using just $ defines a variable with a length of 8, which is too short for your values ("Santander" has 9 characters, and the UTF characters in "&lt;SPAN&gt;Medellín" cause the actual data to be longer).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This data step will create a dataset where the rest of the code works:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data incost;
input Product $ Plant :$9. DC :$10. incost;
datalines;
P1 Barranqu Bogotá 130
P1 Barranqu Medellín 90.6
P1 Barranqu Cali 142
P1 Santander Bogotá 53.6
P1 Santander Medellín 41.6
P1 Santander Cali 88.8
P2 Barranqu Bogotá 130
P2 Barranqu Medellín 90.6
P2 Barranqu Cali 142
P2 Santander Bogotá 53.6
P2 Santander Medellín 41.6
P2 Santander Cali 88.8
;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 31 Mar 2022 15:17:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/ERROR-The-array-element-incost-P1-Barranqu-Medell%C3%ADn-has-no-value/m-p/805331#M457</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-03-31T15:17:25Z</dc:date>
    </item>
  </channel>
</rss>

