<?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: Unduplicated Reach in Mathematical Optimization, Discrete-Event Simulation, and OR</title>
    <link>https://communities.sas.com/t5/Mathematical-Optimization/Unduplicated-Reach/m-p/395778#M1990</link>
    <description>&lt;P&gt;You can introduce another binary variable IsCovered for each subject, a constraint that links IsCovered&amp;nbsp;to&amp;nbsp;Subset, and a new expression for the objective:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;var IsCovered{ID} binary;
/* if IsCovered[i] = 1 then Subset[p] = 1 for some p with units[i,p] &amp;gt; 0 */
con IsCoveredCon {i in ID}:
   IsCovered[i] &amp;lt;= sum {p in PRODUCTS: units[i,p] &amp;gt; 0} Subset[p];
max MktPenetration=sum{i in ID} IsCovered[i];
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 13 Sep 2017 21:54:52 GMT</pubDate>
    <dc:creator>RobPratt</dc:creator>
    <dc:date>2017-09-13T21:54:52Z</dc:date>
    <item>
      <title>Unduplicated Reach</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Unduplicated-Reach/m-p/395775#M1989</link>
      <description>&lt;P&gt;I am trying to find the optimal two products out of three (A,B,C) that maximizes total market penetration (i.e. unduplicated reach) in a specific market. The data below is an abbreviated example with just four subjects (01, 02, 03, 04) and three products (A,B,C).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The current program maximizes the penetration of each of the products separately (choosing A and B as the decision vars that maximize the obj. function). However I need to maximize the market penetration as a whole. A &amp;amp; B only provide a total market penetration of 75%, whereas A &amp;amp; C provide a total market penetration of 100%. I'm having difficulty converting my program from individual to total market penetration. Still being relatively new to OPTMODEL, any help you can provide is very much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data byPROD;
input Product $ ;
datalines;
A
B
C
;
run;

data byID;
input unID $ A B C;
datalines;
01 1 1 0
02 1 1 0
03 1 0 0
04 0 0 1
;
run;

proc optmodel;
set &amp;lt;str&amp;gt; ID, PRODUCTS;

num units {ID,PRODUCTS};

read data byPROD into PRODUCTS=[Product];
read data byID into ID=[unID] {p in PRODUCTS} &amp;lt;units[unID,p]=col(p)&amp;gt;;

num ProdSum{p in PRODUCTS}=sum{i in ID} units[i,p];

var Subset{PRODUCTS} &amp;gt;=0 binary;

max MktPenetration=sum{p in PRODUCTS} ProdSum[p]*Subset[p];

con OnlyTwo: sum{p in PRODUCTS} Subset[p]=2;

solve;

print Subset;

quit;&lt;/CODE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2017 21:46:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Unduplicated-Reach/m-p/395775#M1989</guid>
      <dc:creator>JustABitOutside</dc:creator>
      <dc:date>2017-09-13T21:46:38Z</dc:date>
    </item>
    <item>
      <title>Re: Unduplicated Reach</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Unduplicated-Reach/m-p/395778#M1990</link>
      <description>&lt;P&gt;You can introduce another binary variable IsCovered for each subject, a constraint that links IsCovered&amp;nbsp;to&amp;nbsp;Subset, and a new expression for the objective:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;var IsCovered{ID} binary;
/* if IsCovered[i] = 1 then Subset[p] = 1 for some p with units[i,p] &amp;gt; 0 */
con IsCoveredCon {i in ID}:
   IsCovered[i] &amp;lt;= sum {p in PRODUCTS: units[i,p] &amp;gt; 0} Subset[p];
max MktPenetration=sum{i in ID} IsCovered[i];
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Sep 2017 21:54:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Unduplicated-Reach/m-p/395778#M1990</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2017-09-13T21:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: Unduplicated Reach</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Unduplicated-Reach/m-p/395793#M1991</link>
      <description>&lt;P&gt;Wow, thank you for the quick response, Rob. Your addition was a major help. If in the byID data set I change row 03 column B to 1 from 0 (in code below), then both A&amp;amp;C and B&amp;amp;C provide 100% total market penetration.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data byID;
input unID $ A B C;
datalines;
01 1 1 0
02 1 1 0
03 1 1 0
04 0 0 1
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The updated OPTMODEL program chooses A&amp;amp;C as the optimal pair. Is there a way to show all combinations if more than one combination shares the optimal value?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2017 22:51:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Unduplicated-Reach/m-p/395793#M1991</guid>
      <dc:creator>JustABitOutside</dc:creator>
      <dc:date>2017-09-13T22:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: Unduplicated Reach</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Unduplicated-Reach/m-p/395804#M1992</link>
      <description>&lt;P&gt;Yes, you can use the &lt;A href="http://go.documentation.sas.com/?docsetId=ormpug&amp;amp;docsetVersion=14.2&amp;amp;docsetTarget=ormpug_clpsolver_syntax03.htm&amp;amp;locale=en#ormpug.clpsolver.syntax_findallsolns" target="_self"&gt;FINDALLSOLNS&lt;/A&gt; option with the CLP solver:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;solve with clp / findallsolns;

for {s in 1.._NSOL_} print {p in PRODUCTS} Subset[p].sol[s];
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might also be interested in this SAS Global Forum 2016 paper:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/resources/papers/proceedings16/SAS3161-2016.pdf&amp;nbsp;" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings16/SAS3161-2016.pdf&amp;nbsp;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2017 23:34:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Unduplicated-Reach/m-p/395804#M1992</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2017-09-13T23:34:20Z</dc:date>
    </item>
    <item>
      <title>Re: Unduplicated Reach</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Unduplicated-Reach/m-p/395833#M1993</link>
      <description>&lt;P&gt;Thanks, that's exactly what I was looking to do. Unfortunately I'm getting an error in my log (below).&amp;nbsp;I'm running PROC OPTMODEL in SAS EG 5.1, and your paper mentions the 'solve with CLP' option was released with SAS/OR 13.2, so it appears that I'm calling a pre-13.2 version of SAS/OR in EG. Do you know if that is the case?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nevertheless, thank you for your time. This has been a huge help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;57         solve with CLP / findallsolns;
                      ___
                      585
ERROR 585-782: Solver 'CLP' is unknown.

58         
59         for {s in 1.._NSOL_} print {p in PRODUCTS} Subset[p].sol[s];
                        ______                                     _
                        537                                        22
ERROR 537-782: The symbol '_NSOL_' is unknown.

ERROR 22-322: Expecting a name.  

60         
61         *solve;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Sep 2017 01:55:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Unduplicated-Reach/m-p/395833#M1993</guid>
      <dc:creator>JustABitOutside</dc:creator>
      <dc:date>2017-09-14T01:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: Unduplicated Reach</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Unduplicated-Reach/m-p/395937#M1994</link>
      <description>&lt;P&gt;Yes, it looks like you are running an old version of SAS/OR. &amp;nbsp;You can see which version by submitting the following code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc product_status;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Even SAS/OR 13.2 is three years old, with two additional releases (14.1 and 14.2) since then. &amp;nbsp;Also, SAS/OR 14.3 is coming out very soon!&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2017 14:43:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Unduplicated-Reach/m-p/395937#M1994</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2017-09-14T14:43:37Z</dc:date>
    </item>
  </channel>
</rss>

