Good morning,
or shall I say Good night? ;-)

Just wanted to give you a last comment on the problem - the number 64 appears to be somewhat magical.... I was using 50#70 as a domain for my problem - when I change it to 50#63, after a while, I get the correct answer: nil - no solution found ( [50#63 65] would be problematic again.).

OZ_Return FSetDistinctPropagator::propagate(void)
[snip]
  // glb(x) is_not_subseteq lub(y) -> entailed
  {
    OZ_FSetValue glb_x = x->getGlbSet();
    OZ_FSetValue lub_y = y->getLubSet();

    if(!(glb_x <= lub_y)) {
        // *** the problem is here ***
       return P.vanish();
      }
  }

When x is known to be [50#53 64] and y is completely undetermined (except for having card 5), for some reason !(glb_x <= lub_y) ist true, although lub_y is [0#134217726] and thus glb_x should always be a subset.

Okay, as a workaround, what helps is declaring the sets with {FS.var.upperBound [50#70]} instead of {FS.var.decl}, as I did, because I was lazy...

Maybe all this was known already? Sorry for any redundancy...

Bye,

        Kilian

Am 19.05.2006 um 22:05 schrieb Kilian Sprotte:

Hi again,

I have written a little script that seems to show buggy behaviour.... I'd be very happy to learn the opposite, though! In any case, please bear with me, I am a musician, who is considering those sets as hopefully distinct chords....

I get [[50 51 52 53 64] [50 51 52 53 64]] as a solution, so the line {FS.distinct S1 S2} seems to have no effect.

When I remove those lines,

               % lets try to be contradictory
               I = {FS.var.decl}
               {FS.intersect S1 S2 I}
               {FS.card I 5}

the result is [[50 51 52 53 54] [50 51 52 53 55]], which is nice indeed and happened due to {FS.distinct S1 S2}, cause removing it as well yields [[50 51 52 53 54] [50 51 52 53 54]].

I still hope, I am doing something wrong....

Ciao,

        Kilian

--

declare
fun {Ints2Set Ints}
   S = {FS.var.decl}
in
   {FD.distinct Ints}
   {ForAll Ints proc {$ X} {FS.include X S} end}
   {FS.card S {Length Ints}}
   S
end

{Browse
{SearchOne proc {$ Root}
               S1 S2
               I
            in
               % A Root with only FD ints - only those are distributed
Root = [[{FD.int 50#70} {FD.int 50#70} {FD.int 50#70} {FD.int 50#70} {FD.int 50#70}] [{FD.int 50#70} {FD.int 50#70} {FD.int 50#70} {FD.int 50#70} {FD.int 50#70}]]
               % Making Sets from the two parts of Root
               S1 = {Ints2Set Root.1}
               S2 = {Ints2Set Root.2.1}
               % the prop to be tested
               {FS.distinct S1 S2}
               % lets try to be contradictory
               I = {FS.var.decl}
               {FS.intersect S1 S2 I}
               {FS.card I 5}
               {FD.distribute naive {Append Root.1 Root.2.1}}
            end}.1}


Am 19.05.2006 um 16:19 schrieb Kilian Sprotte:

Hello all,

currently, I am having a difficult time with FS.distinct. I am experiencing this in a bigger setup and haven't really managed to reproduce my problem in a small example, sorry, (I'll send it to you, if I find one), but nevertheless I wanted to tell you my observations.

If I have two FS sets A and B, which have both of them a cardinality of 5, I get 2 completely equal sets in the solution, although I have posted:

{FS.distinct A B}

If I change this line to a kind of handmade distinct à la:

local
        I C
in
        I = {FS.var.decl}
        {FS.intersect A B I}
        C = {FS.int 0#4}                % I know A's and B's card is 5!
        {FS.card I C}
end

I indeed get 2 different sets....

Any comments?

Thanks,
        Kilian



_____________________________________________________________________ ____________ mozart-users mailing list mozart- [EMAIL PROTECTED]
http://www.mozart-oz.org/mailman/listinfo/mozart-users


______________________________________________________________________ ___________ mozart-users mailing list mozart- [EMAIL PROTECTED]
http://www.mozart-oz.org/mailman/listinfo/mozart-users


_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to