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** and **locked**.
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 10-12-2019 07:50 AM
(343 views)

hi,

I am trying to solve the following problem

I mean I want to minimize the function f(x).

I have written the following code (without the FIX commands)

proc optmodel; var x1, x2 , x3; min f = x1^2 + 2*(x2^2) + 5*(x3^2) -4*x1 -20*x2 -20*x3; /* starting point */ x1 = 0; x2 = 0; x3 = 0; solve; print x1 x2 x3 x1.dual x2.dual x3.dual; quit;

and I get the following result

There are no values for the dual but I get the value of objective function

But when I write the same code with fix commands (as given below).

```
proc optmodel;
var x1, x2 , x3;
min f = x1^2 + 2*(x2^2) + 5*(x3^2) -4*x1 -20*x2 -20*x3;
/* starting point */
fix x1 = 0;
fix x2 = 0;
fix x3 = 0;
solve;
print x1 x2 x3 x1.dual x2.dual x3.dual;
quit;
```

then i get the following result

+

now there are no values for the 3 variables and also no value for the objective function

Sorry I dont know exactly the function of "FIX" command.

Please can you explain the purpose of "FIX" command here.

Which code should I use to solve this problem?

thanks

1 ACCEPTED SOLUTION

Accepted Solutions

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

1 REPLY 1

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

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

**If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. **

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.