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

Read dimensional sets into proc optmodel

Occasional Contributor
Posts: 5

Read dimensional sets into proc optmodel

Hi fellow SAS-users!

After much frustration and a lot of reading up on the proc optmodel and examples I turn to you.

Essentially I am trying, by using sets, to read in some data which varies in the number of elements in several dimension. A simplified example of what I want would is:

data Company_Data;

  input Customer Bill;


  cust1 B1

  cust1 B2

  cust1 B3

  cust2 B4

  cust3 B5


proc optmodel;

set<string> Customers init {};

set<string> Bills{c in Customers};

read data Company_Data into Customers=[customer];

/*Magic to get Bills read into the model */




/*What I want*/


Bills['cust1'] = {'B1', 'B2', 'B3'};

Bills['cust2'] = {'B4'};

Bills['cust3'] = {'B5'};

/* End of model */

SAS Employee
Posts: 519

Re: Read dimensional sets into proc optmodel

Posted in reply to TueChristensen

Answered in another post

Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation