Thank you very much!!
The aid has served to me to improve other things besides to understand like solving my specific problem, since nonwise that can be passed extra information to the distributor.
Treat to use the advice who you have given me to solve the problem of
N-Queens, since a specific number of variables is not had there, nevertheless does not throw errors but it does not show the Explorer with the generated tree
 

Instead of using {FD.distribute Strategy [X#2 Y#2 Z#3]}, I'm using {FD.distribute Strategy {Map Lista fun{$ I} Row.I end}} , where Lista has the weights.
 
Script is the following one:
 

fun {Queens N}
   Num = N  
    proc {$ Row}
       L1N ={MakeTuple c N}
    in
       {FD.tuple queens N 1#N Row}
       {FD.distinct Row}
       {For 1 N-1 1
  proc {$ I}
     {For I+1 N 1
      proc{$ J}
         Row.I - Row.J \=: I - J
         Row.I - Row.J \=: J - I
      end
     }
  end
  }
   {FD.distribute Strategy {Map Lista fun{$ I} Row.I end}}        
 end    
end
{ExploreOne {Queens 4}}
 



LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com
_________________________________________________________________________________
mozart-users mailing list                               
mozart-users@ps.uni-sb.de
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to