lib/gecoder/interface/search.rb in gecoder-0.4.0 vs lib/gecoder/interface/search.rb in gecoder-0.5.0

- old
+ new

@@ -1,15 +1,7 @@ module Gecode class Model - private - - # Used during the search. - COPY_DIST = 16 - ADAPTATION_DIST = 4 - - public - # Finds the first solution to the modelled problem and updates the variables # to that solution. Returns the model if a solution was found, nil # otherwise. def solve! space = dfs_engine.next @@ -52,9 +44,12 @@ # Execute constraints. constraints.each{ |con| con.post } constraints.clear # Empty the queue. stop = Gecode::Raw::Search::Stop.new - Gecode::Raw::DFS.new(active_space, COPY_DIST, ADAPTATION_DIST, stop) + Gecode::Raw::DFS.new(active_space, + Gecode::Raw::Search::Config::MINIMAL_DISTANCE, + Gecode::Raw::Search::Config::ADAPTIVE_DISTANCE, + stop) end end end