[gecode-users] error_segmentation

Christian Schulte cschulte at kth.se
Mon Jan 20 22:29:12 CET 2014


But the Boolean variable is not! Please read in MPG about reification, then
you will see that you actually do not need the Reify thing.

 

Christian

 

--

Christian Schulte, www.ict.kth.se/~cschulte

 

From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of mehdi m
Sent: Monday, January 20, 2014 10:23 PM
To: users at gecode.org
Subject: Re: [gecode-users] error_segmentation

 

 

Arrays are initialized properly like this: 

int i=5;

int m=10;

BoolVar B;

Reify r(b);

Intargs D (n*m);

Matrix <IntArgs> A (*this, n, m);

for (int i=0;i<m;i++){

     for(int j=0;j<n;j++){

     A(i,j)=1;

     }

}

for (int i=0;i<m;i++){

linear (*this, A.col(i),B , IRT_EQ, 0, r); 

}

 

if you have an example of reification of linear constraint, could you send
it to me.

Thank you.

Cheers

Mehdi

  _____  

From: medistif at hotmail.fr
To: users at gecode.org
Date: Mon, 20 Jan 2014 20:22:53 +0000
Subject: [gecode-users] error_segmentation

Hello everyone,

in my model,  i want to express : x <--> Sum Ai*Bi = 0.

why i use linear constraint and reification such as :

 

IntArgs A ;

BoolVarArray B;

BoolVar b;

reify r (b);

linear (*this, A , B , IRT_EQ , 0 , r);

 

when running this gives me a segmentation fault. when I deleted the
parameter r that passes, the problem might therefore be in the parameter r.

 

if someone has an idea ! .

thank you.

Cheers,

Mehdi  


_______________________________________________ Gecode users mailing list
users at gecode.org https://www.gecode.org/mailman/listinfo/gecode-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20140120/9991e598/attachment.html>


More information about the users mailing list