<?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: Proc OPTMODEL: finding optimal pairs - handling infeasibility in Mathematical Optimization, Discrete-Event Simulation, and OR</title>
    <link>https://communities.sas.com/t5/Mathematical-Optimization/Proc-OPTMODEL-finding-optimal-pairs-handling-infeasibility/m-p/483719#M2347</link>
    <description>&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;Thanks for a quick reply!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first solution indeed should solve it. This however was just an example, so i need to write a code that works in all possible cases. But still, I could check which set, c1 or c2, has more observations and then conditionally define constraints, I suppose, so thanks for the tip!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The second solution, at a first glance seems like a default approach to this kind of problems. I'll dig deeper, thank you.&lt;/P&gt;&lt;P&gt;In terms of efficiency, is there any argument to stick to a specific approach?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jakub&lt;/P&gt;</description>
    <pubDate>Fri, 03 Aug 2018 10:22:42 GMT</pubDate>
    <dc:creator>J_Grabowski</dc:creator>
    <dc:date>2018-08-03T10:22:42Z</dc:date>
    <item>
      <title>Proc OPTMODEL: finding optimal pairs - handling infeasibility</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Proc-OPTMODEL-finding-optimal-pairs-handling-infeasibility/m-p/483475#M2345</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;Im fairly new to optmodel, so this may be newbie question, but i've already spent alot of time on this and would appreciate greatly if you could help me out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The objective:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I have two pools of clients that i am trying to pair based on some discreet criteria and their spend in a number of common weeks.&lt;/P&gt;&lt;P&gt;The objective is to find pairs that fulfill the criteria and minimize the sum of weekly differences between the pairs.&lt;/P&gt;&lt;P&gt;One client from each pool can&amp;nbsp; be assigned to no more then one client from another pool.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The problem:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The code i wrote works fine as long as we have enough clients from the second pool to find a match for every client from the first pool. When that's not true, either due to the criteria, or simply not enough clients in pool 2 to find a match for every client in the pool1, the problems becomes infeasible.&lt;/P&gt;&lt;P&gt;This is not the behavior i am trying to achieve - what i would like to see in a situtation when its impossible to find a match for all the clients from pool1 is matching the best possible ones(so the ones minimizing the sum of differnces) and leaving out the infeasible ones.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;An example:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I have prepared a simplified version of the code im using, that i think clearly showcases the problem:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*Creating Datasets*/

data weeks;
	do week = 201801 to 201810;
		output;
	end;
run;

/*5 clients in the first pool*/
data clients1;
	do client_id = 1 to 5;
		output;
	end;
run;

/*only 4 clients in the second pool*/
data clients2;
	do client_id = 101 to 104;
		output;
	end;
run;

data sales;
	do client_id = 1 to 5;
		do week = 201801 to 201810;
			flag="clients1";
			spends=1000*ranuni(1000);
			output;
		end;
	end;
	do client_id = 101 to 104;
		do week = 201801 to 201810;
			flag="clients2";
			spends=1000*ranuni(1000);
			output;
		end;
	end;
run;


proc optmodel;
	set weeks;
	read data weeks into weeks = [week];
		
	/*clients 1*/
	set clients1;
	read data clients1 into clients1 = [client_id];
	
	/*clients 2 spends per week */
	num spends1 {clients1, weeks} init 0;
	read data sales(where=(flag="clients1")) nomiss into [client_id week] spends1=spends;
	
	/*clients2*/
	set clients2;
	read data clients2 into clients2 = [client_id];

	/*clients 2 spends per week */
	num spends2 {clients2, weeks} init 0;
	read data sales(where=(flag="clients2")) nomiss into [client_id week] spends2=spends;
	
	/*clients 1,2 matrix*/
	set clientpairs = {c1 in clients1, c2 in clients2};
	
	/*calculating the sum of absolute differences for each possible c1,c2 combination*/
	impvar diff {&amp;lt;c1,c2&amp;gt; in clientpairs} = sum{w in weeks} abs(spends1[c1,w] - spends2[c2,w]);
	
	/*finding the combination that minimizes the total sum of differences*/	
	var match {clientpairs} binary;
	min total_diff = sum{&amp;lt;c1,c2&amp;gt; in clientpairs} diff[c1,c2]*match[c1,c2];
	/*each client1 is present once(here is the problem, but removing this contraint causes no pair to match - minimizes differences)*/
	con one_c1_max {c1 in clients1}:
		sum {&amp;lt;(c1),c2&amp;gt; in clientpairs} match[c1,c2] = 1;

	/*each client2 can not be matched to more than 1 client1*/
	con one_c2_max {c2 in clients2}:
		sum {&amp;lt;c1,(c2)&amp;gt; in clientpairs} match[c1,c2] &amp;lt;= 1;
	
	solve;

	create data res(where =(match = 1)) from [client1 client2] = {clients1, clients2} match diff;
	
