def store_variable(var)
      # Update the variable to track the index in the model
      index = @var_count + 1
      var.model = self
      var.index = index
      @var_count += 1

      @variables << var

      # Set variable properties
      GLPK.glp_set_col_name(@ptr, index, var.name)
      GLPK.glp_set_col_kind(@ptr, index, glpk_type(var.type))
      GLPK.glp_set_obj_coef(@ptr, index, var.coefficient)
      set_variable_bounds index, var.lower_bound, var.upper_bound
    end
def store_variable(var)
      # Update the variable to track the index in the model
      index = @var_count + 1
      var.model = self
      var.index = index
      @var_count += 1

      @variables << var

      # Set variable properties
      GLPK.glp_set_col_name(@ptr, index, var.name)
      GLPK.glp_set_col_kind(@ptr, index, glpk_type(var.type))
      GLPK.glp_set_obj_coef(@ptr, index, var.coefficient)
      set_variable_bounds index, var.lower_bound, var.upper_bound
    end
Save the variable to the model and update the variable pointers