[gecode-users] IntVar class container as parameter for branchers

Christian Schulte cschulte at kth.se
Tue Apr 23 15:49:41 CEST 2013


That's fine. But have make sure to update the variables! Christian

 

--

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

 

From: christine bouzant [mailto:christine.bouzant at gmail.com] 
Sent: Tuesday, April 23, 2013 3:42 PM
To: cschulte at kth.se
Cc: users at gecode.org
Subject: Re: [gecode-users] IntVar class container as parameter for
branchers

 

Hello Christian,

Thank you!
Ok, then i will use a LocalHandle. Do you confirm that it is not a bad idea
to pass such an object as a parameter of a brancher (knowing that it
contains several IntVar variables) ?

Cheers,

Christine

 

 

2013/4/23 Christian Schulte <cschulte at kth.se>

Hi Christine,

 

If the data structure is small then you do not have to share it by use of a
LocalHandle. If it is maybe not so small then the use of LocalHandle might
be useful.

 

I personally always use LocalHandle when I can use it (that is, I have a
data structure shared between several entities in a space).

 

Best

Christian

 

--

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

 

From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of christine bouzant
Sent: Tuesday, April 23, 2013 3:10 PM
To: users at gecode.org
Subject: [gecode-users] IntVar class container as parameter for branchers

 

Hello all,

In my script class, i have an array of CarDeparture pointer objects which
class contains several IntVar variables and some data information.

Inside the script copy constructor, i create a copy of the array of
CarDeparture objects using a CarDeparture copy constructor which updates
each of its IntVar variables and data.

I am thinking to set a CarDeparture object as a parameter for a brancher.

So, i should again do a copy of this object inside the brancher copy
constructor.

According to you, is it judicious to proceed like this concerning
performance ?

Or maybe, can i make the CarDeparture class inherit of LocalHandle (in order
to be space dependant ?).

 

Thank you all.

Cheers,

Christine

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20130423/b58cb57e/attachment-0001.html>


More information about the users mailing list