Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

🔒 This topic is **solved** and **locked**.
Need further help from the community? Please
sign in and ask a **new** question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 02-09-2016 01:10 PM
(3065 views)

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??

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

12 REPLIES 12

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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/

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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. 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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! 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Thanks for your request Rob!

I use allsolns to find all solutions but i can not print them.

how can i print all solutions?

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

See the "Multiple Solutions" section of the PROC OPTMODEL documentation for an example.

**Available on demand!**

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

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.