It's working OK. Todo: add some constraint programming, global and local search