quit;


proc sql;
select * from res;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Let me know if everything is clear and how you would approach this problem.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jakub&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EDIT: I see that the code doesnt display properly, ive attached the original version.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 16:43:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Proc-OPTMODEL-finding-optimal-pairs-handling-infeasibility/m-p/483475#M2345</guid>
      <dc:creator>J_Grabowski</dc:creator>
      <dc:date>2018-08-02T16:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: Proc OPTMODEL: finding optimal pairs - handling infeasibility</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Proc-OPTMODEL-finding-optimal-pairs-handling-infeasibility/m-p/483511#M2346</link>
      <description>&lt;P&gt;One way to get what you want is to interchange the &amp;lt;= 1 and = 1 in your two constraints, so that each client1 is matched at most once and each client2 is matched exactly once.&amp;nbsp; The resulting optimal objective value is then&amp;nbsp;10197.831456.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another approach is to instead use the network solver with the linear assignment algorithm (&lt;A href="http://go.documentation.sas.com/?docsetId=ormpug&amp;amp;docsetTarget=ormpug_networksolver_details18.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en" target="_blank"&gt;http://go.documentation.sas.com/?docsetId=ormpug&amp;amp;docsetTarget=ormpug_networksolver_details18.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en&lt;/A&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;set &amp;lt;num,num&amp;gt; ASSIGNMENTS;
solve with network / lap direction=directed links=(weight=diff) out=(assignments=ASSIGNMENTS);
create data res from [client1 client2] = ASSIGNMENTS diff;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;In that case, you can just omit the VAR, MIN, and CON statements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, it is more efficient to use NUM instead of IMPVAR when the right-hand side does not depend on variables:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* impvar diff {&amp;lt;c1,c2&amp;gt; in clientpairs} = sum{w in weeks} abs(spends1[c1,w] - spends2[c2,w]);*/
num diff {&amp;lt;c1,c2&amp;gt; in clientpairs} = sum{w in weeks} abs(spends1[c1,w] - spends2[c2,w]);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Finally, the WHERE condition match = 1 is dangerous because binary variables can be slightly fractional (up to INTTOL):&lt;/P&gt;
&lt;P&gt;&lt;A href="http://go.documentation.sas.com/?docsetId=ormpug&amp;amp;docsetTarget=ormpug_milpsolver_syntax02.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en#ormpug.milpsolver.milpcops" target="_blank"&gt;http://go.documentation.sas.com/?docsetId=ormpug&amp;amp;docsetTarget=ormpug_milpsolver_syntax02.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en#ormpug.milpsolver.milpcops&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is safer to use a loose comparison:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;create data res(where =(match &amp;gt; 0.5)) from [client1 client2] = {clients1, clients2} match diff;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Aug 2018 18:11:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Proc-OPTMODEL-finding-optimal-pairs-handling-infeasibility/m-p/483511#M2346</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2018-08-02T18:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: Proc OPTMODEL: finding optimal pairs - handling infeasibility</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Proc-OPTMODEL-finding-optimal-pairs-handling-infeasibility/m-p/483719#M2347</link>
      <description>&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;Thanks for a quick reply!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first solution indeed should solve it. This however was just an example, so i need to write a code that works in all possible cases. But still, I could check which set, c1 or c2, has more observations and then conditionally define constraints, I suppose, so thanks for the tip!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The second solution, at a first glance seems like a default approach to this kind of problems. I'll dig deeper, thank you.&lt;/P&gt;&lt;P&gt;In terms of efficiency, is there any argument to stick to a specific approach?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jakub&lt;/P&gt;</description>
      <pubDate>Fri, 03 Aug 2018 10:22:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Proc-OPTMODEL-finding-optimal-pairs-handling-infeasibility/m-p/483719#M2347</guid>
      <dc:creator>J_Grabowski</dc:creator>
      <dc:date>2018-08-03T10:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: Proc OPTMODEL: finding optimal pairs - handling infeasibility</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Proc-OPTMODEL-finding-optimal-pairs-handling-infeasibility/m-p/483785#M2348</link>
      <description>&lt;P&gt;Yes, you can decide which constraint should be &amp;lt;= 1 by comparing the cardinalities of the two sets.&amp;nbsp; In fact, the linear assignment algorithm does this for you automatically, as described in the documentation link I put in my first reply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The network solver with the linear assignment algorithm is more efficient (and requires less PROC OPTMODEL code) than the MILP solver for this type of problem.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Aug 2018 14:16:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Proc-OPTMODEL-finding-optimal-pairs-handling-infeasibility/m-p/483785#M2348</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2018-08-03T14:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: Proc OPTMODEL: finding optimal pairs - handling infeasibility</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Proc-OPTMODEL-finding-optimal-pairs-handling-infeasibility/m-p/483814#M2349</link>
      <description>&lt;P&gt;Thanks Rob, I know what to do now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jakub&lt;/P&gt;</description>
      <pubDate>Fri, 03 Aug 2018 15:11:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Proc-OPTMODEL-finding-optimal-pairs-handling-infeasibility/m-p/483814#M2349</guid>
      <dc:creator>J_Grabowski</dc:creator>
      <dc:date>2018-08-03T15:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: Proc OPTMODEL: finding optimal pairs - handling infeasibility</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Proc-OPTMODEL-finding-optimal-pairs-handling-infeasibility/m-p/484180#M2350</link>
      <description>&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have one more question, if you don't mind:&lt;/P&gt;&lt;P&gt;So i have been trying to implement the network solver solution you've suggested and i've ran into another problem.&lt;/P&gt;&lt;P&gt;When looking for the client pairs, I would like to only choose from pairs in which the difference of sum of spends from all the weeks is no bigger than 10%.&lt;/P&gt;&lt;P&gt;I can see that there are quite a few pairs like that, however, when im trying to solve it using modified "diff" as links i get an error that the linear assignment problem is infeasible (104 rows are unassigned).&lt;/P&gt;&lt;P&gt;When i tried using subgraph option for links the effect was the same.&lt;/P&gt;&lt;P&gt;Can you help me understand the reason behind it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below you can find the new code. I 've modified it slightly, to get more observations and to calculate the total difference.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro lap;
%let cl1=200;
%let cl2=700;

/*Creating Datasets*/

data weeks;
	do week = 201801 to 201810;
		output;
	end;
run;

data clients1;
	do client_id = 1 to &amp;amp;cl1;
		output;
	end;
run;

data clients2;
	do client_id = 1001 to %eval(1000+&amp;amp;cl2);
		output;
	end;
run;

data sales;
	do client_id = 1 to &amp;amp;cl1;
		do week = 201801 to 201810;
			flag="clients1";
			spends=1000*ranuni(1000);
			output;
		end;
	end;
	do client_id = 1001 to %eval(1000+&amp;amp;cl2);
		do week = 201801 to 201810;
			flag="clients2";
			spends=1000*ranuni(1000)*ranuni(2000);
			output;
		end;
	end;
run;


proc optmodel;
	set weeks;
	read data weeks into weeks = [week];
		
	/*clients 1*/
	set clients1;
	read data clients1 into clients1 = [client_id];
	

	num spends1 {clients1, weeks} init 0;
	read data sales(where=(flag="clients1")) nomiss into [client_id week] spends1=spends;
	
	/*clients2*/
	set clients2;
	read data clients2 into clients2 = [client_id];

	/*clients 2 spends per week */
	num spends2 {clients2, weeks} init 0;
	read data sales(where=(flag="clients2")) nomiss into [client_id week] spends2=spends;
	
	/*clients 1,2 matrix*/
	set clientpairs = {c1 in clients1, c2 in clients2};
	
	/*NEW!! Calculating the total difference between each store	*/
	num total_diff {&amp;lt;c1,c2&amp;gt; in clientpairs} = abs((sum {w in weeks} spends1[c1,w]) - (sum{w in weeks} spends2[c2,w]))/(sum{w in weeks} spends1[c1,w]);
	
	/*calculating the sum of absolute differences for each possible c1,c2 combination*/
	/*NEW!! Limited to pairs within 10% total sales difference*/
	num diff {&amp;lt;c1,c2&amp;gt; in clientpairs : total_diff[c1,c2] &amp;lt;= 0.1} = sum{w in weeks} abs(spends1[c1,w] - spends2[c2,w]);
	
	set &amp;lt;num,num&amp;gt; ASSIGNMENTS;
	solve with network / lap direction=directed links=(weight=diff) out=(assignments=ASSIGNMENTS);
	create data res from [client1 client2] = ASSIGNMENTS diff;

quit;


proc sql;
select * from res;
quit;

%mend;
%lap&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jakub&lt;/P&gt;</description>
      <pubDate>Sun, 05 Aug 2018 16:47:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Proc-OPTMODEL-finding-optimal-pairs-handling-infeasibility/m-p/484180#M2350</guid>
      <dc:creator>J_Grabowski</dc:creator>
      <dc:date>2018-08-05T16:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: Proc OPTMODEL: finding optimal pairs - handling infeasibility</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Proc-OPTMODEL-finding-optimal-pairs-handling-infeasibility/m-p/484193#M2352</link>
      <description>&lt;P&gt;Here, clients1 is the smaller set, so each c1 in clients1 is supposed to be matched exactly once.&amp;nbsp; But many such clients have no outgoing links, as you can verify by running the following statements:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;   num out_degree {c1 in clients1} = card({&amp;lt;(c1),c2&amp;gt; in clientpairs: total_diff[c1,c2] &amp;lt;= 0.1});
   put ({c1 in clients1: out_degree[c1] = 0});
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 05 Aug 2018 18:39:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Proc-OPTMODEL-finding-optimal-pairs-handling-infeasibility/m-p/484193#M2352</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2018-08-05T18:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: Proc OPTMODEL: finding optimal pairs - handling infeasibility</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Proc-OPTMODEL-finding-optimal-pairs-handling-infeasibility/m-p/484205#M2353</link>
      <description>&lt;P&gt;Indeed, there a quite a few clients1 with 0 links and these are the ones i wanted to exclude from the start, as they have no potential matches within the 10% difference.&lt;/P&gt;&lt;P&gt;I am not sure how to make the solver try to find matches only for the remaining clients.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 05 Aug 2018 20:45:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Proc-OPTMODEL-finding-optimal-pairs-handling-infeasibility/m-p/484205#M2353</guid>
      <dc:creator>J_Grabowski</dc:creator>
      <dc:date>2018-08-05T20:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Proc OPTMODEL: finding optimal pairs - handling infeasibility</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Proc-OPTMODEL-finding-optimal-pairs-handling-infeasibility/m-p/484218#M2354</link>
      <description>&lt;P&gt;The problem is infeasible, even after removing those c1 with no links.&amp;nbsp; It sounds like you really have two objectives:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;maximize the number of matches&lt;/LI&gt;
&lt;LI&gt;minimize the cost of making that many matches&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;The following code calls the network solver twice (once per objective) on a network that includes an additional source node and sink node:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;   /* maximize flow out of source */
   set CLIENTS = clients1 union clients2;
   num source = min {c in CLIENTS} c - 1;
   num sink   = max {c in CLIENTS} c + 1;
   set NODES = CLIENTS union {source,sink};
   num supply_lower {i in NODES} init (if i = sink   then -card(CLIENTS) else 0);
   num supply_upper {i in NODES} init (if i = source then  card(CLIENTS) else 0);
   set LINKS = ({source} cross clients1) union clientpairs2 union (clients2 cross {sink});
   num cost {&amp;lt;i,j&amp;gt; in LINKS} init (if i = source then -1 else 0);
   num link_upper {LINKS} = 1;
   solve with network / mcf direction=directed 
      links=(weight=cost upper=link_upper) nodes=(lower=supply_lower upper=supply_upper);

   /* minimize cost to send maximum flow from source */
   supply_lower[source] = -_OROPTMODEL_NUM_['OBJECTIVE'];
   supply_upper[source] = -_OROPTMODEL_NUM_['OBJECTIVE'];
   for {&amp;lt;i,j&amp;gt; in LINKS} cost[i,j] = (if &amp;lt;i,j&amp;gt; in clientpairs2 then diff[i,j] else 0);
   num flow {LINKS};
   solve with network / mcf direction=directed 
      links=(weight=cost upper=link_upper) nodes=(lower=supply_lower upper=supply_upper) out=(flow=flow);
   create data res from [client1 client2] = {&amp;lt;i,j&amp;gt; in clientpairs2: flow[i,j] &amp;gt; 0.5} diff;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The maximum number of matches is 55, and the resulting minimum cost is&amp;nbsp;97847.800403.&lt;/P&gt;</description>
      <pubDate>Sun, 05 Aug 2018 22:35:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Proc-OPTMODEL-finding-optimal-pairs-handling-infeasibility/m-p/484218#M2354</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2018-08-05T22:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: Proc OPTMODEL: finding optimal pairs - handling infeasibility</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Proc-OPTMODEL-finding-optimal-pairs-handling-infeasibility/m-p/484298#M2355</link>
      <description>&lt;P&gt;Thanks, that makes sense.&lt;/P&gt;&lt;P&gt;I was thinking that indeed it might require two objectives.&lt;/P&gt;&lt;P&gt;Thanks again for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jakub&lt;/P&gt;</description>
      <pubDate>Mon, 06 Aug 2018 09:53:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Proc-OPTMODEL-finding-optimal-pairs-handling-infeasibility/m-p/484298#M2355</guid>
      <dc:creator>J_Grabowski</dc:creator>
      <dc:date>2018-08-06T09:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: Proc OPTMODEL: finding optimal pairs - handling infeasibility</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Proc-OPTMODEL-finding-optimal-pairs-handling-infeasibility/m-p/484370#M2356</link>
      <description>&lt;P&gt;Rob, sorry to bother you again, but im getting an error, when trying to run your code:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/22245iA29DF5C6FC42B63F/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Also, whats clientpairs2 in your code?&lt;/P&gt;&lt;P&gt;I assume its the client pairs for which the total difference is not bigger than 10%?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jakub&lt;/P&gt;</description>
      <pubDate>Mon, 06 Aug 2018 14:43:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Proc-OPTMODEL-finding-optimal-pairs-handling-infeasibility/m-p/484370#M2356</guid>
      <dc:creator>J_Grabowski</dc:creator>
      <dc:date>2018-08-06T14:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: Proc OPTMODEL: finding optimal pairs - handling infeasibility</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Proc-OPTMODEL-finding-optimal-pairs-handling-infeasibility/m-p/484377#M2357</link>
      <description>&lt;P&gt;Sorry that I omitted this part of the code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;	set clientpairs2 = {&amp;lt;c1,c2&amp;gt; in clientpairs : total_diff[c1,c2] &amp;lt;= 0.1};
	num diff {&amp;lt;c1,c2&amp;gt; in clientpairs2} = sum{w in weeks} abs(spends1[c1,w] - spends2[c2,w]);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;It looks like you are using an older release of SAS/OR in which the NODES= option LOWER was called WEIGHT and UPPER was called WEIGHT2.&amp;nbsp; Please try again using those old option names instead.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Aug 2018 14:31:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Proc-OPTMODEL-finding-optimal-pairs-handling-infeasibility/m-p/484377#M2357</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2018-08-06T14:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: Proc OPTMODEL: finding optimal pairs - handling infeasibility</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Proc-OPTMODEL-finding-optimal-pairs-handling-infeasibility/m-p/484388#M2358</link>
      <description>It works now, thanks!</description>
      <pubDate>Mon, 06 Aug 2018 14:45:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Proc-OPTMODEL-finding-optimal-pairs-handling-infeasibility/m-p/484388#M2358</guid>
      <dc:creator>J_Grabowski</dc:creator>
      <dc:date>2018-08-06T14:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: Proc OPTMODEL: finding optimal pairs - handling infeasibility</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Proc-OPTMODEL-finding-optimal-pairs-handling-infeasibility/m-p/484814#M2359</link>
      <description>&lt;P&gt;This formulation uses the constraint solver with the ELEMENT and ALLDIFFERENT predicates to solve the original problem; the newer requirements haven't been addressed here, but it might be worth considering.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Aug 2018 16:21:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Proc-OPTMODEL-finding-optimal-pairs-handling-infeasibility/m-p/484814#M2359</guid>
      <dc:creator>lipury</dc:creator>
      <dc:date>2018-08-07T16:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: Proc OPTMODEL: finding optimal pairs - handling infeasibility</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Proc-OPTMODEL-finding-optimal-pairs-handling-infeasibility/m-p/485061#M2360</link>
      <description>&lt;P&gt;Great, thanks, i'll have a look!&lt;/P&gt;&lt;P&gt;As im not very experienced with the procedure, its good to see a few approaches.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jakub&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2018 09:41:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Proc-OPTMODEL-finding-optimal-pairs-handling-infeasibility/m-p/485061#M2360</guid>
      <dc:creator>J_Grabowski</dc:creator>
      <dc:date>2018-08-08T09:41:11Z</dc:date>
    </item>
  </channel>
</rss>

