SAS Optimization, and SAS Simulation Studio

turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

Topic Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-10-2013 04:17 AM

Hi,

When I execute OPTMODEL procedure I get, in certain circumstances message that "Algorithm failed to converge.". What exaclty that mean? Is there a way (options: maxiter, tech ?) to somehow get successfull optimal solution? Does it mean that the problem has no solution - as far as I investigated It should have optimal solution.

I attach sample data and SAS code.

Message was edited by: tsf sfsdf

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to tom12122

09-10-2013 08:59 AM

Hi,

As the message states an optimal solution could not be provided due to the underlying algorithm failing to converge. This could be due to the solver you have specified in your code (or from using the default solver). As you haven't provided your code it is difficult to know what it could be.

Some information on numerical difficulties and suggestions can be found in the SAS/OR user guide, SAS/OR(R) 12.3 User's Guide: Mathematical Programming As the page suggests you may also want to try a different solver and algorithm in PROC OPTMODEL using the SOLVER= option on the SOLVE statement, http://support.sas.com/documentation/cdl/en/ormpug/66107/HTML/default/viewer.htm#ormpug_optmodel_sec...

Other thoughts are to look at using initial values (or not) and also perhaps use a presolver.

Kind Regards,

Michelle

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to MichelleHomes

09-13-2013 07:47 AM

I attached sample SAS code and files

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to MichelleHomes

10-09-2013 09:24 AM

Can you help with this problem? Thanks

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to tom12122

10-21-2013 02:25 PM

We are looking at this problem, and will let you know. Thanks.

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to wezhou

10-23-2013 02:11 PM

We noticed that your objective has the form g1(x)/sqrt(g2(x)) where g2(x) appears to be very small when it is close to the solution. Further g2(x) is realized by summing a number of terms together. Numerical issues can occur whenever the individual terms in the summation are much larger than the cumulative result. It appears that most of the solvers we tried for your problem converge to the same point (we believe that it is an optimal solution) with the current formulation, but are unable to exit due to the optimality tolerance. One solution is to simply relax the tolerance for this problem. Alternatively, sometimes simple reformulations can improve convergence.

Attached is an equivalent variation that is quickly solved by optmodel’s nlp solver. Note that for the same attached reformulation we tried NLPC. NLPC appears to stop when the objective surpasses a given threshold for an infeasible solution. In general we suggest using the newer solvers and have found them to be more robust in the presence of general nonlinear constraints.

Attached are the new model and corresponding log file from the nlp.

Please feel free to ask if you have any new questions. Also, please feel free to use SAS’s defect track system.

http://support.sas.com/ctx/supportform//createForm

Best,

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to wezhou

10-23-2013 03:54 PM

Thank you for help.

Can you tell me what option should I use in solution one - to "relax the tolerance for this problem"?

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to tom12122

10-23-2013 04:15 PM

You can try solver option: opttol. For example, set opttol=1.0e-4.

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to wezhou

10-23-2013 04:51 PM

I'm using SAS 9.2 - is that option also available in my version?

By the way - by accident I used option "FD=CENTRAL" and it seems to cause problem to disapear - Is it just a coincidence?

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to tom12122

10-23-2013 05:28 PM

You may try RELOPTTOL for SAS 9.2. You can set RELOPTTOL=1.0e-4.

As to FD=CENTRAL, I cannot reproduce what you described.

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to wezhou

10-23-2013 05:41 PM

Ok - I got it - i need to put it after SOLVE eg.

SOLVE WITH NLPC /TECH=QUANEW RELOPTTOL=0.00001;

Coming back to my FD=CENTRAL -

PROC OPTMODEL INITVAR PRINTLEVEL=2 FD=CENTRAL;

I get more or less the same result:

"

NOTE: The problem has 10 variables (0 free, 0 fixed).

NOTE: The problem has 1 linear constraints (0 LE, 1 EQ, 0 GE, 0 range).

NOTE: The problem has 10 linear constraint coefficients.

NOTE: The problem has 0 nonlinear constraints (0 LE, 0 EQ, 0 GE, 0 range).

NOTE: Using numeric derivative approximations for objective.

NOTE: Initial point was changed to be feasible to bound and linear constraints.

NOTE: The experimental quasi-Newton method with BFGS update is used.

NOTE: Optimality criteria (ABSOPTTOL=0.001, RELOPTTOL=1E-6) are satisfied.

NOTE: Objective = 0.5377052804.

NOTE: The data set WORK.OPT_STAT has 6 observations and 3 variables.

NOTE: The data set WORK.OPT_RESULT has 10 observations and 3 variables.

"

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to tom12122

10-24-2013 11:51 AM

Another thing that you can try is to multiply a number on the objective function (for example, 1.0e-3). It sometimes helps the convergence. It is mainly to do with the better scaling for the multipliers of the constraints.