a scenario run yields different results when run singly and in a loop of others

Hi there

wondering if somebody can help me understand why a model scenario gives different results when ran singly and when run in a loop with other scenarios. For example, when I run it singly, my set up is as follow:

Loop(scenario$(ord(scenario) lt 3 and ord(scenario) eq 2),

if(ord(scenario) eq 1,
* do something
);

if(ord(scenario) eq 2,
* do something
);

if(ord(scenario) eq 3,
* do something
);
);

and the result was “optimal solution”.

But when I run it continuous as follow:

loop(scenario$(ord(scenario) lt 3),

if(ord(scenario) eq 1,
* do something
);

if(ord(scenario) eq 2,
* do something
);

if(ord(scenario) eq 3,
* do something
);
);

I got different results. For scenario 2, the result was terminated by solver (** Feasible solution. The tolerances are minimal and there is no change in objective although the reduced gradient is greater than the tolerance.).

I have read a few materials that says it might be scaling, smooth formulations or stalling but am curious why different results.

Your runs start from different starting points. In the first case scenarios 2 starts from the manually set starting point while in the second case case it starts from the optimal solution of scenario 1. For NLP (and sometimes for LP) this is a big difference.

-Michael

THANKS