<?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: MILP Infeasibility in Mathematical Optimization, Discrete-Event Simulation, and OR</title>
    <link>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/764590#M3495</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;threshold=1059.1293009

NOTE: Problem generation will use 4 threads.
NOTE: The problem has 350026 variables (0 free, 0 fixed).
NOTE: The problem has 350026 binary and 0 integer variables.
NOTE: The problem has 351095 linear constraints (349615 LE, 1480 EQ, 0 GE, 0 range).
NOTE: The problem has 1049254 linear constraint coefficients.
NOTE: The problem has 0 nonlinear constraints (0 LE, 0 EQ, 0 GE, 0 range).
NOTE: The OPTMODEL presolver is disabled for linear problems.
NOTE: The initial MILP heuristics are applied.
NOTE: The MILP presolver value AUTOMATIC is applied.
NOTE: The MILP presolver removed 4 variables and 0 constraints.
NOTE: The MILP presolver removed 4 constraint coefficients.
NOTE: The MILP presolver modified 0 constraint coefficients.
NOTE: The presolved problem has 350022 variables, 351095 constraints, and 1049250 constraint
      coefficients.
NOTE: The MILP solver is called.
NOTE: The parallel Branch and Cut algorithm is used.
NOTE: The Branch and Cut algorithm is using up to 4 threads.
          Node   Active   Sols    BestInteger      BestBound      Gap    Time
             0        1      1      300164209      300164209    0.00%     289
             0        0      1      300164209      300164209    0.00%     289
NOTE: Optimal.
NOTE: Objective = 300164208.62.
507  quit;
NOTE: PROCEDURE OPTMODEL used (Total process time):
      real time           6:11.50
      user cpu time       6:10.32
      system cpu time     2.67 seconds
      memory              2787007.45k
      OS Memory           2809256.00k
      Timestamp           08/27/2021 07:38:59 PM
      Step Count                        13  Switch Count  15
&lt;/PRE&gt;</description>
    <pubDate>Fri, 27 Aug 2021 23:50:30 GMT</pubDate>
    <dc:creator>RobPratt</dc:creator>
    <dc:date>2021-08-27T23:50:30Z</dc:date>
    <item>
      <title>MILP Infeasibility</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/759795#M3445</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this code below. trying to pick "p" number of facilities from a list of facilities. this works perfectly fine when I have p as 70 but when I change it to 60 it returns infeasibility. I want to identify which constraint/customer is causing it so that I can make necessary changes. I tried IIS=TRUE but it did not help. Earlier SAS used to give me which customer was causing infeasibility and i added fixes to it. Now I am not sure what causes infeasibility. Any help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc optmodel;
set DIMS=1..2;
set CUSTOMERS;
set FACILITIES;
num a {CUSTOMERS,DIMS};
num demand {CUSTOMERS}; 

num f {FACILITIES,DIMS};
num SiteCapacity {FACILITIES};
str FacilitySiteName {FACILITIES};

num p=70; /*Set how many Facilities you want to be OPENED*/

read data ISURGCUS.COGcustomers into CUSTOMERS=
[_N_] {d in DIMS} &amp;lt;a[_N_,d]=col('a'||d)&amp;gt; demand;


read data ISURGCUS.cogExistingFacilities into FACILITIES=
[_N_] {d in DIMS} &amp;lt;f[_N_,d]=col('f'||d)&amp;gt;FacilitySiteName;

str SiteState{CUSTOMERS};
read data ISURGCUS.COGcustomers into CUSTOMERS=
[_N_] {d in DIMS} &amp;lt;a[_N_,d]=col('a'||d)&amp;gt; SiteState ;

**print a;
**print SiteState;
**print FacilitySiteName;
**print demand;

/*str SiteRegion{CUSTOMERS};
read data STDOPT.COGMODELINGDATA intP CUSTOMERS=
[_N_] {d in DIMS} &amp;lt;a[_N_,d]=col('a'||d)&amp;gt; SiteRegion ;

str SiteComment1{CUSTOMERS};
read data STDOPT.COGMODELINGDATA into CUSTOMERS=
[_N_] {d in DIMS} &amp;lt;a[_N_,d]=col('a'||d)&amp;gt; SiteComment1;*/


/* distance from customer i to facility j */
   num dist {i in CUSTOMERS, j in FACILITIES}
       = GEODIST(a[i,1],a[i,2],f[j,1],f[j,2],'M');

