def set_variable_type(index, type)
      case type
      when :integer
        ret = LPSolve.set_int @ptr, index, 1
      when :binary
        ret = LPSolve.set_binary @ptr, index, 1
      when :continuous
        ret = LPSolve.set_int @ptr, index, 0
      else
        fail type
      end

      fail if ret != 1
    end
def set_variable_type(index, type)
      case type
      when :integer
        ret = LPSolve.set_int @ptr, index, 1
      when :binary
        ret = LPSolve.set_binary @ptr, index, 1
      when :continuous
        ret = LPSolve.set_int @ptr, index, 0
      else
        fail type
      end

      fail if ret != 1
    end
Set the type of a variable