Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

☑ This topic is **solved**.
Need further help from the community? Please
sign in and ask a **new** question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 08-30-2023 03:51 AM
(1133 views)

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

- All observations except a (random) single one have value=1 and the one is, e.g., the second highest ones?
- 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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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.

5 REPLIES 5

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Hello,

I have moved your post to the

Home > Analytics > OR/MS - board.

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

Koen

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Please share your input and output if possible.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. **Registration is now open through August 30th**. Visit the SAS Hackathon homepage.

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.