[gecode-users] affect an IntVarArgs to an integer

Christian Schulte cschulte at kth.se
Thu Jul 4 10:15:44 CEST 2013


Read MPG, IRT_EQ must be ==. Christian

--
Christian Schulte, Professor of Computer Science, KTH,
www.ict.kth.se/~cschulte/


-----Original Message-----
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Jean-Noël Monette
Sent: Thursday, July 04, 2013 10:02 AM
To: users at gecode.org
Subject: Re: [gecode-users] affect an IntVarArgs to an integer

Hi,

I think that if you provide the exact error you encoutered and if you give a
slightly more complete example (e.g. including how you initialise rowArray
and v2), people could more easily help you.

Best,

JN

manel askri <askri.manel1 at gmail.com> a écrit :

> hi
>
> i have a problem with rel
> first i want to know the sum of all integers in an IntVarArgs that 
> whay i use : sum(rowArray), and rowArray is an IntVarArgs
>
> but when i want to create a constraint that oblige the sum(rowArray) 
> to be equal to an IntVar , i wrote this line of code
>
> rel (*this, sum(rowArray),IRT_EQ, v2);
>
> that shows me an error and i dont konw how to solve it , i thought 
> that if i can affect the result of the sum to an integer variable it 
> could be a solution but i don't know how to do it
>
> So please if any one have any help for me thanks very much
>




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




More information about the users mailing list