Turn on suggestions

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

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

Posted 03-27-2014 04:23 PM
(2234 views)

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

9 REPLIES 9

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

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
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

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
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

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
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Are you ready for the spotlight? We're accepting content ideas for **SAS Innovate 2025** to be held May 6-9 in Orlando, FL. The call is **open **until September 25. Read more here about **why** you should contribute and **what is in it** for you!

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.