User Tools

Site Tools


Different results depending on the order of data

Q: I am using a non-linear solver and I am finding I get different results depending on the order of my data. Can you suggest any reason why this would be?

I assume that you've checked the model and solver status values in the Solve Summary to be sure that the model is stopping with “Normal Completion” and “Locally Optimal.” If not, you are just looking at the point where the solver gave up looking for a solution. Unless your model is convex, the objective function will have various hills and valleys. The algorithms used by large scale solvers will find the top of a nearby hill or bottom of a nearby valley and will have no way of knowing whether the global optimum might be somewhere else. Even if the solver is completing successfully, you may get different answers depending on order of data, initial values and bounds if your model is non-convex – and many if not most are.

You can increase the likelihood of finding the global optimum by taking care to provide a starting point that is near where you know the optimum must be. Solving the model from a variety of starting points will make it likely that you'll find different local optima so that you can choose the best solution. You can further help by bounding key variables to keep them near where the “right” solution must be.

If your model is fairly small, you might be able to solve it with one of our global solvers. Solvers like GAMS/BARON and GAMS/Lindo will find the global optimum if they can solve the model at all. We also have related multi-start solvers like GAMS/MSNLP that will resolve the model from a variety of starting points to build confidence that the global optimum has been found. With those solvers, you get no proof, but investing more time in solving from more starting points will make it very likely that you've found the global optimum. MSNLP can solve fairly large problems, but solving the model many times means that the run times will be long.

IMPRESSUM / LEGAL NOTICEPRIVACY POLICY solver/nlp_different_results_depending_on_the_order_of_data.txt · Last modified: 2020/07/21 14:24 by Lutz Westermann