lib/solvers/glpk.rb in rulp-0.0.43 vs lib/solvers/glpk.rb in rulp-0.0.44
- old
+ new
@@ -1,8 +1,11 @@
class Glpk < Solver
def solve
command = "#{executable} --lp #{@filename} %s --cuts --output #{@outfile}"
- command %= options[:gap] ? "--mipgap #{options[:gap]}" : ""
+ command %= [
+ options[:gap] ? "--mipgap #{options[:gap]}" : "",
+ options[:time_limit] ? "--tmlim #{options[:time_limit]}" : ""
+ ]
exec(command)
end
def self.executable
:glpsol
\ No newline at end of file