Binary variables Topic is solved

Problems with syntax of GAMS
Post Reply
Alexanre.ito
User
User
Posts: 38
Joined: 4 years ago

Binary variables

Post by Alexanre.ito »

Hi I have no more ideas to correct my model.
I don't know why my binary variables is not a binary.
The binary result is not a binary, even declaring that as "Binary Variable"

could some one help me with this?
Last edited by Alexanre.ito 3 years ago, edited 1 time in total.
Fred
Posts: 372
Joined: 7 years ago

Re: Binary variables

Post by Fred »

Hi, you should always check the model and solver status.

Code: Select all

              S O L V E      S U M M A R Y

     MODEL   Rede                OBJECTIVE  cost
     TYPE    MINLP               DIRECTION  MINIMIZE
     SOLVER  SBB                 FROM LINE  122

**** SOLVER STATUS     4 Terminated By Solver      
**** MODEL STATUS      9 Intermediate Non-Integer  
**** OBJECTIVE VALUE                7.0711
Intermediate non-integer means that SBB did not find a feasible solution

Fred
Alexanre.ito
User
User
Posts: 38
Joined: 4 years ago

Re: Binary variables

Post by Alexanre.ito »

Yes, thanks.

Fred wrote: 3 years ago Hi, you should always check the model and solver status.

Code: Select all

              S O L V E      S U M M A R Y

     MODEL   Rede                OBJECTIVE  cost
     TYPE    MINLP               DIRECTION  MINIMIZE
     SOLVER  SBB                 FROM LINE  122

**** SOLVER STATUS     4 Terminated By Solver      
**** MODEL STATUS      9 Intermediate Non-Integer  
**** OBJECTIVE VALUE                7.0711
Intermediate non-integer means that SBB did not find a feasible solution

Fred
Francisco.Patrocinio
User
User
Posts: 15
Joined: 4 years ago

Re: Binary variables

Post by Francisco.Patrocinio »

Hi,

I seem to be having a similar problem: SBB reports an INTEGER SOLUTION (Fig.1), but my binary variable y has values like 1e-6 (Fig.2).
imagem.png
imagem.png
However if I run ANTIGONE(or SBB again) afterwards, it accepts the objective value of SBB, but the binaries are now all 0 and 1.
Attachments
imagem.png
imagem.png
User avatar
bussieck
Moderator
Moderator
Posts: 1037
Joined: 7 years ago

Re: Binary variables

Post by bussieck »

As all solvers SBB has a tolerance for what it considers to be integer, see https://www.gams.com/38/docs/S_SBB.html#SBBepint. The default for epint is at 1e-5. So if abs(round(x)-x)<epint x does not need to be branched on. You can change the tolerance within a solver option file.

-Michael
Francisco.Patrocinio
User
User
Posts: 15
Joined: 4 years ago

Re: Binary variables

Post by Francisco.Patrocinio »

Thanks Michael!
Post Reply