Wrong variable bounds

Archive of Gamsworld Google Group
Post Reply
Archiver
User
User
Posts: 7876
Joined: 7 years ago

Wrong variable bounds

Post by Archiver »



Hello,

I experience quite a strange behaviour of my two-stage MINLP
optimization model making use of the global solver BARON. The first
stage runs just fine, but the second one fails to find any solution,
because GAMS (or the solver?) automatically bounds the objective
variable with THE SAME values. I do not know why it is happening,
because all the variables have their bounds set prior to the SOLVE
statement. To be specific:

...
Option minlp = baron ;
$onecho > baron.opt
NumLoc 50
$offecho
ModelName.optfile = 1 ;
...
myVar.lo = 0 ;
myVar.up = 10000 ;
...
Solve ModelName using minlp minimizing myVar ;

When the solver finishes local search and starts to evaluate the
nodes, it logs:

Iteration Open Nodes Total Time Lower Bound Upper
Bound
1 1 000:00:02 0.800000D+04
0.800000D+04

and right after that -- as can be expected -- it stops with

Best solution found at node: -3

(i.e., no feasible solution found).

How is it possible that it sets completely different bounds for the
objective variable than I did and, moreover, how does it even come up
with the value 0.8e4???

Any help would be much appreciated.

nvx
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to gamsworld@googlegroups.com
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en
-~----------~----~----~----~------~----~------~--~---


Archiver
User
User
Posts: 7876
Joined: 7 years ago

Re: Wrong variable bounds

Post by Archiver »



nvx,

The bound BARON produces is well within the bounds of your objective
variable, so everything is ok. The bound BARON provides comes from
solving a convex relaxation of your problem and this bound is
tightened by branching. You might want to post your model for further
analysis.

Regards,
Michael Bussieck - GAMSWorld Coordinator

On May 26, 2:20 pm, nvx wrote:
> > Hello,
> >
> > I experience quite a strange behaviour of my two-stage MINLP
> > optimization model making use of the global solver BARON. The first
> > stage runs just fine, but the second one fails to find any solution,
> > because GAMS (or the solver?) automatically bounds the objective
> > variable with THE SAME values. I do not know why it is happening,
> > because all the variables have their bounds set prior to the SOLVE
> > statement. To be specific:
> >
> > ...
> > Option minlp = baron ;
> > $onecho > baron.opt
> > NumLoc 50
> > $offecho
> > ModelName.optfile = 1 ;
> > ...
> > myVar.lo = 0 ;
> > myVar.up = 10000 ;
> > ...
> > Solve ModelName using minlp minimizing myVar ;
> >
> > When the solver finishes local search and starts to evaluate the
> > nodes, it logs:
> >
> > Iteration Open Nodes Total Time Lower Bound Upper
> > Bound
> > 1 1 000:00:02 0.800000D+04
> > 0.800000D+04
> >
> > and right after that -- as can be expected -- it stops with
> >
> > Best solution found at node: -3
> >
> > (i.e., no feasible solution found).
> >
> > How is it possible that it sets completely different bounds for the
> > objective variable than I did and, moreover, how does it even come up
> > with the value 0.8e4???
> >
> > Any help would be much appreciated.
> >
> > nvx
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to gamsworld@googlegroups.com
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en
-~----------~----~----~----~------~----~------~--~---


Archiver
User
User
Posts: 7876
Joined: 7 years ago

Re: Wrong variable bounds

Post by Archiver »



Dear Michael,

thank you very much for your response. I tried a few other (local)
solvers and all of them failed to find any feasible solution. I'll
check the model again, maybe there is a typo there... I'll post the
model here in case the problem should recur.

Best regards,
nvx


