def gurobi_status
      intptr = FFI::MemoryPointer.new :pointer
      ret = Gurobi.GRBgetintattr @ptr, Gurobi::GRB_INT_ATTR_STATUS, intptr
      fail if ret != 0

      case intptr.read_int
      when Gurobi::GRB_OPTIMAL
        :optimized
      when Gurobi::GRB_INFEASIBLE, Gurobi::GRB_INF_OR_UNBD,
        Gurobi::GRB_UNBOUNDED
        :invalid
      else
        :unknown
      end
    end
def gurobi_status
      intptr = FFI::MemoryPointer.new :pointer
      ret = Gurobi.GRBgetintattr @ptr, Gurobi::GRB_INT_ATTR_STATUS, intptr
      fail if ret != 0

      case intptr.read_int
      when Gurobi::GRB_OPTIMAL
        :optimized
      when Gurobi::GRB_INFEASIBLE, Gurobi::GRB_INF_OR_UNBD,
        Gurobi::GRB_UNBOUNDED
        :invalid
      else
        :unknown
      end
    end
Get the status of the model