Binary Matrix

Problems with syntax of GAMS
Post Reply
ErickMiranda
User
User
Posts: 4
Joined: 5 years ago

Binary Matrix

Post by ErickMiranda »

Hello, i need help, i want to include a Binary Variable MM(i,k) into a MINLP, but values of the matrix are not 1 and 0. even when i constrain the model to:

eq(k) .. sum(i, MM(i,k)) =e= 1;

the results for MM when is multiplying by the equation that i need to restring are:

k1 k2 k3
i1 0.925
i2 0.011 0.016
i3 0.011 0.016
i4 0.011 0.016
i5 0.011 0.016
i6 0.011 0.016
i7 0.011 0.016
i8 1.000 0.011 0.905

and when i do not multiplying MM(i,k), all values are 0.125

so i try to include this:
eq2(i,k).. MM(i,k) =e= 1 or 0;
but it says that one equation is infeasible in pre-triangular equations.

i need this binary variable to restring a process to use just one 'i' by 'k'

i hope you can help me.
Manassaldi
User
User
Posts: 118
Joined: 7 years ago
Location: Rosario - Argentina

Re: Binary Matrix

Post by Manassaldi »

Hi, you must specify that MM(i,k) is a binary variable.

Code: Select all

Binary Variable
MM(i,k) ;
Bye
ErickMiranda
User
User
Posts: 4
Joined: 5 years ago

Re: Binary Matrix

Post by ErickMiranda »

hi, thank you for response. the variable was declared as Binary variable.

when i ask to the model that display MM.L without multiplying the Binary Matrix, all values are 0.125
Post Reply