Various Answers

Solver related questions
Post Reply
IamMeisam
User
User
Posts: 2
Joined: 2 months ago

Various Answers

Post by IamMeisam » 2 months ago

I run a same model with same data in two different PCs with the same version of GAMS and i get different answers for decision variables. what's the reason?

User avatar
Renger
Posts: 263
Joined: 2 years ago

Re: Various Answers

Post by Renger » 2 months ago

Hi
Your question is posed in a such a general way, that it is hard to give an answer.
What kind of model (where is the code), what is meant by "different"?
Cheers
Renger

IamMeisam
User
User
Posts: 2
Joined: 2 months ago

Re: Various Answers

Post by IamMeisam » 2 months ago

I developed a mixed integer linear programing model for wheat supply chain which is coded in GAMS. the default solver is cplex. when i run the code in my laptop, for example i get 0 for two of my decision variables and when i run the code in another laptop, the mentioned decision variables are non-zero. i get different values for all of my my decision variables when i run the code in two laptops. the version of the GAMS is same in both laptops. why is that?

User avatar
Renger
Posts: 263
Joined: 2 years ago

Re: Various Answers

Post by Renger » 2 months ago

It sounds a little bit weird but perhaps https://www-01.ibm.com/support/docview. ... wg21399979 can explain it.
Cheers
Renger

User avatar
dirkse
Moderator
Moderator
Posts: 46
Joined: 2 years ago
Location: Fairfax, VA

Re: Various Answers

Post by dirkse » 2 months ago

There are several possible explanations for this behavior, for example:

1. Your model could have multiple optimal solutions. Even when using the same software, you cannot expect always the same answers on different machines, because solvers use automatic CPU dispatch to run code optimized for the chip it runs on. https://software.intel.com/en-us/mkl-ma ... hitectures is a link about this that Google just found me.

2. You didn't mention what your optcr setting is, or why the solver stopped. If you stop on a time limit prior to getting a proven optimal solution, I would not expect this to result in identical runs on different machines, even with identical software.

In general, you cannot expect solver runs to proceed identically on different machines. Often we do see identical runs across machines, but the solvers have multiple areas where they are or can be sensitive to the environment they run in (number of cores on the machine, CPU type, available memory, timing, sizes of the different caches in the CPU) and sometimes these result in differences.

-Steve

Post Reply