def store_constraint(constr)
      # Update the constraint to track the index in the model
      index = LPSolve.get_Nrows(@ptr)
      constr.model = self
      constr.index = index
      constr.freeze
      @constr_count += 1

      # Set constraint properties
      if constr.name
        ret = LPSolve.set_row_name(@ptr, index, constr.name)
        fail if ret != 1
      end

      # Determine the correct constant for the type of constraint
      case constr.sense
      when :==
        type = LPSolve::EQ
      when :>=
        type = LPSolve::GE
      when :<=
        type = LPSolve::LE
      end

      store_constraint_matrix constr, type
      @constraints << constr
    end
def store_constraint(constr)
      # Update the constraint to track the index in the model
      index = LPSolve.get_Nrows(@ptr)
      constr.model = self
      constr.index = index
      constr.freeze
      @constr_count += 1

      # Set constraint properties
      if constr.name
        ret = LPSolve.set_row_name(@ptr, index, constr.name)
        fail if ret != 1
      end

      # Determine the correct constant for the type of constraint
      case constr.sense
      when :==
        type = LPSolve::EQ
      when :>=
        type = LPSolve::GE
      when :<=
        type = LPSolve::LE
      end

      store_constraint_matrix constr, type
      @constraints << constr
    end
Save the constraint to the model and update the constraint pointers