hi,
I am trying to solve the following problem
I wrote the following code
proc optmodel; var x{1..2} >= 0; minimize f = x[1]^2 - 6*x[1] + x[2]^3 - 3*x[2]; con constr1: sum{i in 1..2}x[i] <= 1; /* starting point */ x[1] = 0.5; x[2] = 0.4; solve with NLP; print x;
Am I doing it right please?
Yes, that is correct. You can do it a little more simply by omitting the starting solution and the WITH NLP clause.
Yes, that is correct. You can do it a little more simply by omitting the starting solution and the WITH NLP clause.
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.
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.