BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
asasgdsfa
Obsidian | Level 7

Hi

 

PROC OPTMILP returns _value_ columns in the PRIMALOUT= output. The documentation only states: "specifies the value of the variable in the current solution". Would anyone know its mathematical meaning?

 

When running the optimization for a binary variable x (searching for "1" if a term corresponding to a combination of parameters should contribute to the cost function and "0" when the term should vanish), the _value_ is in interval [0, 1]. I guess, the best solutions, i.e., the ones I want, are given by _value_=1.

Because of constrains, each (original) observation can have only one combination of parameters. However, the same combination of parameters is found multiple times in the output table; one once with _value_=1 but several times for _value_<1.

 

I'll assume that the final solution (for optimized combination of observations) is a data set "where _value_=1". It'd be mathematically reasonable.

How can I interpret lower values? For example, what "kind of a solution" do I get if

  1. All observations except a (random) single one have value=1 and the one is, e.g., the second highest ones?
  2. For all original observations, the second largest _value_ is selected. Or the lowest one.

 

(Technical note: with original observation I mean a record ID in the input table. The output table has multiple rows for this ID, one corresponding to each distinct _value_.)

1 ACCEPTED SOLUTION

Accepted Solutions
RobPratt
SAS Super FREQ

The inputs for PROC OPTMILP are decision variables, bounds, integrality restrictions, linear constraints, and a linear objective.  By default, the MILP solver that is invoked by PROC OPTMILP finds one optimal solution, which is an assignment of values to decision variables such that the variable bounds, integrality restrictions, and linear constraints are satisfied and the objective value is the best possible.  To retrieve the resulting solution, you can use the PRIMALOUT= option to name an output data table that will contain one observation per decision variable.  The _VAR_ column contains the name of each variable, and the _VALUE_ column contains the value of that variable in the solution returned by the MILP solver.  For binary variables, the _TYPE_ column will be B, and the _VALUE_ will be "close to" 0 or 1 (within the integer tolerance, whose default is 1e-5).

 

If this explanation does not provide sufficient clarity, maybe it would help if you can supply your specific input and output that you want to interpret.

View solution in original post

5 REPLIES 5
sbxkoenk
SAS Super FREQ

Hello,

 

I have moved your post to the

Home > Analytics > OR/MS - board.

 

Higher chances for getting a good answer (solution)  here.

 

Koen

RobPratt
SAS Super FREQ

The inputs for PROC OPTMILP are decision variables, bounds, integrality restrictions, linear constraints, and a linear objective.  By default, the MILP solver that is invoked by PROC OPTMILP finds one optimal solution, which is an assignment of values to decision variables such that the variable bounds, integrality restrictions, and linear constraints are satisfied and the objective value is the best possible.  To retrieve the resulting solution, you can use the PRIMALOUT= option to name an output data table that will contain one observation per decision variable.  The _VAR_ column contains the name of each variable, and the _VALUE_ column contains the value of that variable in the solution returned by the MILP solver.  For binary variables, the _TYPE_ column will be B, and the _VALUE_ will be "close to" 0 or 1 (within the integer tolerance, whose default is 1e-5).

 

If this explanation does not provide sufficient clarity, maybe it would help if you can supply your specific input and output that you want to interpret.

asasgdsfa
Obsidian | Level 7

Could there be multiple _var_ rows, each one having different _value_? If so, how do I choose the "best" one?

RobPratt
SAS Super FREQ

Please share your input and output if possible.

sbxkoenk
SAS Super FREQ

Hello @asasgdsfa ,

 

It would be better for a new question to also start a new topic / post.
You can always refer to an already solved question if your new question builds on that.

Since this topic is already solved, hardly anyone is going to check this out. Only the community members involved in the old question (because we were notified there was an update). In other words : you bring down your chances of getting a quick and good answer.


Coincidentally (well, ... not that coincidentally), that notified members list includes @RobPratt who answers the lion's share of questions in this board, ... but it's still an inadvisable practice to post updates in already solved topics.

 

Koen

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 5 replies
  • 1251 views
  • 1 like
  • 3 in conversation