Ignored constraints on non linear problem

Question asked by amaury.bellocq@etu.enstib.univ-lorraine.fr on Dec 17, 2015

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";

declarations

NC=2

I=1..NC

J=0..NC

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

Lc=3

R=0.5

Objective:linctr

end-declarations

L::[2,1]

V::[0, 1,-1,

1, 0,-1,

-1,-1, 0]

x(0)=0

!Expected results

!x(1)=0

!x(2)=2

!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

!Positionning

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))

writeln("x=")

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

writeln("Right=")

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

writeln("Left=")

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

end-model

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