AnsweredAssumed Answered

Ignored constraints on non linear problem

Question asked by on Dec 17, 2015
Latest reply on Jan 11, 2016 by

Hello all,


I'm working on a final studies project and i'm facing some issue on the Xpress Solver.


The versions i'm using are Xpress-IVE Version 1.24.00 64bit, Xpress Mosel Version 3.4.2 and Xpress Optimizer Version 24.01.04


When i'm running the following model, Xpress return 0 on all variables, ignoring the constraints "Neighborhood" and the last of "Non overlaping" (red lines) without giving me any error message.


What is even weirder is : when i help it finding the good solution giving it x(1)=0 (not defining it as a commentary anymore, green line), it is able to return the good solution respecting all the constraints.


Here is the code i'm using :


model ModelName

uses "mmxnlp";






L : array(I) of integer       

x : array(J) of mpvar

Right: array(I,I) of mpvar

Left : array(I,I) of mpvar

V : array(J,J) of integer









V::[0, 1,-1,

    1, 0,-1,

   -1,-1, 0]



!Expected results




!Form constraint

forall(i in I, j in I) Right(i,j)is_binary

forall(i in I, j in I)  Left(i,j)is_binary

forall(i in I) x(i) is_integer



forall(i in I, j in I | j <> i) x(j)+(100*(1-Right(i,j))) >= x(i)+L(i)

forall(i in I, j in I | j <> i) x(i)+L(i)+(100* Right(i,j)) >= x(j) +0.1

forall(i in I, j in I | j <> i) x(i)+(100*(1- Left(i,j))) >= x(j)+L(j)

forall(i in I, j in I | j <> i) x(j)+L(j)+(100*  Left(i,j)) >= x(i) +0.1


!Non overlaping

forall(i in I, j in I | j <> i)  Right(i,j)*(x(j)-(x(i)+L(i)))>=0;

forall(i in I, j in I | j <> i)   Left(i,j)*(x(i)-(x(j)+L(j)))>=0;

forall(i in I, j in I | j <> i)  Right(i,j)+ Left(i,j)>=1


!Neighborhood constraint

forall(i in J, j in J) V(i,j)*R >= V(i,j)*sqrt(((x(i)-x(j))^2))


!Capacity constraint

forall(i in I) x(i)+L(i)<=Lc


minimize (sum(i in I) sqrt(x(i)^2))



forall(i in I) writeln(getsol(x(i)))


forall(i in I, j in I) writeln(getsol(Right(i,j)))


forall(i in I, j in I) writeln(getsol(Left(i,j)))


I'm looking for what might have caused that and an eventual solution.

Thank you for reading and for your attention.