BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
bla33333333
Calcite | Level 5

Hello all

I'm looking for a way to store the summary of the solution of a proc optmodel in a dataset. For instance if the solution is optimal, feasible or unfeasible.

What statement do I use for storing this information in a dataset as well?

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
RobPratt
SAS Super FREQ

If you want the whole Solution Summary in a data set, you can use the ODS OUTPUT statement, as shown here:

SAS/OR(R) 14.1 User's Guide: Mathematical Programming

If you just want certain parts, you can use, for example, _SOLUTION_STATUS_ or _OROPTMODEL_NUM_['SOLUTION_STATUS'], as described in the "Solver Status Parameters" section here:

SAS/OR(R) 14.1 User's Guide: Mathematical Programming

You can use the CREATE DATA statement to generate a data set that contains whatever you want:

SAS/OR(R) 14.1 User's Guide: Mathematical Programming

View solution in original post

2 REPLIES 2
RobPratt
SAS Super FREQ

If you want the whole Solution Summary in a data set, you can use the ODS OUTPUT statement, as shown here:

SAS/OR(R) 14.1 User's Guide: Mathematical Programming

If you just want certain parts, you can use, for example, _SOLUTION_STATUS_ or _OROPTMODEL_NUM_['SOLUTION_STATUS'], as described in the "Solver Status Parameters" section here:

SAS/OR(R) 14.1 User's Guide: Mathematical Programming

You can use the CREATE DATA statement to generate a data set that contains whatever you want:

SAS/OR(R) 14.1 User's Guide: Mathematical Programming

bla33333333
Calcite | Level 5

Thanks for your quick response. I did not expect it to be in macro variables as it is possible to output the solution to a dataset.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Discussion stats
  • 2 replies
  • 805 views
  • 1 like
  • 2 in conversation