<?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: &amp;quot;Infeasible or Unbounded&amp;quot; Solution. What am i doing wrong? in Mathematical Optimization, Discrete-Event Simulation, and OR</title>
    <link>https://communities.sas.com/t5/Mathematical-Optimization/quot-Infeasible-or-Unbounded-quot-Solution-What-am-i-doing-wrong/m-p/502760#M2428</link>
    <description>&lt;P&gt;It mean that given the constraints you have provided there is no solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would be strongly tempted to graph the constraint areas China2 LInkC2 and Fixc2 to see if one or more of those is actually redundant,&lt;/P&gt;
&lt;P&gt;Similar with Turkey2 LinkT2 and Fixt2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and consider if you actually want your demand functions to be equalities.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 09 Oct 2018 15:35:12 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-10-09T15:35:12Z</dc:date>
    <item>
      <title>"Infeasible or Unbounded" Solution. What am i doing wrong?</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/quot-Infeasible-or-Unbounded-quot-Solution-What-am-i-doing-wrong/m-p/502745#M2426</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc optmodel;

var xc1w1, xc1w2, xt1w1, xt1w2, xfw1, xfw2, xc2w1, xc2w2, xt2w1, xt2w2 &amp;gt;=0 integer;

var yc2 binary;
var yt2 binary;

maximize z=82*xc1w1+83*xc1w2+45*xt1w1+49*xt1w2+30*xfw1+35*xfw2+84*xc2w1+81*xc2w2+42*xt2w1+54*xt2w2+41000*yc2+21700*yt2;

con Demand1: xc1w1+xc2w1+xt1w1+xt2w1+xfw1=6000;
con Demand2: xc1w2+xc2w2+xt1w2+xt2w2+xfw2=5200;

con china1: xc1w1+xc1w2&amp;lt;=1500;
con china2: xc2w1+xc2w2&amp;lt;=2000;
con turkey1: xt1w1+xt1w2&amp;lt;=1800;
con turkey2: xt2w1+xt2w2&amp;lt;=2200;
con france: xfw1+xfw2&amp;lt;=6000;

con linkc2: xc2w1+xc2w2-2000*yc2&amp;lt;=0;
con linkt2: xt2w1+xt2w2-2200*yc2&amp;lt;=0;

con Fixc2: xc2w1+xc2w2&amp;lt;=1000000*yc2;
con Fixt2: xt2w1+xt2w2&amp;lt;=1000000*yt2;

con repurpose: yc2+yt2&amp;lt;=1;

solve;

print xc1w1 xc1w2 xt1w1 xt1w2 xfw1 xfw2 xc2w1 xc2w2 xt2w1 xt2w2 z;

quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Oct 2018 15:06:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/quot-Infeasible-or-Unbounded-quot-Solution-What-am-i-doing-wrong/m-p/502745#M2426</guid>
      <dc:creator>usamasm10</dc:creator>
      <dc:date>2018-10-09T15:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: "Infeasible or Unbounded" Solution. What am i doing wrong?</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/quot-Infeasible-or-Unbounded-quot-Solution-What-am-i-doing-wrong/m-p/502760#M2428</link>
      <description>&lt;P&gt;It mean that given the constraints you have provided there is no solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would be strongly tempted to graph the constraint areas China2 LInkC2 and Fixc2 to see if one or more of those is actually redundant,&lt;/P&gt;
&lt;P&gt;Similar with Turkey2 LinkT2 and Fixt2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and consider if you actually want your demand functions to be equalities.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 15:35:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/quot-Infeasible-or-Unbounded-quot-Solution-What-am-i-doing-wrong/m-p/502760#M2428</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-10-09T15:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: "Infeasible or Unbounded" Solution. What am i doing wrong?</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/quot-Infeasible-or-Unbounded-quot-Solution-What-am-i-doing-wrong/m-p/502768#M2429</link>
      <description>&lt;P&gt;I suspect that you meant for all the x* variables to be &amp;gt;= 0 and integer, but your first VAR statement imposes those restrictions on only the last one.&amp;nbsp; The log provides a hint:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: The problem has 12 variables (9 free, 0 fixed).&lt;BR /&gt;NOTE: The problem has 2 binary and 1 integer variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can see the detail by using&amp;nbsp;the EXPAND statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS Output&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE summary="Page Layout" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;PRE class="batch"&gt;Var xc1w1                                                                                      
Var xc1w2                                                                                      
Var xt1w1                                                                                      
Var xt1w2                                                                                      
Var xfw1                                                                                       
Var xfw2                                                                                       
Var xc2w1                                                                                      
Var xc2w2                                                                                      
Var xt2w1                                                                                      
Var xt2w2 INTEGER &amp;gt;= 0                                                                         
Var yc2 BINARY                                                                                 
Var yt2 BINARY                                                                                 
Maximize z=82*xc1w1 + 83*xc1w2 + 45*xt1w1 + 49*xt1w2 + 30*xfw1 + 35*xfw2 + 84*xc2w1 + 81*xc2w2 
+ 42*xt2w1 + 54*xt2w2 + 41000*yc2 + 21700*yt2                                                  
Constraint Demand1: xc1w1 + xc2w1 + xt1w1 + xt2w1 + xfw1 = 6000                                
Constraint Demand2: xc1w2 + xc2w2 + xt1w2 + xt2w2 + xfw2 = 5200                                
Constraint china1: xc1w1 + xc1w2 &amp;lt;= 1500                                                       
Constraint china2: xc2w1 + xc2w2 &amp;lt;= 2000                                                       
Constraint turkey1: xt1w1 + xt1w2 &amp;lt;= 1800                                                      
Constraint turkey2: xt2w1 + xt2w2 &amp;lt;= 2200                                                      
Constraint france: xfw1 + xfw2 &amp;lt;= 6000                                                         
Constraint linkc2: xc2w1 + xc2w2 - 2000*yc2 &amp;lt;= 0                                               
Constraint linkt2: xt2w1 + xt2w2 - 2200*yc2 &amp;lt;= 0                                               
Constraint Fixc2: xc2w1 + xc2w2 - 1000000*yc2 &amp;lt;= 0                                             
Constraint Fixt2: xt2w1 + xt2w2 - 1000000*yt2 &amp;lt;= 0                                             
Constraint repurpose: yc2 + yt2 &amp;lt;= 1  &lt;/PRE&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The simplest fix is the following:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;var xc1w1 &amp;gt;=0 integer, xc1w2 &amp;gt;=0 integer, xt1w1 &amp;gt;=0 integer, xt1w2 &amp;gt;=0 integer, xfw1 &amp;gt;=0 integer, xfw2 &amp;gt;=0 integer, xc2w1 &amp;gt;=0 integer, xc2w2 &amp;gt;=0 integer, xt2w1 &amp;gt;=0 integer, xt2w2 &amp;gt;=0 integer;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But your code would be more readable and less error-prone if you&amp;nbsp;instead use&amp;nbsp;index sets.&amp;nbsp; For example, you could declare x as follows:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;set ISET = /c1 t1 f c2 t2/;
set JSET = /w1 w2/;
var x {ISET, JSET} &amp;gt;=0 integer;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Also, arbitrarily large values like 1000000 tend to cause unnecessary numerical difficulty.&amp;nbsp; In this case, you can just omit the Fix* constraints because they are implied by the link* constraints.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 15:47:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/quot-Infeasible-or-Unbounded-quot-Solution-What-am-i-doing-wrong/m-p/502768#M2429</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2018-10-09T15:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: "Infeasible or Unbounded" Solution. What am i doing wrong?</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/quot-Infeasible-or-Unbounded-quot-Solution-What-am-i-doing-wrong/m-p/502770#M2430</link>
      <description>It is a requirement to keep demand functions to be equalities.&lt;BR /&gt;As for the Fixc2 and Fixt2, only one of them can have a value</description>
      <pubDate>Tue, 09 Oct 2018 15:48:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/quot-Infeasible-or-Unbounded-quot-Solution-What-am-i-doing-wrong/m-p/502770#M2430</guid>
      <dc:creator>usamasm10</dc:creator>
      <dc:date>2018-10-09T15:48:20Z</dc:date>
    </item>
    <item>
      <title>Re: "Infeasible or Unbounded" Solution. What am i doing wrong?</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/quot-Infeasible-or-Unbounded-quot-Solution-What-am-i-doing-wrong/m-p/502826#M2431</link>
      <description>&lt;P&gt;I did not notice in that in the notes. That helped.&lt;/P&gt;&lt;P&gt;Thanks a lot &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 17:49:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/quot-Infeasible-or-Unbounded-quot-Solution-What-am-i-doing-wrong/m-p/502826#M2431</guid>
      <dc:creator>usamasm10</dc:creator>
      <dc:date>2018-10-09T17:49:02Z</dc:date>
    </item>
  </channel>
</rss>

