def build_constraint_matrix(constrs)
      store_constraint_indexes constrs

      # Construct a matrix of non-zero values in CSC format
      start = []
      index = []
      value = []
      col_start = 0
      @variables.each do |var|
        # Mark the start of this column
        start << col_start

        var.constraints.each do |constr|
          col_start += 1
          index << constr.index
          value << constr.expression.terms[var]
        end
      end
      start << col_start

      [start, index, value]
    end
def build_constraint_matrix(constrs)
      store_constraint_indexes constrs

      # Construct a matrix of non-zero values in CSC format
      start = []
      index = []
      value = []
      col_start = 0
      @variables.each do |var|
        # Mark the start of this column
        start << col_start

        var.constraints.each do |constr|
          col_start += 1
          index << constr.index
          value << constr.expression.terms[var]
        end
      end
      start << col_start

      [start, index, value]
    end
Build a constraint matrix for the currently existing variables