set CUSTOMERS_FACILITIES = {i in CUSTOMERS, j in FACILITIES: dist[i,j] &amp;lt;= 120};
var Assign {CUSTOMERS_FACILITIES} binary;
var Build {FACILITIES} binary;

   min Cost
       = sum {&amp;lt;i,j&amp;gt; in CUSTOMERS_FACILITIES} dist[i,j] * Assign[i,j]*demand[i];
   
   /* each customer assigned to exactly one site */
   con assign_def {i in CUSTOMERS}:
      sum {&amp;lt;(i),j&amp;gt; in CUSTOMERS_FACILITIES} Assign[i,j] = 1;

   /* if customer i assigned to site j, then facility must be built at j */
   con link {&amp;lt;i,j&amp;gt; in CUSTOMERS_FACILITIES}:
      Assign[i,j] &amp;lt;= Build[j];

   /* each site can handle at most &amp;amp;SiteCapacity demand */
/*con capacity {j in FACILITIES}:
      sum {&amp;lt;i,(j)&amp;gt; in CUSTOMERS_FACILITIES} demand[i] * Assign[i,j] &amp;lt;=
         SiteCapacity[j] * Build[j];*/
 
con  Have_This_Many_FAC_OPEN:  Sum{j in FACILITIES} Build[j] &amp;lt;=p;


   /* solve the MILP */
 solve with milp /timetype=real;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This is the error message as well&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;solve with milp /timetype=real;
NOTE: Problem generation will use 4 threads.
NOTE: The problem has 7341 variables (0 free, 0 fixed).
NOTE: The problem has 7341 binary and 0 integer variables.
NOTE: The problem has 7582 linear constraints (6937 LE, 645 EQ, 0 GE, 0 range).
NOTE: The problem has 21213 linear constraint coefficients.
NOTE: The problem has 0 nonlinear constraints (0 LE, 0 EQ, 0 GE, 0 range).
NOTE: The initial MILP heuristics are applied.
NOTE: The MILP presolver value AUTOMATIC is applied.
NOTE: The MILP presolver removed 90 variables and 91 constraints.
NOTE: The MILP presolver removed 199 constraint coefficients.
NOTE: The MILP presolver modified 0 constraint coefficients.
NOTE: The presolved problem has 7251 variables, 7491 constraints, and 21014 constraint coefficients.
NOTE: The MILP solver is called.
NOTE: The parallel Branch and Cut algorithm is used.
NOTE: The Branch and Cut algorithm is using up to 4 threads.
          Node   Active   Sols    BestInteger      BestBound      Gap    Time
             0        1      0              .         207564        .       0
             0        1      0              .         207564        .       0
NOTE: Infeasible.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Aug 2021 20:20:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/759795#M3445</guid>
      <dc:creator>Santha</dc:creator>
      <dc:date>2021-08-05T20:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: MILP Infeasibility</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/759797#M3446</link>
      <description>&lt;P&gt;Can you please share the data sets?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 20:23:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/759797#M3446</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2021-08-05T20:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: MILP Infeasibility</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/759799#M3447</link>
      <description>&lt;P&gt;HI Rob&lt;/P&gt;&lt;P&gt;You think this could be in data problem?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 20:30:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/759799#M3447</guid>
      <dc:creator>Santha</dc:creator>
      <dc:date>2021-08-05T20:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: MILP Infeasibility</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/759802#M3448</link>
      <description>&lt;P&gt;I was asking for the data so that I can run your code and give you a specific diagnosis of infeasibility.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 20:37:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/759802#M3448</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2021-08-05T20:37:09Z</dc:date>
    </item>
    <item>
      <title>Re: MILP Infeasibility</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/759803#M3449</link>
      <description>&lt;P&gt;ok. let me share the data sets shortly. thank you&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 20:37:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/759803#M3449</guid>
      <dc:creator>Santha</dc:creator>
      <dc:date>2021-08-05T20:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: MILP Infeasibility</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/759806#M3450</link>
      <description>&lt;P&gt;Rob&lt;/P&gt;&lt;P&gt;Here you go. This is a reduced data set on the cog customers. I ran the model on this and still got infeasibility&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 20:51:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/759806#M3450</guid>
      <dc:creator>Santha</dc:creator>
      <dc:date>2021-08-05T20:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: MILP Infeasibility</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/759810#M3451</link>
      <description>&lt;P&gt;I get an optimal solution with that code and data:&lt;/P&gt;
