[gecode-users] Obtaining information about variablesHi for variable selection

Christian Schulte cschulte at kth.se
Mon Jul 20 14:25:01 CEST 2009


Hi,

Sorry, it's me again. I think I know the problem: when you check the members
in the doc you only see the direct members but not the inherited ones. But
there is always a link for showing all members, check here for IntVar:
	
http://www.gecode.org/doc-latest/reference/classGecode_1_1Int_1_1IntView-mem
bers.html

Cheers
Christian

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


-----Original Message-----
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Christian Schulte
Sent: Monday, July 20, 2009 2:20 PM
To: 'Mikael Zayenz Lagerkvist'; 'Kish Shen'
Cc: users at gecode.org
Subject: Re: [gecode-users] Obtaining information about variablesHi for
variable selection

Hi Kish,

I am just back from holidays. Actually, there is no problem. For an IntVar
x, x.degree() returns the number of subscribed propagators (just checked)!
What was the error you got?

The only thing that's missing is regret_min and regret_max which will be
available for IntVar (and BoolVar) in the next release.

Christian

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

-----Original Message-----
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Mikael Zayenz Lagerkvist
Sent: Thursday, July 02, 2009 7:18 AM
To: Kish Shen
Cc: users at gecode.org
Subject: Re: [gecode-users] Obtaining information about variablesHi for
variable selection

Hi,

The degree-information for variables is only available through the
view-interfaces [1]. Similarly for regret-information.

As a simple example, given that you have an IntVar x, and you want to
access the degree-information, you could do the following:
    IntVar x;
    // ...
    Int::IntView xv(x);
    if (xv.degree() > some_degree) {

Cheers,
Mikael

[1]
Integer views:
http://www.gecode.org/doc-latest/reference/group__TaskActorIntView.html
Set views:
http://www.gecode.org/doc-latest/reference/group__TaskActorSetView.html

On Thu, Jul 2, 2009 at 3:43 AM, Kish Shen<kisshen at cisco.com> wrote:
> Hi,
>
> Is it possible to obtain the information used in the branch() variable
> selection. I am currently most interested in the degree (number of
> propagator depending on a variable) for the IntVars, because there I
> can't find any easy way to obtain this information, but I assume Gecode
> keeps this information internally.
>
> The reason I am interested in this information is for the interface to
> Gecode I am developing for ECLiPSe. I now have a basic working version
> where Gecode is used to perform the propagation of the constraints,
> while ECLiPSe does the search, which include variable and value
> selections. I need the degree information for variable selection, and
> because the selection is done in ECLiPSe, I cannot use branch().
>
> Thanks in advance for any help and information!
>
> Cheers,
>
> Kish
> --
> This e-mail may contain confidential and privileged material for the
> sole use of the intended recipient. Any review, use, distribution or
> disclosure by others is strictly prohibited. If you are not the intended
> recipient (or authorized to receive for the recipient), please contact
> the sender by reply e-mail and delete all copies of this message.
> Cisco Systems Limited (Company Number: 02558939), is registered in
> England and Wales with its registered office at 1 Callaghan Square,
> Cardiff, South Glamorgan CF10 5BT.
>
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users
>



-- 
Mikael Zayenz Lagerkvist, http://www.ict.kth.se/~zayenz/

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


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





More information about the gecode-users mailing list