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

Hi all:

    I define 4 numeric variables: a, b, c, d and want to calculate the minimal value of objective function, and meet a problem.

When interating, the a variable named flag is based on variable a, b : flag=max(a,b), and the flag variable is also involved in the objective function, for example:

min f= X + a*Y * flag - ........;

that means the flag variable value and the objective function will change during each interation. So how to define them in proc optmodel.

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
qkaiwei
Calcite | Level 5

I answer it by myself.

Use PROC FCMP to create some functions to solve it, the mechanism of SAS is a little different with that of MATLAB.

View solution in original post

1 REPLY 1
qkaiwei
Calcite | Level 5

I answer it by myself.

Use PROC FCMP to create some functions to solve it, the mechanism of SAS is a little different with that of MATLAB.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 1 reply
  • 900 views
  • 0 likes
  • 1 in conversation