BookmarkSubscribeRSS Feed
POPO1989
Calcite | Level 5

Hi, I'm new on SAS 9. 4.

 

I have an objective to minimize: 

min F = qte[17]/71 + qte[13]/25 + (qte[31] + qte[32])/263 - qte[1]/272 - qte[4]/254 - qte[6]/166 - qte[10]/268;

(where qte is a vector in which each value is the % recommanded to eat for a nutrient in a diet, and the aim of my program is to find those %)

 

 I choose this way of solving:

solve obj F with NLP/algorithm=Activeset /*Concurrent*/ multistart Maxiter=10000 MSMaxstarts=25 seed=1863071 Feastol=0.001;


 

I get on the "journal" (I have SAS in french) the following message:

NOTE: Problem generation will use 4 threads.
NOTE: The problem has 36 variables (0 free, 0 fixed).
NOTE: The problem has 34 linear constraints (23 LE, 0 EQ, 0 GE, 11 range).
NOTE: The problem has 1025 linear constraint coefficients.
NOTE: The problem has 0 nonlinear constraints (0 LE, 0 EQ, 0 GE, 0 range).
NOTE: The OPTMODEL presolver removed 0 variables, 3 linear constraints, and 0 nonlinear constraints.
NOTE: The OPTMODEL presolved problem has 36 variables, 31 linear constraints, and 0 nonlinear constraints.
NOTE: The OPTMODEL presolver removed 36 linear constraint coefficients, leaving 989.
NOTE: Using analytic derivatives for objective.
NOTE: The NLP solver is called.
NOTE: The Active Set algorithm is used.
NOTE: The MULTISTART option is enabled.
NOTE: The deterministic parallel mode is enabled.
NOTE: The Multistart algorithm is executing in single-machine mode.
NOTE: The Multistart algorithm is using up to 4 threads.
NOTE: Random number seed 1863071 is used.
      Meilleur       Local  Optimalit?    Infaisa-  Local  Local
      D?but    Objectif   Objectif       Erreur      bilit?  It?r  Statut
          1   -5,7473197  -5,7473197  8,19617E-7  4,5475E-13    165  Optimal
          2   -5,7473197  -4,4371758  7,44232E-7   9,9268E-6    150  Optimal
          3 * -5,7473197   -4,193588  7,58871E-7  0,00001819    188  Optimal
          4   -5,7473197  -2,4594022  9,88805E-7   0,0000401    220  Optimal
          5   -5,7473197  -3,4290596  9,23225E-7  8,75817E-7    143  Optimal
          6   -6,1896441  -6,1896441  1,51637E-7  0,00098512    158  Optimal
          7   -6,1896441  -13562,005  5,37896E-7   100460631     76  LocalInfeas
          8   -6,1896441  -4,5812214  9,27801E-7  0,00002634    270  Optimal
          9   -6,1896441  -4,3003702  9,53107E-7           0    395  Optimal
         10   -6,1896441  -13566,637  7,45639E-7  90114971,5    110  LocalInfeas
         11   -6,1896441  -4,3436519  9,56977E-7  3,07991E-7    577  Optimal
         12   -6,1896441  -13570,349  5,22808E-6   111100464  10000  IterLimit
         13   -6,1896441  -1,2855454  8,22242E-6  52,1652856  10000  IterLimit
         14   -6,1896441  3802,28137   0,0000384  5782580,77  10000  IterLimit
         15   -6,1896441  -1,2521854   0,0000384  217,518794  10000  IterLimit
         16   -6,1896441  -9624,2172  6,79356E-7   148508958     57  LocalInfeas
         17   -6,1896441  -13565,637  6,58687E-7   156238573     66  LocalInfeas
         18   -6,1896441  -9629,6289  6,81325E-7  86409963,5     95  LocalInfeas
         19   -6,1896441  -13565,637  0,00003841   507821170  10000  IterLimit
         20   -6,1896441  -7541,5404  9,90461E-7  90599996,7     58  LocalInfeas
         21   -6,1896441  -0,0650454  1,83072E-6  1323,91452  10000  IterLimit
         22   -6,1896441  -9762,3554  5,40408E-8  96672409,1     56  LocalInfeas
         23   -6,1896441  -6149,1399  0,00002531  11529782,4  10000  IterLimit
         24   -6,1896441  -8605,4825  2,93296E-6  92399924,9  10000  IterLimit
         25   -6,1896441  -3914,6655  0,00003845  92303556,9  10000  IterLimit
NOTE: The Multistart algorithm generated 1600 sample points.
NOTE: 9 distinct local optima were found.
NOTE: The best objective value found by local solver = -6,189644118.
NOTE: The solution found by local solver with objective = -6,189644118 was returned.

I don't understand all the content, but, 

As I would like to see the details not only of the best objective, but also for all the other distinct local optima, I tried this code:

print _NSOL_;
print {j in 1..36, i in 1.._NSOL_} qte[j].sol[i];
create data solout from [sol]={i in 1.._NSOL_}
{j in 1..36} <col("qte"||j)=qte[j].sol[i]> ;


print F; 
create data INCA3_9C.regime_opt from [i] quantite=qte;
quit;

proc print data= solout;
run;

but it didn't work.

 

If anybody have a solution for my problem, please, let me know, this will help me a lot !

2 REPLIES 2
RobPratt
SAS Super FREQ

Only the best solution among these distinct local optima is returned, and so _NSOL_ = 1.  Currently, there is no way to access the other solutions.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 663 views
  • 0 likes
  • 3 in conversation