&lt;PRE&gt;NOTE: Problem generation will use 4 threads.
NOTE: The problem has 6251 variables (0 free, 0 fixed).
NOTE: The problem has 6251 binary and 0 integer variables.
NOTE: The problem has 6373 linear constraints (5845 LE, 528 EQ, 0 GE, 0 range).
NOTE: The problem has 17939 linear constraint coefficients.
NOTE: The problem has 0 nonlinear constraints (0 LE, 0 EQ, 0 GE, 0 range).
NOTE: The OPTMODEL presolver is disabled for linear problems.
NOTE: The initial MILP heuristics are applied.
NOTE: The MILP presolver value AUTOMATIC is applied.
NOTE: The MILP presolver removed 135 variables and 97 constraints.
NOTE: The MILP presolver removed 258 constraint coefficients.
NOTE: The MILP presolver modified 0 constraint coefficients.
NOTE: The presolved problem has 6116 variables, 6276 constraints, and 17681 constraint
      coefficients.
NOTE: The MILP solver is called.
NOTE: The parallel Branch and Cut algorithm is used.
NOTE: The Branch and Cut algorithm is using up to 4 threads.
          Node   Active   Sols    BestInteger      BestBound      Gap    Time
             0        1      0              .       18457359        .       0
             0        1      1       18570314       18457359    0.61%       0
             0        1      2       18510332       18510332    0.00%       0
             0        0      2       18510332       18510332    0.00%       0
NOTE: The MILP solver added 7 cuts with 346 cut coefficients at the root.
NOTE: Optimal.
NOTE: Objective = 18510331.726.
284  quit;
NOTE: PROCEDURE OPTMODEL used (Total process time):
      real time           1.10 seconds
      cpu time            1.15 seconds
&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Aug 2021 21:10:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/759810#M3451</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2021-08-05T21:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: MILP Infeasibility</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/759812#M3452</link>
      <description>&lt;P&gt;can you try with p=60 ? and&amp;nbsp;&lt;/P&gt;&lt;P&gt;set CUSTOMERS_FACILITIES = {i in CUSTOMERS, j in FACILITIES: dist[i,j] &amp;lt;= 120};&lt;/P&gt;&lt;P&gt;this is what i got infeasible with this data set&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 21:18:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/759812#M3452</guid>
      <dc:creator>Santha</dc:creator>
      <dc:date>2021-08-05T21:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: MILP Infeasibility</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/759814#M3453</link>
      <description>&lt;P&gt;Yes, I get infeasible with p = 60.&amp;nbsp; In fact, even the LP relaxation is infeasible, as you can see by calling SOLVE RELAXINT.&amp;nbsp; Both LP IIS and MILP IIS do not return a particularly small IIS in this case, but here is an alternative approach that you might find helpful.&amp;nbsp; Omit the&amp;nbsp;Have_This_Many_FAC_OPEN constraint and instead minimize the number of facilities built:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*   con Have_This_Many_FAC_OPEN:
      Sum{j in FACILITIES} Build[j] &amp;lt;= p;

   min NumBuild = Sum{j in FACILITIES} Build[j];
   solve;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The MILP solver returns an optimal objective value of 61:&lt;/P&gt;
&lt;PRE&gt;NOTE: Problem generation will use 4 threads.
NOTE: The problem has 6251 variables (0 free, 0 fixed).
NOTE: The problem has 6251 binary and 0 integer variables.
NOTE: The problem has 6372 linear constraints (5844 LE, 528 EQ, 0 GE, 0 range).
NOTE: The problem has 17532 linear constraint coefficients.
NOTE: The problem has 0 nonlinear constraints (0 LE, 0 EQ, 0 GE, 0 range).
NOTE: The OPTMODEL presolver is disabled for linear problems.
NOTE: The initial MILP heuristics are applied.
NOTE: The MILP presolver value AUTOMATIC is applied.
NOTE: The MILP presolver removed 181 variables and 142 constraints.
NOTE: The MILP presolver removed 304 constraint coefficients.
NOTE: The MILP presolver modified 0 constraint coefficients.
NOTE: The presolved problem has 6070 variables, 6230 constraints, and 17228 constraint
      coefficients.
NOTE: The MILP solver is called.
NOTE: The parallel Branch and Cut algorithm is used.
NOTE: The Branch and Cut algorithm is using up to 4 threads.
          Node   Active   Sols    BestInteger      BestBound      Gap    Time
             0        1      4     81.0000000     60.5000000   33.88%       0
NOTE: The MILP solver's symmetry detection found 4527 orbits. The largest orbit contains 28
      variables.
             0        1      8     61.0000000     60.5000000    0.83%       0
             0        0      8     61.0000000     61.0000000    0.00%       0
