Page 1 of 1

Binary Matrix

Posted: Mon Sep 10, 2018 2:58 pm
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.

Re: Binary Matrix

Posted: Mon Sep 10, 2018 3:08 pm
by Manassaldi
Hi, you must specify that MM(i,k) is a binary variable.

Code: Select all

Binary Variable
MM(i,k) ;
Bye

Re: Binary Matrix

Posted: Mon Sep 10, 2018 3:24 pm
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