<?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 Re: Constraint with more than 2 elements in tupple in Mathematical Optimization, Discrete-Event Simulation, and OR</title>
    <link>https://communities.sas.com/t5/Mathematical-Optimization/Constraint-with-more-than-2-elements-in-tupple/m-p/314838#M1532</link>
    <description>&lt;P&gt;You are missing some angle brackets and parentheses.&amp;nbsp; Try this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;   con sbcls_dsp{&amp;lt;grp,dpt,cls,sbcls&amp;gt; in itm_hrchy}:
      sum{&amp;lt;(grp),(dpt),(cls),(sbcls),ssn,itm,dsp,prc&amp;gt; in dsp_prc_choice} 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 28 Nov 2016 15:16:05 GMT</pubDate>
    <dc:creator>RobPratt</dc:creator>
    <dc:date>2016-11-28T15:16:05Z</dc:date>
    <item>
      <title>Constraint with more than 2 elements in tupple</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Constraint-with-more-than-2-elements-in-tupple/m-p/314742#M1530</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am running below mentioned code...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc optmodel;&lt;/P&gt;&lt;P&gt;ods output SolutionSummary=exss;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;set &amp;lt;string&amp;gt; itm_list;&lt;BR /&gt;set &amp;lt;string,string,string,string&amp;gt; itm_hrchy;&lt;BR /&gt;set &amp;lt;string,string,string,string,string,string,number,number&amp;gt; dsp_prc_choice;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;number beg_stk{itm_list};&lt;BR /&gt;number curr_dsp{itm_hrchy};&lt;BR /&gt;number cogs{dsp_prc_choice};&lt;BR /&gt;number org_prc{dsp_prc_choice};&lt;BR /&gt;number sugg_prc{dsp_prc_choice};&lt;BR /&gt;number sugg_dsp{dsp_prc_choice};&lt;BR /&gt;number qty{dsp_prc_choice};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;read data&amp;nbsp;table1&lt;BR /&gt;into itm_list=[itm_cd] a=...;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;read data&amp;nbsp;table2&lt;BR /&gt;into itm_hrchy=[grp_cd dpt_cd cls_cd sbcls_cd] v=...;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;read data&amp;nbsp;table3&lt;BR /&gt;into dsp_prc_choice=[grp_cd dpt_cd cls_cd sbcls_cd curr_ssn_cd itm_cd display_str sug_rtl_prc] qty=&amp;amp;qty_value. k=...&amp;nbsp;l=...&amp;nbsp;n=...&amp;nbsp;m=...;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var x {&amp;lt;grp,dpt,cls,sbcls,ssn,itm,dsp,prc&amp;gt; in dsp_prc_choice} binary;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;max obj =&amp;nbsp;...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;con1 ...;&lt;/P&gt;&lt;P&gt;con2 ...;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;con sbcls_dsp{grp,dpt,cls,sbcls in itm_hrchy}: sum{&amp;lt;(grp,dpt,cls,sbcls),ssn,itm,dsp,prc&amp;gt; in dsp_prc_choice} m[grp,dpt,cls,sbcls,ssn,itm,dsp,prc]*x[grp,dpt,cls,sbcls,ssn,itm,dsp,prc] = v[grp,dpt,cls,sbcls];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;con3 ...;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;solve with milp / relobjgap=0.1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;create data solution from [grp_cd dpt_cd cls_cd sbcls_cd curr_ssn_cd itm_cd sugg_dsp_str sugg_rtl_prc] = {&amp;lt;grp,dpt,cls,sbcls,ssn,itm,dsp,prc&amp;gt; in dsp_prc_choice: x[grp,dpt,cls,sbcls,ssn,itm,dsp,prc] = 1};&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting error in the "&lt;SPAN&gt;sbcls_dsp" constraint declaration. Following error is coming -&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;72 con sbcls_dsp{grp,dpt,cls,sbcls in itm_hrchy}: sum{&amp;lt;(grp,dpt,cls,sbcls),ssn,itm,dsp,prc&amp;gt; in dsp_prc_choice}&lt;BR /&gt;___ _ _ _ _ _ _ ___&lt;BR /&gt;_&lt;BR /&gt;___&lt;BR /&gt;_&lt;BR /&gt;___&lt;BR /&gt;_&lt;BR /&gt;525 515 515 516 22 79 702 525&lt;BR /&gt;621&lt;BR /&gt;525&lt;BR /&gt;621&lt;BR /&gt;525&lt;BR /&gt;621&lt;BR /&gt;781&lt;BR /&gt;ERROR 525-782: The symbol 'grp' is unknown.&lt;/P&gt;&lt;P&gt;ERROR 516-782: The indexing does not match the set element length, 1 NE 4.&lt;/P&gt;&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: (, ).&lt;/P&gt;&lt;P&gt;ERROR 79-322: Expecting a ).&lt;/P&gt;&lt;P&gt;3 The SAS System 09:38 Monday, November 28, 2016&lt;/P&gt;&lt;P&gt;ERROR 702-782: The slice value type, a number, does not match the set element 1 type, a string.&lt;/P&gt;&lt;P&gt;ERROR 621-782: Subscript 1 must be a string, found a number.&lt;/P&gt;&lt;P&gt;ERROR 781-782: Null argument is not allowed for function 'GRP'.&lt;/P&gt;&lt;P&gt;_ ___&lt;BR /&gt;515 534&lt;BR /&gt;ERROR 515-782: An indexing set subexpression may not be a number.&lt;/P&gt;&lt;P&gt;ERROR 534-782: The function 'grp' is unknown.&lt;/P&gt;&lt;P&gt;72 ! con sbcls_dsp{grp,dpt,cls,sbcls in itm_hrchy}: sum{&amp;lt;(grp,dpt,cls,sbcls),ssn,itm,dsp,prc&amp;gt; in dsp_prc_choice}&lt;BR /&gt;___ ___ _&lt;BR /&gt;___&lt;BR /&gt;_&lt;BR /&gt;___&lt;BR /&gt;_&lt;BR /&gt;___&lt;BR /&gt;_&lt;BR /&gt;525 525 516&lt;BR /&gt;525&lt;BR /&gt;621&lt;BR /&gt;525&lt;BR /&gt;621&lt;BR /&gt;525&lt;BR /&gt;621&lt;BR /&gt;ERROR 525-782: The symbol 'dpt' is unknown.&lt;/P&gt;&lt;P&gt;ERROR 516-782: The indexing does not match the set element length, 5 NE 8.&lt;/P&gt;&lt;P&gt;ERROR 621-782: Subscript 2 must be a string, found a number.&lt;/P&gt;&lt;P&gt;72 ! con sbcls_dsp{grp,dpt,cls,sbcls in itm_hrchy}: sum{&amp;lt;(grp,dpt,cls,sbcls),ssn,itm,dsp,prc&amp;gt; in dsp_prc_choice}&lt;BR /&gt;___ ___&lt;BR /&gt;___&lt;BR /&gt;_&lt;BR /&gt;___&lt;BR /&gt;_&lt;BR /&gt;___&lt;BR /&gt;_&lt;BR /&gt;525 525&lt;BR /&gt;525&lt;BR /&gt;621&lt;BR /&gt;525&lt;BR /&gt;621&lt;BR /&gt;525&lt;BR /&gt;621&lt;BR /&gt;ERROR 525-782: The symbol 'cls' is unknown.&lt;/P&gt;&lt;P&gt;ERROR 621-782: Subscript 3 must be a string, found a number.&lt;/P&gt;&lt;P&gt;72 ! con sbcls_dsp{grp,dpt,cls,sbcls in itm_hrchy}: sum{&amp;lt;(grp,dpt,cls,sbcls),ssn,itm,dsp,prc&amp;gt; in dsp_prc_choice}&lt;BR /&gt;72 ! m[grp,dpt,cls,sbcls,ssn,itm,dsp,prc]*x[grp,dpt,cls,sbcls,ssn,itm,dsp,prc] = v[grp,dpt,cls,sbcls];&lt;BR /&gt;_ _&lt;BR /&gt;621 621&lt;BR /&gt;ERROR 621-782: Subscript 7 must be a number, found a string.&lt;/P&gt;&lt;P&gt;4 The SAS System 09:38 Monday, November 28, 2016&lt;/P&gt;&lt;P&gt;72 ! m[grp,dpt,cls,sbcls,ssn,itm,dsp,prc]*x[grp,dpt,cls,sbcls,ssn,itm,dsp,prc] = v[grp,dpt,cls,sbcls];&lt;BR /&gt;_ _&lt;BR /&gt;621 621&lt;BR /&gt;ERROR 621-782: Subscript 8 must be a number, found a string.&lt;/P&gt;&lt;P&gt;73&lt;BR /&gt;74 con must_allocate_price{itm in itm_list}: sum{&amp;lt;grp,dpt,cls,sbcls,ssn,(itm),dsp,prc&amp;gt; in dsp_prc_choice}&lt;BR /&gt;74 ! x[grp,dpt,cls,sbcls,ssn,itm,dsp,prc] = 1;&lt;BR /&gt;75&lt;BR /&gt;76 solve with milp / relobjgap=0.1;&lt;BR /&gt;NOTE: Problem generation will use 28 threads.&lt;BR /&gt;NOTE: Previous errors might cause the problem to be resolved incorrectly.&lt;BR /&gt;ERROR: The constraint 'sbcls_dsp' has an incomplete declaration.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2016 06:25:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Constraint-with-more-than-2-elements-in-tupple/m-p/314742#M1530</guid>
      <dc:creator>VinitXen</dc:creator>
      <dc:date>2016-11-28T06:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: Constraint with more than 2 elements in tupple</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Constraint-with-more-than-2-elements-in-tupple/m-p/314838#M1532</link>
      <description>&lt;P&gt;You are missing some angle brackets and parentheses.&amp;nbsp; Try this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;   con sbcls_dsp{&amp;lt;grp,dpt,cls,sbcls&amp;gt; in itm_hrchy}:
      sum{&amp;lt;(grp),(dpt),(cls),(sbcls),ssn,itm,dsp,prc&amp;gt; in dsp_prc_choice} 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Nov 2016 15:16:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Constraint-with-more-than-2-elements-in-tupple/m-p/314838#M1532</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2016-11-28T15:16:05Z</dc:date>
    </item>
  </channel>
</rss>