NOTE: Optimal.
NOTE: Objective = 61.
&lt;/PRE&gt;
&lt;P&gt;So any value of p &amp;lt; 61 will make the problem infeasible.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another idea is to introduce explicit slack variables and minimize the sum of slacks.&amp;nbsp; Keep all of the original constraints, except replace the assign_def constraints as follows:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;   var Unassigned {CUSTOMERS} &amp;gt;= 0;
   con assign_def {i in CUSTOMERS}:
      sum {&amp;lt;(i),j&amp;gt; in CUSTOMERS_FACILITIES} Assign[i,j] + Unassigned[i] &amp;gt;= 1;
   min NumUnassignedCustomers = sum {i in CUSTOMERS} Unassigned[i];

   solve;
   print {i in CUSTOMERS: Unassigned[i].sol &amp;gt; 0.5} Unassigned;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The resulting optimal solution has optimal objective value 1, with Unassigned[73] = 1, which suggests changing something about customer 73 if you want the problem to be feasible.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 21:49:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/759814#M3453</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2021-08-05T21:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: MILP Infeasibility</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/759816#M3454</link>
      <description>&lt;P&gt;Rob&lt;/P&gt;&lt;P&gt;Ok . So we have two objectives? one is to minimize the build facilities. and another one is cost. Right?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 21:43:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/759816#M3454</guid>
      <dc:creator>Santha</dc:creator>
      <dc:date>2021-08-05T21:43:39Z</dc:date>
    </item>
    <item>
      <title>Re: MILP Infeasibility</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/759818#M3455</link>
      <description>&lt;P&gt;I like the first approach of minimizing the facilities. This implies that the cost will also be reduced. Pls correct me if I am wrong&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 21:52:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/759818#M3455</guid>
      <dc:creator>Santha</dc:creator>
      <dc:date>2021-08-05T21:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: MILP Infeasibility</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/759819#M3456</link>
      <description>&lt;P&gt;I have introduced two new objectives beyond your original objective, but the solver uses only one at a time.&amp;nbsp; By default, it uses the one that was declared last, but you can also use the OBJ option in the SOLVE statement to explicitly specify which objective to use.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 21:52:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/759819#M3456</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2021-08-05T21:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: MILP Infeasibility</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/759838#M3457</link>
      <description>&lt;P&gt;Thank you Rob very much. Appreciate your help as always&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 23:10:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/759838#M3457</guid>
      <dc:creator>Santha</dc:creator>
      <dc:date>2021-08-05T23:10:53Z</dc:date>
    </item>
    <item>
      <title>Re: MILP Infeasibility</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/759844#M3458</link>
      <description>&lt;P&gt;I am little confused. Now, we&amp;nbsp; have two objective functions.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;min Cost= sum {&amp;lt;i,j&amp;gt; in CUSTOMERS_FACILITIES} dist[i,j] * Assign[i,j]*demand[i];&lt;BR /&gt;min NumBuild = Sum{j in FACILITIES} Build[j];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since numbuild is the last , SAS solves for it. But if i Specify solve OBJECTIVE Cost, it would solve for the cost objective.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I want the model to do is to minimize both Cost and NumBuild really. So, in that case, if I solve for the NumBuild Objective it will not be optimial cost one obviously. So, can i specify both&amp;nbsp; like this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;solve with milp objective Cost,NumBuild /timetype=real;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 23:46:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/759844#M3458</guid>
      <dc:creator>Santha</dc:creator>
      <dc:date>2021-08-05T23:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: MILP Infeasibility</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/759845#M3459</link>
      <description>&lt;P&gt;Another option - Is it a good idea to run the min Numbuild objective function. Take that number and run the model for min cost?&amp;nbsp;&lt;/P&gt;&lt;P&gt;If yes, how do we do it?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 23:48:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/759845#M3459</guid>
      <dc:creator>Santha</dc:creator>
      <dc:date>2021-08-05T23:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: MILP Infeasibility</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/759853#M3460</link>
      <description>&lt;P&gt;No, the MILP solver optimizes only one objective at a time.&amp;nbsp; The black-box solver can handle multiple objectives, but with no guarantee of optimality.&amp;nbsp; See this doc example:&amp;nbsp;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/v_015/casmopt/casmopt_lsosolver_examples07.htm" target="_blank"&gt;SAS Help Center: Multiobjective Optimization&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Aug 2021 00:44:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/759853#M3460</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2021-08-06T00:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: MILP Infeasibility</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/759855#M3461</link>
      <description>&lt;P&gt;Yes, that is a natural approach when one objective is more important than the other.&amp;nbsp; Here's how you can do it:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc optmodel;
   set DIMS=1..2;
   set CUSTOMERS;
   set FACILITIES;
   num a {CUSTOMERS,DIMS};
   num demand {CUSTOMERS}; 

   num f {FACILITIES,DIMS};
   num SiteCapacity {FACILITIES};
   str FacilitySiteName {FACILITIES};

