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

alternative procedure for SOS?

Reply
N/A
Posts: 0

alternative procedure for SOS?

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!
SAS Employee
Posts: 21

Re: alternative procedure for SOS?

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.
SAS Employee
Posts: 21

Re: alternative procedure for SOS?

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)
SAS Employee
Posts: 21

Re: alternative procedure for SOS?

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

x1 + x2 + x3 + x4 lessOrEq 1 (for SORLE)
N/A
Posts: 0

Re: alternative procedure for SOS?

Thank you so much Yan Xu.
Ask a Question
Discussion stats
  • 4 replies
  • 333 views
  • 0 likes
  • 2 in conversation