Operations Research topics: SAS/OR,
SAS Optimization, and SAS Simulation Studio

warning messages in SAS PROC OPTMODEL when migrated to 9.4

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 8
Accepted Solution

warning messages in SAS PROC OPTMODEL when migrated to 9.4

We are migrating from SAS 9.2 to 9.4

while executing the PROC OPTMODEL in 9.4 receiving the following warning message.

 

WARNING 852-782: Explicit bounds override the default bounds of binary variable 'art'.

 

But No warning message was populated in 9.2

We are using same input files, same sas code in both 9.2 & 9.4

 

Please suggest how to solve this WARNING MESSAGE.

Quick solution/reply will be highliy appreciated.

 

 


Accepted Solutions
Solution
‎05-12-2017 05:15 AM
SAS Employee
Posts: 448

Re: warning messages in SAS PROC OPTMODEL when migrated to 9.4

That warning message was introduced in SAS/OR 14.1 (SAS 9.4M3) to clarify the behavior in cases like the following:

   var x binary <= 2;

A call of the EXPAND statement confirms that the upper bound changes from 1 to 2:

SAS Output

Var x INTEGER >= 0 <= 2

 

In your case, the >= 0 is redundant, and Michael correctly identified that removing it avoids the warning message.

 

Yes, SAS/OR has had several releases since 9.2, and in each new release PROC OPTMODEL usually contains a few additional features and performance improvements.  In the SAS/OR documentation, you can check the "What's New in SAS/OR" tab for each release to see the major changes.

View solution in original post


All Replies
SAS Employee
Posts: 15

Re: warning messages in SAS PROC OPTMODEL when migrated to 9.4

Hi,

 

Do you have the possibility of adding code/data to the thread to help us help you investigate?

 

Thanks,

 

Michael

Occasional Contributor
Posts: 8

Re: warning messages in SAS PROC OPTMODEL when migrated to 9.4

Refer the attached txt file for the code that is generating this Warning message in 9.4

As I said; same code was used in 9.2 and NO Warning messages.

Super User
Posts: 7,100

Re: warning messages in SAS PROC OPTMODEL when migrated to 9.4

Use the "little running man" icon to post SAS code. No need for attached files, unless the code is really long.

proc optmodel ;
/* output tables */
 ods output SolutionSummary=&libstage..solution_status ;
/* declare index set */
set<str> artikel;
/* declare variables */
 var art{artikel} >= 0 binary ;
/* objective function */
num composed_meas{artikel};
max f=sum{i in artikel}composed_meas[i]*art[i];
/* constraints */
str artikelgroep {artikel};
str subgroep {artikel};
num diepte{artikel};
num basis_bit {artikel};
num op_rack_bit {artikel};
num basic_bit {artikel};
num verplicht {artikel};
num verboden {artikel};
num _BONI_MIN_EVD {artikel};
num _NM_MIN_BONI {artikel};
num _NM_MIN_EVD {artikel};
%do j=1 %to &n_artgr.;
num artgroep_&j {artikel};
%end;
%do s=1 %to &n_link.;
 num link_&s. {artikel};
%end;
num min_diepte;
%do l=1 %to &x.;
 &&con&l.;
%end;
/* read parameters */
 read data &libstage..basis into artikel=[artikelnaam_nl] artikelgroep subgroep composed_meas diepte 
op_rack_bit verboden
basic_bit basis_bit verplicht
%do s=1 %to &n_link.;
 link_&s.
%end;
_BONI_MIN_EVD _NM_MIN_BONI _NM_MIN_EVD
%do j=1 %to &n_artgr;
artgroep_&j.
%end;
;
/* solve and print the optimal solution */
 solve with milp / printfreq=1 relobjgap=0 absobjgap=0 maxtime=100; /* print each iteration to log */
 create data &libstage..solution from [artikelnaam_nl] art;
quit;

There must be a macro definition wrapped around this code, as you use macro loops. I suggest you post the whole macro and how the macro is called, so testers can set the same parameters.

 

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
SAS Employee
Posts: 15

Re: warning messages in SAS PROC OPTMODEL when migrated to 9.4

[ Edited ]

You could try declaring the 'art' variable as such

 

 

var art{artikel} binary ;

 

i.e. ommit the >=0 part. That should remove the warning in 9.4

 

thanks,

 

Michael

Occasional Contributor
Posts: 8

Re: warning messages in SAS PROC OPTMODEL when migrated to 9.4

Thanks. It works.

Could you please share some info why there are no warning message in 9.2 (but in 9.4)?

Is anything changed in 9.4 for PROC OPTMODEL ?

This information is much needed for Upgrade project.
Because we are using the PROC OPTMODEL in two more scripts for different requirement.

 

Thanks,
Kiran.

 

 

Solution
‎05-12-2017 05:15 AM
SAS Employee
Posts: 448

Re: warning messages in SAS PROC OPTMODEL when migrated to 9.4

That warning message was introduced in SAS/OR 14.1 (SAS 9.4M3) to clarify the behavior in cases like the following:

   var x binary <= 2;

A call of the EXPAND statement confirms that the upper bound changes from 1 to 2:

SAS Output

Var x INTEGER >= 0 <= 2

 

In your case, the >= 0 is redundant, and Michael correctly identified that removing it avoids the warning message.

 

Yes, SAS/OR has had several releases since 9.2, and in each new release PROC OPTMODEL usually contains a few additional features and performance improvements.  In the SAS/OR documentation, you can check the "What's New in SAS/OR" tab for each release to see the major changes.

Occasional Contributor
Posts: 8

Re: warning messages in SAS PROC OPTMODEL when migrated to 9.4

Thank for the explanation  RobPratt.

Thanks to both of you (Michael  & RobPratt) for the quick updates.
Have A nice weekend.

 

Thanks,
Kiran.

 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 7 replies
  • 219 views
  • 1 like
  • 4 in conversation