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

PROC OPTMODEL for MULTIPLE solutions????

Accepted Solution Solved
Reply
Contributor
Posts: 29
Accepted Solution

PROC OPTMODEL for MULTIPLE solutions????

I am working on an assignment problem using PROC OPTMODEL which is likely to have multiple solutions which are all equally optimized. Given such a situation, is it possible for PROC OPTMODEL to generate one solution in one run of the optimization program and another solution given another run of the optimization program?

 

I am thinking of something like a random seed. Each random seed leads to a different flow of numerical values which next lead to a different solution. I am not sure if PROC OPTMODEL allows something like a random seed??


Accepted Solutions
Solution
‎02-09-2016 03:15 PM
SAS Employee
Posts: 454

Re: PROC OPTMODEL for MULTIPLE solutions????

You will get that error even if you just declare continuous variables.  Please try commenting out those declarations and any other statements that use those variables.

View solution in original post


All Replies
SAS Employee
Posts: 454

Re: PROC OPTMODEL for MULTIPLE solutions????

The CLP solver in PROC OPTMODEL can return all or some specified number of optimal solutions.  You can use either the FINDALLSOLNS option or the MAXSOLNS= option in the SOLVE WITH CLP statement:

http://support.sas.com/documentation/cdl/en/ormpug/68156/HTML/default/viewer.htm#ormpug_clpsolver_sy...

Contributor
Posts: 29

Re: PROC OPTMODEL for MULTIPLE solutions????

Hi Rob:

 

Thank you for your promot reply. I did replace the CLP solver with the MILP solver by using: solve with clp obj objfun /  FINDALLSOLNS;

 

However, I got an error message: ERROR: The CLP solver does not allow continuous variables.

 

Based on the SAS log information (found below), I only have binary variables, no continuous variables at all. The only place that might contain continuous variables is the objective function which linearizes an absolute value operation by using surplus and slack. However, the same error message continues even when I disable the objective function by using: solve with clp noobjective /  FINDALLSOLNS;

 

NOTE: Problem generation will use 4 threads.
NOTE: The problem has 15006 variables (0 free, 0 fixed).
NOTE: The problem uses 1 implicit variables.
NOTE: The problem has 15000 binary and 0 integer variables.
NOTE: The problem has 5012 linear constraints (5003 LE, 6 EQ, 3 GE, 0 range).
NOTE: The problem has 67224 linear constraint coefficients.
NOTE: The problem has 0 nonlinear constraints (0 LE, 0 EQ, 0 GE, 0 range).
NOTE: The OPTMODEL presolver removed 0 variables, 0 linear constraints, and 0 nonlinear constraints.

Solution
‎02-09-2016 03:15 PM
SAS Employee
Posts: 454

Re: PROC OPTMODEL for MULTIPLE solutions????

You will get that error even if you just declare continuous variables.  Please try commenting out those declarations and any other statements that use those variables.

Contributor
Posts: 29

Re: PROC OPTMODEL for MULTIPLE solutions????

Thank you, Rob.

 

What you said worked perfectly.

 

I removed all variables which are listed after the VAR statement but without a BINARY option. I also removed all those lines of code which use those variables. The code is able to run.

 

Thank yo so much.

SAS Employee
Posts: 454

Re: PROC OPTMODEL for MULTIPLE solutions????

I'm glad to help.  I should also mention that I will be presenting a paper on multiple solutions in PROC OPTMODEL at SAS Global Forum 2016 in April:

http://www.sas.com/en_us/events/sas-global-forum/sas-global-forum-2016.html

 

Contributor
Posts: 29

Re: PROC OPTMODEL for MULTIPLE solutions????

Hi Rob:

 

I wish I could go to listen to your talk which I am confident would be very helpful to me, provided that the company would fund me with money and time. :-)

 

Do you think your talk would be posted online as a whitepaper or posted on Youtube sometime in the future? I have so far taught myself PROC OPTMODEL by viewing the Youtube videos and the whitepapers that you posted online. They are really helpful to me. I could find only one book dedicated to SAS/OR for optimization which is not as helpful as the videos and whitepapers.

SAS Employee
Posts: 454

Re: PROC OPTMODEL for MULTIPLE solutions????

[ Edited ]

Yes, the paper will be available online as part of the conference proceedings.  Until then, here are a few other links to resources that might be helpful for you to learn PROC OPTMODEL:

 

Papers and slides:

http://support.sas.com/rnd/app/or/papers/index.html

 

Official documentation, especially Mathematical Programming Examples:

http://support.sas.com/documentation/onlinedoc/or/index.html

 

PROC OPTMODEL course:

https://support.sas.com/edu/schedules.html?id=2616&ctry=US

 

“OPERATIONS RESEARCH WITH SAS” blog:
http://blogs.sas.com/content/operations/

 

 

Contributor
Posts: 29

Re: PROC OPTMODEL for MULTIPLE solutions????

Thank you, Rob.

 

These materials have been/will be very helpful in my work. In particular, the Papers and Slides link and the SAS/OR course link were unknown to me. :-)

SAS Employee
Posts: 454

Re: PROC OPTMODEL for MULTIPLE solutions????

The SAS Global Forum 2016 paper I mentioned is now available:

http://support.sas.com/resources/papers/proceedings16/SAS3161-2016.pdf

Contributor
Posts: 29

Re: PROC OPTMODEL for MULTIPLE solutions????

Thank you, Rob, for showing us the link for the paper on identiifying multiple best solutions within PROC OPTMODEL. I will be reading it and try to figure out its relevance to our work. At this point, we truly enjoy this optimization program that is provided as part of SAS/OR.

 

It surprises me that you still remember this question that I posted regarding the procedure, after nearly THREE months. We much appreciate it! :-)

☑ This topic is solved.

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

Discussion stats
  • 10 replies
  • 771 views
  • 4 likes
  • 2 in conversation