On 27 kvÄ›, 10:00, Gamsworld Admin wrote:
> > nvx,
> >
> > The bound BARON produces is well within the bounds of your objective
> > variable, so everything is ok. The bound BARON provides comes from
> > solving a convex relaxation of your problem and this bound is
> > tightened by branching. You might want to post your model for further
> > analysis.
> >
> > Regards,
> > Michael Bussieck - GAMSWorld Coordinator
> >
> > On May 26, 2:20 pm, nvx wrote:
> >
>> > > Hello,
> >
>> > > I experience quite a strange behaviour of my two-stage MINLP
>> > > optimization model making use of the global solver BARON. The first
>> > > stage runs just fine, but the second one fails to find any solution,
>> > > because GAMS (or the solver?) automatically bounds the objective
>> > > variable with THE SAME values. I do not know why it is happening,
>> > > because all the variables have their bounds set prior to the SOLVE
>> > > statement. To be specific:
> >
>> > > ...
>> > > Option minlp = baron ;
>> > > $onecho > baron.opt
>> > > NumLoc 50
>> > > $offecho
>> > > ModelName.optfile = 1 ;
>> > > ...
>> > > myVar.lo = 0 ;
>> > > myVar.up = 10000 ;
>> > > ...
>> > > Solve ModelName using minlp minimizing myVar ;
> >
>> > > When the solver finishes local search and starts to evaluate the
>> > > nodes, it logs:
> >
>> > > Iteration Open Nodes Total Time Lower Bound Upper
>> > > Bound
>> > > 1 1 000:00:02 0.800000D+04
>> > > 0.800000D+04
> >
>> > > and right after that -- as can be expected -- it stops with
> >
>> > > Best solution found at node: -3
> >
>> > > (i.e., no feasible solution found).
> >
>> > > How is it possible that it sets completely different bounds for the
>> > > objective variable than I did and, moreover, how does it even come up
>> > > with the value 0.8e4???
> >
>> > > Any help would be much appreciated.
> >
>> > > nvx
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to gamsworld@googlegroups.com
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en
-~----------~----~----~----~------~----~------~--~---


Archiver
User
User
Posts: 7876
Joined: 7 years ago

Re: Wrong variable bounds

Post by Archiver »



Problem solved!

There was a misplaced parenthesis in one of the equations. It is a
pity GAMS does not color-code parentheses or emphasize them in some
other way like modern language IDEs do...

Best regards,
nvx


On 27 kvÄ›, 10:55, nvx wrote:
> > Dear Michael,
> >
> > thank you very much for your response. I tried a few other (local)
> > solvers and all of them failed to find any feasible solution. I'll
> > check the model again, maybe there is a typo there... I'll post the
> > model here in case the problem should recur.
> >
> > Best regards,
> > nvx
> >
> > On 27 kvÄ›, 10:00, Gamsworld Admin wrote:
> >
>> > > nvx,
> >
>> > > The bound BARON produces is well within the bounds of your objective
>> > > variable, so everything is ok. The bound BARON provides comes from
>> > > solving a convex relaxation of your problem and this bound is
>> > > tightened by branching. You might want to post your model for further
>> > > analysis.
> >
>> > > Regards,
>> > > Michael Bussieck - GAMSWorld Coordinator
> >
>> > > On May 26, 2:20 pm, nvx wrote:
> >
>>> > > > Hello,
> >
>>> > > > I experience quite a strange behaviour of my two-stage MINLP
>>> > > > optimization model making use of the global solver BARON. The first
>>> > > > stage runs just fine, but the second one fails to find any solution,
>>> > > > because GAMS (or the solver?) automatically bounds the objective
>>> > > > variable with THE SAME values. I do not know why it is happening,
>>> > > > because all the variables have their bounds set prior to the SOLVE
>>> > > > statement. To be specific:
> >
>>> > > > ...
>>> > > > Option minlp = baron ;
>>> > > > $onecho > baron.opt
>>> > > > NumLoc 50
>>> > > > $offecho
>>> > > > ModelName.optfile = 1 ;
>>> > > > ...
>>> > > > myVar.lo = 0 ;
>>> > > > myVar.up = 10000 ;
>>> > > > ...
>>> > > > Solve ModelName using minlp minimizing myVar ;
> >
>>> > > > When the solver finishes local search and starts to evaluate the
>>> > > > nodes, it logs:
> >
>>> > > > Iteration Open Nodes Total Time Lower Bound Upper
>>> > > > Bound
>>> > > > 1 1 000:00:02 0.800000D+04
>>> > > > 0.800000D+04
> >
>>> > > > and right after that -- as can be expected -- it stops with
> >
>>> > > > Best solution found at node: -3
> >
>>> > > > (i.e., no feasible solution found).
> >
>>> > > > How is it possible that it sets completely different bounds for the
>>> > > > objective variable than I did and, moreover, how does it even come up
>>> > > > with the value 0.8e4???
> >
>>> > > > Any help would be much appreciated.
> >
>>> > > > nvx
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to gamsworld@googlegroups.com
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en
-~----------~----~----~----~------~----~------~--~---


