Mathematical Optimization, Discrete-Event Simulation, and OR

Operations Research topics: SAS/OR,
SAS Optimization, and SAS Simulation Studio
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ODENWALD
Obsidian | Level 7

After a first    solve with  NLP  with  ms-feature  I wanted to place a second solve with logic

 

x.init  =  x.msinit  etc  for all variables  and  solve  ..... .

 

That's not allowed.

 

Who knows how to implement it ?

 

Werner

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
RobPratt
SAS Super FREQ

The .INIT suffix is deprecated, but you can do the following to set all variables in one loop:

   for {j in 1.._NVAR_} _VAR_[j] = _VAR_[j].msinit;

View solution in original post

3 REPLIES 3
RobPratt
SAS Super FREQ

The .INIT suffix is deprecated, but you can do the following to set all variables in one loop:

   for {j in 1.._NVAR_} _VAR_[j] = _VAR_[j].msinit;
ODENWALD
Obsidian | Level 7

Thanks, Rob .

 

.... so easy, but I was looking the wrong direction.  Using the  ms  feature   .msinit   is clearly more important. But why had you decided to deprecate  .init  ?

 

Odenwald

RobPratt
SAS Super FREQ

The .INIT suffix was confusing (especially because it was not populated by the INIT option in the VAR statement) and not very useful, so we removed it as of SAS/OR 13.2.  To supply initial values to be used by the NLP solver, just assign those values to the variables as I showed.

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

Discussion stats
  • 3 replies
  • 1323 views
  • 2 likes
  • 2 in conversation