lib/solvers/glpk.rb in rulp-0.0.12 vs lib/solvers/glpk.rb in rulp-0.0.13

- old
+ new

@@ -1,8 +1,9 @@ class Glpk < Solver - def solve(open_solution=false) - system("#{executable} --lp #{@filename} --write #{@outfile}") - `open #{@outfile}` if open_solution + def solve(options) + command = "#{executable} --lp #{@filename} %s --cuts --write #{@outfile}" + command %= options[:gap] ? "--mipgap #{options[:gap]}" : "" + system(command) end def self.executable :glpsol end \ No newline at end of file