Different results depending on the order of data

Frequently asked questions about GAMS

Moderator: aileen

Forum rules
Please ask questions in the other sub-forums
Locked
aileen
User
User
Posts: 121
Joined: 5 months ago

Different results depending on the order of data

Post by aileen » 1 month ago

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?

aileen
User
User
Posts: 121
Joined: 5 months ago

Re: Different results depending on the order of data

Post by aileen » 1 month ago

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.

Locked