Linear programming in Ruby