Please forgive if this question has already been asked.  I couldn't find it in the mail archives ...

Why does this work?

proc {Grocery Root}
   A#B#C#D = Root
   S       = 711
in
   Root ::: 0#S
   A+B+C+D =: S
   A*B*C*D =: S*100*100*100
   %% eliminate symmetries
   A =<: B
   B =<: C
   C =<: D
   {FD.distribute generic(value:splitMax) Root}
end


While substituting the S with its value does not?  I.e.  The following gives a type error when run using {ExploreAll Grocery}:

proc {Grocery Root}
   A#B#C#D = Root
in
   Root ::: 0#711
   A+B+C+D =: 711
   A*B*C*D =: 711*100*100*100
   %% eliminate symmetries
   A =<: B
   B =<: C
   C =<: D
   {FD.distribute generic(value:splitMax) Root}
end

Here is the error I get:
%*************************** type error *************************
%**
%** Expected type: vector of integer in [~134 217 727,...,134 217 727]
%** At argument:   1
%** In statement:  {FDP.sumCN ~711000000#1 '#'(1)#(_{0#711}#_{0#711}#_{0#711}#_{0#711}) '=:' 0}
%**
%** Call Stack:
%** procedure 'FDSumCN' in file "/tmp/buildd/mozart-1.3.1.20040616/mozart/share/lib/compiler/RunTime.oz", line 286, column 3, PC = 136690896
%**--------------------------------------------------------------


TIA

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

Reply via email to