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

Hello everyone,

 

I would like to initialize the values of my parameters of my proc nlp, by picking them from a table. My table nr has two variables x1 and x2, with one value for each. My objective function is a function that I have defined in a previous proc fcmp.

I have tried to run this code, but it can't seem to work, I have the following error message: Missing variable TYPE on the INEST= input data set.


proc nlp tech=NEWRAP invar=two(type=PARMS) gradcheck=detail gconv2=1e-12 ;
min f;
decvar x1 x2;
f = (1-x1)*2+100(x2-x1*2)*2;
run;

Thanks a lot for your help!

1 ACCEPTED SOLUTION

Accepted Solutions
sbxkoenk
SAS Super FREQ

Hello,

 

I have moved your question to this board:

Mathematical Optimization, Discrete-Event Simulation, and OR
Operations Research topics: SAS/OR,
SAS Optimization, and SAS Simulation Studio

 

I see now it's a duplicate of another question that is already posted in this board.

 

Cheers,

Koen

View solution in original post

5 REPLIES 5
sbxkoenk
SAS Super FREQ

Hello,

 

I have moved your question to this board:

Mathematical Optimization, Discrete-Event Simulation, and OR
Operations Research topics: SAS/OR,
SAS Optimization, and SAS Simulation Studio

 

I see now it's a duplicate of another question that is already posted in this board.

 

Cheers,

Koen

Rick_SAS
SAS Super FREQ

@sarrabeny and @CerditoSalvaje 
You both posted the same question. Could you please let us know if you are taking a course? If so, what is the topic of the course?

 

If you post a homework question or a question about a school project, please let us know. That way we can give hints that lead you towards discovering the answers on your own. This is more valuable than telling you an answer.

CerditoSalvaje
Obsidian | Level 7
Hello Rick, not at all. We are friends and we are trying to code PSO in SAS, together. She had the question I have post but she hasn’t a SAS account, then she has created one. After, we don’t know why, she has received a message as if their question was moved into spam. Then, she asked me to post it for her.

Thanks and sorry for the confusion, she is not very used with the forum.
sbxkoenk
SAS Super FREQ

Hello,

 

Thanks for clarifying.

PSO ... do you mean particle swarm optimization?

 

Why are you using the legacy procedure PROC NLP by the way?

I think you should shift to our more modern procedures and solvers (PROC OPTMODEL, PROC OPTLSO, ...).

OPTMODEL also has a great algebraic modelling language (AML) to formulate your mathematical program.

 

Thanks,

Koen

Rick_SAS
SAS Super FREQ

Yes. The request to use the ancient PROC NLP was one reason I thought the question was related to a course. Sometimes professors reuse old assignments from 20 years ago. 

 

I agree with Koen: If you are doing new work in SAS, use the most modern techniques. Instead of PROC NLP, use PROC OPTMODEL.

sas-innovate-2024.png

 

Time is running out to save with the early bird rate. Register by Friday, March 1 for just $695 - $100 off the standard rate.

 

Check out the agenda and get ready for a jam-packed event featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events. 

 

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