This widget could not be displayed.
This widget could not be displayed.
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.

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
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.

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
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.

Hi,

 

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

 

Thanks,

 

Michael

This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.

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.

This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.

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.

 

This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.

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

This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.

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.

 

 

This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.

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.

This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.

Thank for the explanation  RobPratt.

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

 

Thanks,
Kiran.

 

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!

Register now

This widget could not be displayed.
This widget could not be displayed.
Discussion stats
  • 7 replies
  • 2733 views
  • 1 like
  • 4 in conversation
This widget could not be displayed.
This widget could not be displayed.