[gecode-users] question about lexical ordering constraint and others

Kish Shen kisshen at cisco.com
Tue May 10 21:13:28 CEST 2011


Hi Christian,

Thanks for your reply!

On 10/05/2011 19:25, Christian Schulte wrote:
> Hi Kish,
>
> 1) Hmmm, never thought about that. You could emulate this behavior by
> extending one array as you suggested. Do you know any application that
> relies on this behavior?
>

Well, I don't really know applications that well, especially with using 
lexical ordering in a constraint setting, so I can't say if any 
application relies on this behaviour.

However, being able to sort sequences of different lengths in lexical 
order seems very natural and useful -- dictionaries (for languages with 
an alphabet) relies on this.

I think in practice for implementing the constraint behaviour, you don't 
always have to extend the shorter sequence....

> 2) Just ICL_DEF which is as the algorithm by Paul Shaw, see the referenced
> paper.
>

OK, I see. I guess this means the propagation strength doesn't fit well 
into the predefined levels.

> 3) Gecode always chooses the best propagator, cumulative is a good example:
> if all the variables for the use are assigned it'll choose the special case.
> If it is clear that cumulative is not needed (for example, all tasks require
> more than half of the resource), a disjunctive scheduling propagator is
> posted. This is true for all constraints: you ask which constraint you want
> to have and Gecode posts the best propagator(s) it can for the constraint.
>

Great, this is what I was hoping for, so I don't need to do all the 
extra checks to chose the right version of the constraint to call.

Thanks again,

Kish
> Cheers
> Christian
>
> --
> Christian Schulte, KTH, web.it.kth.se/~cschulte/
>
> -----Original Message-----
> From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
> Of Kish Shen
> Sent: Tuesday, May 10, 2011 6:35 PM
> To: users at gecode.org
> Subject: [gecode-users] question about lexical ordering constraint and
> others
>
> Hi,
>
> I have a few (more) question about various Gecode constraints that I am
> interfacing to ECLiPSe:
>
> 1) the constraint for lexical ordering
>
> rel(Home, IntVarArgs, IntRelType, IntVarArgs)
>
> requires the two arrays to be the same size. It seems the same restriction
> applies in the global constraint catalog for the lexical ordering
> constraints as well. However, the existing ECLiPSe lexical ordering
> constraints does not have this restriction -- i.e. the two sequences of
> numbers being compared can be different lengths. What is the reason for the
> same length restriction?
>
> The lexical ordering for sequences of different length used in ECLiPSe seems
> to be the natural one, where missing numbers in the shorter sequence are
> replaced by 'bottom', i.e. a value smaller than any number.
> So (using . to separate numbers in a sequence)
>
> 1.3>  1.2.5
>
> 1.2.5>  1.2
>
> etc.
>
> Could such a definition of ordering be used in the Gecode version as well?
>
> 2. What IntConLevel is supported in the binpacking constraint? I can't find
> a specification for this in the reference documentation (in
> doc-latest) [beyond the default of ICL_DEF]
>
> 3. For various versions of the same constraint (e.g. cumulative), some
> arguments can be IntArgs or IntVarArgs. In general, does it make a
> difference if I always use the version with IntVarArgs, even if all the
> IntVar has only one element in their domain (i.e. they are integers)?
> I guess what I am asking is if (in general) Gecode does a check of its
> IntVarArgs argument to see if they are all integers and calls a more
> efficient implementation for the constraint if there is one? [I was
> specifically looking at the cumulative constraint, but there are obviously
> others].
>
> The reaosn I ask is that in interfacing such constraints to ECLiPSe, I
> currently don't check if such arguments are all integers or if they contain
> some domain variables (IntVar). I can do this check, but if it is done in
> Gecode already, there is no reason for me to do so.
>
>
> 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
>


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



More information about the users mailing list