*   num p=60; /*Set how many Facilities you want to be OPENED*/

   read data /*ISURGCUS.*/COGcustomers into CUSTOMERS=
      [_N_] {d in DIMS} &amp;lt;a[_N_,d]=col('a'||d)&amp;gt; demand;

   read data /*ISURGCUS.*/cogExistingFacilities into FACILITIES=
      [_N_] {d in DIMS} &amp;lt;f[_N_,d]=col('f'||d)&amp;gt;FacilitySiteName;

   str SiteState{CUSTOMERS};
   read data /*ISURGCUS.*/COGcustomers into CUSTOMERS=
      [_N_] {d in DIMS} &amp;lt;a[_N_,d]=col('a'||d)&amp;gt; SiteState ;

   /* distance from customer i to facility j */
   num dist {i in CUSTOMERS, j in FACILITIES}
      = GEODIST(a[i,1],a[i,2],f[j,1],f[j,2],'M');

   set CUSTOMERS_FACILITIES = {i in CUSTOMERS, j in FACILITIES: dist[i,j] &amp;lt;= 120};
   var Assign {CUSTOMERS_FACILITIES} binary;
   var Build {FACILITIES} binary;

   /* each customer assigned to exactly one site */
   con assign_def {i in CUSTOMERS}:
      sum {&amp;lt;(i),j&amp;gt; in CUSTOMERS_FACILITIES} Assign[i,j] = 1;

   /* if customer i assigned to site j, then facility must be built at j */
   con link {&amp;lt;i,j&amp;gt; in CUSTOMERS_FACILITIES}:
      Assign[i,j] &amp;lt;= Build[j];

   min NumBuild = Sum{j in FACILITIES} Build[j];
   solve;

   num p;
   p = NumBuild;
   con Have_This_Many_FAC_OPEN:
      NumBuild &amp;lt;= p;

   min Cost
      = sum {&amp;lt;i,j&amp;gt; in CUSTOMERS_FACILITIES} dist[i,j] * Assign[i,j]*demand[i];
   solve with milp / primalin;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 Aug 2021 00:46:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/759855#M3461</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2021-08-06T00:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: MILP Infeasibility</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/759857#M3462</link>
      <description>&lt;P&gt;Rob&lt;/P&gt;&lt;P&gt;this is awesome. I was so glad that i was also on the same path coding. It worked perfectly fine the way I wanted to.&lt;/P&gt;&lt;P&gt;Thank you. You are simply amazing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Aug 2021 01:25:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/759857#M3462</guid>
      <dc:creator>Santha</dc:creator>
      <dc:date>2021-08-06T01:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: MILP Infeasibility</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/764566#M3482</link>
      <description>&lt;P&gt;Hi Rob&lt;/P&gt;&lt;P&gt;For the same model in this thread, I tried to do this and got "Out of memory" error&lt;/P&gt;&lt;PRE class="language-sas"&gt;&lt;CODE&gt;set CUSTOMERS_FACILITIES = {i in CUSTOMERS, j in FACILITIES: dist[i,j] &amp;lt;= 120};&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;what i want to do is for the model to pick exactly 2 facilities from a pool of candidate facilities.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So in order to do that I set this radius as like a big number like 3000 miles so that there model would solve. It gave me out of memory error. I understand that as giving a radius of 3000 miles means almost all possible combinations of faciliy- customer points. I tried to reduce that number to a point where it is like 550 or 600 then the model would not give me this "out of memory" error. But it would say infeasible which is understandable. So, how do i set this radius which I am using to pre_pick this CUSOMER_FACILITIES list within a certain range and yet solve this p number of facilities problem&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Aug 2021 20:34:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/764566#M3482</guid>
      <dc:creator>Santha</dc:creator>
      <dc:date>2021-08-27T20:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: MILP Infeasibility</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/764569#M3483</link>
      <description>&lt;P&gt;You can use the following statement to determine the smallest feasible distance threshold:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;   num threshold = min {j1 in FACILITIES, j2 in FACILITIES: j1 &amp;lt; j2} max {i in CUSTOMERS} min(dist[i,j1], dist[i,j2]);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This threshold value turns out to be&amp;nbsp;1018.4387857.&amp;nbsp; Now use threshold in the SET statement:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;   set CUSTOMERS_FACILITIES = {i in CUSTOMERS, j in FACILITIES: dist[i,j] &amp;lt;= threshold};
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The resulting solution has optimal objective value&amp;nbsp;375267751.16.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Aug 2021 21:10:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/MILP-Infeasibility/m-p/764569#M3483</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2021-08-27T21:10:36Z</dc:date>
    </item>
  </channel>
</rss>

