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

How to create a subset of a set in SAS OPTMODEL procedure.

Reply
Contributor
Posts: 52

How to create a subset of a set in SAS OPTMODEL procedure.

Let's assume we have two data sets:   products_table products {apple, orange, banana}    and subproducts_table  subproducts {apple, banana}.

In the SAS OPTMODEL procedure, we have define the set,

set<string> products_set;

read data products_table into

        products_set = [products];

how do we define a subset of products_set which contains "subproducts {apple, banana}"?

Thank you for the help.

SAS Employee
Posts: 448

Re: How to create a subset of a set in SAS OPTMODEL procedure.

You would just need a second SET and READ DATA for the other data set:

set<string> subproducts_set;

read data subproducts_table into subproducts_set=[subproducts];

Ask a Question
Discussion stats
  • 1 reply
  • 291 views
  • 0 likes
  • 2 in conversation