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 01-03-2011 05:24 AM
(1255 views)

Hi all,

Is there another way to modeling a milp problem with special ordered set (SOS)? there 're keywords SOSEQ and SOSLE in PROC LP format, But if I convert this to MPS-format Sas Data Set (to input it to OPTMILP), they will be ignored. So if I have a model with SOS, I can solve it with PROC LP only?

thanks!

Is there another way to modeling a milp problem with special ordered set (SOS)? there 're keywords SOSEQ and SOSLE in PROC LP format, But if I convert this to MPS-format Sas Data Set (to input it to OPTMILP), they will be ignored. So if I have a model with SOS, I can solve it with PROC LP only?

thanks!

4 REPLIES 4

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

OPTMILP doesn't support SOS yet. It is in our plan to add it.

If the variables (for example, x1, x2, x 3, x4) in SOS are all binary, then can add a constraint

x1 + x2 + x3 + x4 = 1 (for SOREQ) or x1 + x2 + x3 + x4 <= 1 (for SORLQ)

If the variables are not all binary (but all are >= 0), then can add a set of constraints and same extra variables

x1 <= M1 * y1

x2 <= M2 * y2

x3 <= M3 * y3

x4 <= M4 * y4

y1 + y2 + y3 + y4 = 1 (for SOREQ) or y1 + y2 + y3 + y4 <= 1 (for SORLQ)

yi are binary. Mi is the upper bound of xi

You can use OPTMODEL to model and solve your problem efficiently. Document is here

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

PROC LP is a legacy proc. It may have trouble when solving large instances.

If the variables (for example, x1, x2, x 3, x4) in SOS are all binary, then can add a constraint

x1 + x2 + x3 + x4 = 1 (for SOREQ) or x1 + x2 + x3 + x4 <= 1 (for SORLQ)

If the variables are not all binary (but all are >= 0), then can add a set of constraints and same extra variables

x1 <= M1 * y1

x2 <= M2 * y2

x3 <= M3 * y3

x4 <= M4 * y4

y1 + y2 + y3 + y4 = 1 (for SOREQ) or y1 + y2 + y3 + y4 <= 1 (for SORLQ)

yi are binary. Mi is the upper bound of xi

You can use OPTMODEL to model and solve your problem efficiently. Document is here

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

PROC LP is a legacy proc. It may have trouble when solving large instances.

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

My first post got messed up. Here is my whole answer

OPTMILP doesn't support SOS yet. It is in our plan to add it.

If the variables (for example, x1, x2, x 3, x4) in SOS are all binary, then can add a constraint

x1 + x2 + x3 + x4 = 1 (for SOREQ) or x1 + x2 + x3 + x4 = 0 (for SORLE)

If the variables in SOS are not all binary, but all >= 0, then can add a set of constraints and some extra variables

x1 < M1 * y1

x2 < M1 * y2

x3 < M1 * y3

x4 < M1 * y4

y1 + y2 + y3 + y4 = 1 (for SOREQ) or y1 + y2 + y3 + y4 = 0 (for SORLE)

yi are binary, Mi are upper bound of xi.

PROC LP is a legacy proc, it may not perform well when the instances are large.

OPTMODEL can be used to model this efficiently, it doc can be found at www.sas.com and search for documentation and OPTMODEL.

(somehow the forum doesn't display web link correctly)

OPTMILP doesn't support SOS yet. It is in our plan to add it.

If the variables (for example, x1, x2, x 3, x4) in SOS are all binary, then can add a constraint

x1 + x2 + x3 + x4 = 1 (for SOREQ) or x1 + x2 + x3 + x4 = 0 (for SORLE)

If the variables in SOS are not all binary, but all >= 0, then can add a set of constraints and some extra variables

x1 < M1 * y1

x2 < M1 * y2

x3 < M1 * y3

x4 < M1 * y4

y1 + y2 + y3 + y4 = 1 (for SOREQ) or y1 + y2 + y3 + y4 = 0 (for SORLE)

yi are binary, Mi are upper bound of xi.

PROC LP is a legacy proc, it may not perform well when the instances are large.

OPTMODEL can be used to model this efficiently, it doc can be found at www.sas.com and search for documentation and OPTMODEL.

(somehow the forum doesn't display web link correctly)

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

x1 + x2 + x3 + x4 = 0 (for SORLE) should be

x1 + x2 + x3 + x4 lessOrEq 1 (for SORLE)

x1 + x2 + x3 + x4 lessOrEq 1 (for SORLE)

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

Thank you so much Yan Xu.

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