AnsweredAssumed Answered

Problem with binary mpvar

Question asked by 177873@studenti.unimore.it on Feb 5, 2016
Latest reply on Feb 5, 2016 by 177873@studenti.unimore.it

Good Morning. I have a problem with a mpvars. I have setted a mpvars with "is_binary" but in the solution this var is setted with a real number. Why?

 

Code:

z := (sum(i in n) s(i)*p(i)) - (sum(i in n)sum(j in n) c(i,j)*x(i,j))
sum(i in n) s(i)*q(i) <= m           
forall(i in n) (sum(j in n) x(i,j)) - s(i) = 0      
forall(j in n) (sum(i in n) x(i,j)) - s(j) = 0     
forall(i in n) forall(j in 2..N) y(j)-y(i)+N*(1-x(i,j)) >= 1 
forall(i in n) y(i) is_integer
y(1) = 1              
forall(i in 2..N) y(i) >= 2
forall(i in 2..N) y(i) <= N
forall(i in n) s(i) is_binary
s(1) = 1              
forall(i,j in n) x(i,j) is_binary
forall(i in n) x(i,i) = 0          

maximize(z)

 

a lot of item of Matrix x is setted with real number (ex. -2.3626e-010)

Outcomes