<?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: Integer quadratic solver in PROC OPTMODEL? in Mathematical Optimization, Discrete-Event Simulation, and OR</title>
    <link>https://communities.sas.com/t5/Mathematical-Optimization/Integer-quadratic-solver-in-PROC-OPTMODEL/m-p/746116#M3417</link>
    <description>&lt;P&gt;Thanks, Rob.&amp;nbsp; I'll try your suggestion.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Gene&lt;/P&gt;</description>
    <pubDate>Sun, 06 Jun 2021 20:13:14 GMT</pubDate>
    <dc:creator>genemroz</dc:creator>
    <dc:date>2021-06-06T20:13:14Z</dc:date>
    <item>
      <title>Integer quadratic solver in PROC OPTMODEL?</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Integer-quadratic-solver-in-PROC-OPTMODEL/m-p/746101#M3413</link>
      <description>&lt;P&gt;I'm trying to implement an algorithm in Proc Optmodel that has a quadratic term and, I believe, requires the application of integer quadratic programming.&amp;nbsp; Proc Optmodel produces an error message that the "QP solver does not allow integer variables. The LSO solver might be suitable for this problem".&amp;nbsp; But when I attempt to solve with the LSO solver, I get an "out of memory"&amp;nbsp; error message.&amp;nbsp; The relevant code for Proc Optmodel is below.&amp;nbsp; I would appreciate any guidance on this issue.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Gene&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc optmodel;
/* Read CoverageMatrix data into index sets*/
	set &amp;lt;str&amp;gt; stations;
	read data socal.stationdataexisting  into stations=[station];
	set &amp;lt;str&amp;gt; ORIENTATIONS=/'NOHI' 'NOMD' 'NOLO' 
	'NEHI' 'NEMD' 'NELO' 
	'SEHI' 'SEMD' 'SELO' 
	'SOHI' 'SOMD' 'SOLO' 
	'SWHI' 'SWMD' 'SWLO' 
	'NWHI' 'NWMD' 'NWLO'/;
	set &amp;lt;num&amp;gt; TARGETS;
	read data work.targets into TARGETS=[target];
	num Matrix {stations, ORIENTATIONS, TARGETS};
	read data work.CoverageMatrixOpt into [station orientation target] Matrix=k;
	
/* Set Constants*/
	
	%Let N=3; /*number of stations*/
	num N=&amp;amp;N;
	

/*Declare Variables*/
	/* Sadik Equation 11--Sets CHI as binary variable that is 1 when using station i and POSITION j else 0.*/ 
 
	var CHI {stationS,ORIENTATIONS} binary;

	/*Sadik Equation 9.*/

	var PSI{TARGETS} integer &amp;lt;=3;

/* Declare Model*/

	/*Sadik Equation 7--the function to be minimized where 3 is constant k (max value of variable PSI{TARGETS}*/
	
	minimize OptCoverage=sum{target in TARGETS} (3-Psi[target])**2
	-sum{station in stations, orientation in ORIENTATIONS}Chi[station,orientation];

/*Subject to Following Constraints*/

	con CHI_constraint {station in stations}: 
	sum{orientation in ORIENTATIONS}CHI[station,orientation] &amp;lt;=1;

/* Sadik Equation 8*/
	
		var XIT{TARGETS} integer;
		
	con XIT_CON1{target in TARGETS}:
   XIT[target]=sum{station in stations, orientation in ORIENTATIONS}
               matrix[station, orientation, target] * Chi[station,orientation];
	
	
	/*XIT_N[target]= XIT[target]/N;*/

	con XIT_CON2{target in TARGETS}:XIT[target]/N &amp;lt;= PSI[target];
	
	
	con XIT_CON3{target in TARGETS}:PSI[target] &amp;lt;= XIT[target];
	

/* Call Solver and Save Results*/
	solve;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 06 Jun 2021 17:17:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Integer-quadratic-solver-in-PROC-OPTMODEL/m-p/746101#M3413</guid>
      <dc:creator>genemroz</dc:creator>
      <dc:date>2021-06-06T17:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: Integer quadratic solver in PROC OPTMODEL?</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Integer-quadratic-solver-in-PROC-OPTMODEL/m-p/746102#M3414</link>
      <description>&lt;P&gt;Can you please also provide the input data sets?&lt;/P&gt;</description>
      <pubDate>Sun, 06 Jun 2021 18:13:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Integer-quadratic-solver-in-PROC-OPTMODEL/m-p/746102#M3414</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2021-06-06T18:13:01Z</dc:date>
    </item>
    <item>
      <title>Re: Integer quadratic solver in PROC OPTMODEL?</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Integer-quadratic-solver-in-PROC-OPTMODEL/m-p/746111#M3415</link>
      <description>&lt;P&gt;Rob,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your prompt response.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't know the preferred way for posters like myself to send large datasets in support of questions like the one I posted today.&amp;nbsp; I started to winnow down the size of the dataset in the hope of finding a more manageable size and discovered that the LSO Solver would run on a smaller subset without an "out of memory" error so obviously problem #1 is that the dataset is too large for SAS OnDemad for Academics. But the LSO Solver also reported the "best solution found does not satisfy the feasibility tolerance".&amp;nbsp; Not exactly sure what that means but it appears to suggest I'm heading down a dark alley to a dead end anyway.&amp;nbsp; So I'll terminate this thread for now until I can come up with a better posed question.&amp;nbsp; And I thank you again for your generous offer to help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Gene&lt;/P&gt;</description>
      <pubDate>Sun, 06 Jun 2021 19:48:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Integer-quadratic-solver-in-PROC-OPTMODEL/m-p/746111#M3415</guid>
      <dc:creator>genemroz</dc:creator>
      <dc:date>2021-06-06T19:48:37Z</dc:date>
    </item>
    <item>
      <title>Re: Integer quadratic solver in PROC OPTMODEL?</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Integer-quadratic-solver-in-PROC-OPTMODEL/m-p/746114#M3416</link>
      <description>&lt;P&gt;Here's an approach that linearizes the quadratic objective so that you can use the MILP solver:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;CODE class=" language-sas"&gt;   num k = 3;
   var Psi {TARGETS} integer &amp;lt;= k;
   set VALUES = 0..k;
   var IsValue {TARGETS, VALUES} binary;
   con OneValue {t in TARGETS}:
      sum {v in VALUES} IsValue[t,v] = 1;
   con LinkIsValuePsi {t in TARGETS}:
      sum {v in VALUES} v*IsValue[t,v] = Psi[t];
   minimize OptCoverage = sum{t in TARGETS, v in VALUES} (k-v)^2 * IsValue[t,v]
	-sum{station in STATIONS, orientation in ORIENTATIONS} Chi[station,orientation];&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 06 Jun 2021 20:03:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Integer-quadratic-solver-in-PROC-OPTMODEL/m-p/746114#M3416</guid>
      <dc:creator>RobPratt</dc:creator>
      <dc:date>2021-06-06T20:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: Integer quadratic solver in PROC OPTMODEL?</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/Integer-quadratic-solver-in-PROC-OPTMODEL/m-p/746116#M3417</link>
      <description>&lt;P&gt;Thanks, Rob.&amp;nbsp; I'll try your suggestion.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Gene&lt;/P&gt;</description>
      <pubDate>Sun, 06 Jun 2021 20:13:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/Integer-quadratic-solver-in-PROC-OPTMODEL/m-p/746116#M3417</guid>
      <dc:creator>genemroz</dc:creator>
      <dc:date>2021-06-06T20:13:14Z</dc:date>
    </item>
  </channel>
</rss>

