SAS Optimization, and SAS Simulation Studio

turn on suggestions

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

Showing results for

Find a Community

Topic Options

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-27-2014 04:23 PM

Saw a youtube video yesterday. Ed Hughes showed how to use SUBMIT block with PROC CLP to add one more constraint in OPTMODEL procedure.

His example is too complicated and I have hard time to understand all details.

Is there any simple case which I can start with?

User guide and course note don't have much info.

Thanks

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to neilxu

03-27-2014 05:06 PM

Here's an example that uses a SUBMIT block to call a DATA step and PROC GPLOT to plot intermediate solutions during a classical row-generation approach to the TSP:

SAS/OR(R) 13.1 User's Guide: Mathematical Programming

If that example isn't helpful, maybe you can describe what you had in mind.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to RobPratt

03-28-2014 11:55 AM

Thank you Rob.

I did read the part, however the SUBMIT/ENDSUBMIT block is not a constraint. That block takes the outputs and plots a graph.

What I am looking at is to embed a constraint in SUBMIT/ENDSUBMIT block. Any simple example?

Thanks

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to neilxu

03-28-2014 12:14 PM

I'm not quite sure what you mean by embedding a constraint. The job shop example shown by Ed uses SUBMIT to call PROC CLP, and the resulting output provides information that can be used to add valid constraints to the MILP model. Can you provide some more detail about your use case?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to RobPratt

03-28-2014 02:06 PM

Thanks Rob.

The problem is in current OPTMODEL, one of our SAS programmers cannot call expmatrix function. So I rewrote everything in IML with Rick's help. However I am wondering if possible to call expmatrix function in SUBMIT/ENDSUBMIT block. My guess is it's highly possible.

So you are right, the youtube example uses SUBMIT to generate output info that can be used as a constraint. My specific question is: that example is too complicated. Do you have some simple examples I can start with?

Thanks

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to neilxu

03-28-2014 02:31 PM

Now that PROC OPTMODEL supports FCMP functions and routines, I think the examples from this post will help you:

https://communities.sas.com/message/146656#146656

Note that expmatrix is one of the routines provided by PROC FCMP.

The SUBMIT block is useful, but in this case I think FCMP support is the more appropriate OPTMODEL feature for your needs.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to RobPratt

03-31-2014 10:56 AM

Hi Rob,

thanks for your help. Unfortunately, we are still using SAS9.3.

My thought is: keep the original OPTMODEL, add one more constraint in SUBMIT block.

Can you show me how to use SUBMIT instead of FCMP, for example?

Thanks

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to neilxu

03-31-2014 12:26 PM

FCMP enablement has actually been hidden for several releases and is officially supported in 13.1. You might try using it with your earlier release and see if it just works. Using SUBMIT instead would require an indirect approach with multiple solver calls. And I would need more explicit details about your intended constraint.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to RobPratt

04-01-2014 09:23 AM

Hi Rob,

We tried and it didn't work. We even contact SAS support and raised a ticket. Nor working at this moment.

for example, we are minimize the function

min z=sum{i,j} ( x[i,j] - y[i,j] ) **2

the constraints are, for example:

con condition1{i}: sum{j} x[i,j]=1

now we want to introduce expmatrix(x,3,z) and make sure z is satisfied with some other conditions.

Can you give us an example how to use SUBMIT block?

Thanks

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to neilxu

04-01-2014 09:52 AM

I'll be glad to help, but I still need more details. What does your constraint that involves expmatrix look like? It looks like you have overloaded z as the name your objective function and as the third argument of expmatrix.