Archiver
User
User
Posts: 7876
Joined: 7 years ago

Re: Wrong variable bounds

Post by Archiver »



Yes, better IDE support for would help in some cases. Currently, there
is F8 which moves the cursor to the matching parenthesis. I personally
prefer using different types of parenthesis. You can use [],(), and {}
anywhere parenthesis are used: sum{i,prod(j, a[i,j]*x[i,j])}

Michael Bussieck - GAMSWorld Coordinator

On May 28, 8:49 am, nvx wrote:
> > Problem solved!
> >
> > There was a misplaced parenthesis in one of the equations. It is a
> > pity GAMS does not color-code parentheses or emphasize them in some
> > other way like modern language IDEs do...
> >
> > Best regards,
> > nvx
> >
> > On 27 kvÄ›, 10:55, nvx wrote:
> >
>> > > Dear Michael,
> >
>> > > thank you very much for your response. I tried a few other (local)
>> > > solvers and all of them failed to find any feasible solution. I'll
>> > > check the model again, maybe there is a typo there... I'll post the
>> > > model here in case the problem should recur.
> >
>> > > Best regards,
>> > > nvx
> >
>> > > On 27 kvÄ›, 10:00, Gamsworld Admin wrote:
> >
>>> > > > nvx,
> >
>>> > > > The bound BARON produces is well within the bounds of your objective
>>> > > > variable, so everything is ok. The bound BARON provides comes from
>>> > > > solving a convex relaxation of your problem and this bound is
>>> > > > tightened by branching. You might want to post your model for further
>>> > > > analysis.
> >
>>> > > > Regards,
>>> > > > Michael Bussieck - GAMSWorld Coordinator
> >
>>> > > > On May 26, 2:20 pm, nvx wrote:
> >
>>>> > > > > Hello,
> >
>>>> > > > > I experience quite a strange behaviour of my two-stage MINLP
>>>> > > > > optimization model making use of the global solver BARON. The first
>>>> > > > > stage runs just fine, but the second one fails to find any solution,
>>>> > > > > because GAMS (or the solver?) automatically bounds the objective
>>>> > > > > variable with THE SAME values. I do not know why it is happening,
>>>> > > > > because all the variables have their bounds set prior to the SOLVE
>>>> > > > > statement. To be specific:
> >
>>>> > > > > ...
>>>> > > > > Option minlp = baron ;
>>>> > > > > $onecho > baron.opt
>>>> > > > > NumLoc 50
>>>> > > > > $offecho
>>>> > > > > ModelName.optfile = 1 ;
>>>> > > > > ...
>>>> > > > > myVar.lo = 0 ;
>>>> > > > > myVar.up = 10000 ;
>>>> > > > > ...
>>>> > > > > Solve ModelName using minlp minimizing myVar ;
> >
>>>> > > > > When the solver finishes local search and starts to evaluate the
>>>> > > > > nodes, it logs:
> >
>>>> > > > > Iteration Open Nodes Total Time Lower Bound Upper
>>>> > > > > Bound
>>>> > > > > 1 1 000:00:02 0.800000D+04
>>>> > > > > 0.800000D+04
> >
>>>> > > > > and right after that -- as can be expected -- it stops with
> >
>>>> > > > > Best solution found at node: -3
> >
>>>> > > > > (i.e., no feasible solution found).
> >
>>>> > > > > How is it possible that it sets completely different bounds for the
>>>> > > > > objective variable than I did and, moreover, how does it even come up
>>>> > > > > with the value 0.8e4???
> >
>>>> > > > > Any help would be much appreciated.
> >
>>>> > > > > nvx
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to gamsworld@googlegroups.com
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en
-~----------~----~----~----~------~----~------~--~---


Archiver
User
User
Posts: 7876
Joined: 7 years ago

Re: Wrong variable bounds

Post by Archiver »



Dear Michael,

