BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
kumargupt
Calcite | Level 5

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.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
RobPratt
SAS Super FREQ

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

7 REPLIES 7
berlinnov
SAS Employee

Hi,

 

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

 

Thanks,

 

Michael

kumargupt
Calcite | Level 5

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.

Kurt_Bremser
Super User

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.

 

berlinnov
SAS Employee

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

kumargupt
Calcite | Level 5

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.

 

 

RobPratt
SAS Super FREQ

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.

kumargupt
Calcite | Level 5

Thank for the explanation  RobPratt.

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

 

Thanks,
Kiran.

 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

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