lib/solvers/pcbc.rb in rulp-0.0.12 vs lib/solvers/pcbc.rb in rulp-0.0.13
- old
+ new
@@ -1,8 +1,9 @@
class PCbc < Solver
- def solve(open_solution=false)
- system("#{executable} #{@filename} threads 8 branch solution #{@outfile}")
- `open #{@outfile}` if open_solution
+ def solve(options)
+ command = "#{executable} #{@filename} %s threads 8 branch solution #{@outfile}"
+ command %= options[:gap] ? "ratio #{options[:gap]}":""
+ system(command)
end
def self.executable
:cbc
end