thank you for this great tip! I did not know I can use other types of
parentheses/brackets -- perhaps because I usually use programming
languages where every type of parentheses or brackets has different
purpose. (Note to self: be more curious next time and
experiment... ;-) )

Best regards,
nvx


On 28 kvÄ›, 14:57, Gamsworld Admin wrote:
> > Yes, better IDE support for would help in some cases. Currently, there
> > is F8 which moves the cursor to the matching parenthesis. I personally
> > prefer using different types of parenthesis. You can use [],(), and {}
> > anywhere parenthesis are used: sum{i,prod(j, a[i,j]*x[i,j])}
> >
> > Michael Bussieck - GAMSWorld Coordinator
> >
> > On May 28, 8:49 am, nvx wrote:
> >
>> > > Problem solved!
> >
>> > > There was a misplaced parenthesis in one of the equations. It is a
>> > > pity GAMS does not color-code parentheses or emphasize them in some
>> > > other way like modern language IDEs do...
> >
>> > > Best regards,
>> > > nvx
> >
>> > > On 27 kvÄ›, 10:55, nvx wrote:
> >
>>> > > > Dear Michael,
> >
>>> > > > thank you very much for your response. I tried a few other (local)
>>> > > > solvers and all of them failed to find any feasible solution. I'll
>>> > > > check the model again, maybe there is a typo there... I'll post the
>>> > > > model here in case the problem should recur.
> >
>>> > > > Best regards,
>>> > > > nvx
> >
>>> > > > On 27 kvÄ›, 10:00, Gamsworld Admin wrote:
> >
>>>> > > > > nvx,
> >
>>>> > > > > The bound BARON produces is well within the bounds of your objective
>>>> > > > > variable, so everything is ok. The bound BARON provides comes from
>>>> > > > > solving a convex relaxation of your problem and this bound is
>>>> > > > > tightened by branching. You might want to post your model for further
>>>> > > > > analysis.
> >
>>>> > > > > Regards,
>>>> > > > > Michael Bussieck - GAMSWorld Coordinator
> >
>>>> > > > > On May 26, 2:20 pm, nvx wrote:
> >
>>>>> > > > > > Hello,
> >
>>>>> > > > > > I experience quite a strange behaviour of my two-stage MINLP
>>>>> > > > > > optimization model making use of the global solver BARON. The first
>>>>> > > > > > stage runs just fine, but the second one fails to find any solution,
>>>>> > > > > > because GAMS (or the solver?) automatically bounds the objective
>>>>> > > > > > variable with THE SAME values. I do not know why it is happening,
>>>>> > > > > > because all the variables have their bounds set prior to the SOLVE
>>>>> > > > > > statement. To be specific:
> >
>>>>> > > > > > ...
>>>>> > > > > > Option minlp = baron ;
>>>>> > > > > > $onecho > baron.opt
>>>>> > > > > > NumLoc 50
>>>>> > > > > > $offecho
>>>>> > > > > > ModelName.optfile = 1 ;
>>>>> > > > > > ...
>>>>> > > > > > myVar.lo = 0 ;
>>>>> > > > > > myVar.up = 10000 ;
>>>>> > > > > > ...
>>>>> > > > > > Solve ModelName using minlp minimizing myVar ;
> >
>>>>> > > > > > When the solver finishes local search and starts to evaluate the
>>>>> > > > > > nodes, it logs:
> >
>>>>> > > > > > Iteration Open Nodes Total Time Lower Bound Upper
>>>>> > > > > > Bound
>>>>> > > > > > 1 1 000:00:02 0.800000D+04
>>>>> > > > > > 0.800000D+04
> >
>>>>> > > > > > and right after that -- as can be expected -- it stops with
> >
>>>>> > > > > > Best solution found at node: -3
> >
>>>>> > > > > > (i.e., no feasible solution found).
> >
>>>>> > > > > > How is it possible that it sets completely different bounds for the
>>>>> > > > > > objective variable than I did and, moreover, how does it even come up
>>>>> > > > > > with the value 0.8e4???
> >
>>>>> > > > > > Any help would be much appreciated.
> >
>>>>> > > > > > nvx
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to gamsworld@googlegroups.com
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en
-~----------~----~----~----~------~----~------~--~---


Post Reply