Skip to content

Commit

Permalink
fix runtime check
Browse files Browse the repository at this point in the history
  • Loading branch information
lperron committed Oct 24, 2024
1 parent 18df536 commit 7ee3925
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ortools/sat/csharp/Constraints.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public TableConstraint AddTuple(IEnumerable<int> tuple)
table.Values.Add(value);
count++;
}
if (count != table.Vars.Count)
if (count != table.Exprs.Count)
{
throw new ArgumentException("addTuple", "tuple does not have the same length as the variables");
}
Expand All @@ -199,7 +199,7 @@ public TableConstraint AddTuple(IEnumerable<long> tuple)
table.Values.Add(value);
count++;
}
if (count != table.Vars.Count)
if (count != table.Exprs.Count)
{
throw new ArgumentException("addTuple", "tuple does not have the same length as the variables");
}
Expand All @@ -219,7 +219,7 @@ public TableConstraint AddTuples(int[,] tuples)
{
TableConstraintProto table = Proto.Table;

if (tuples.GetLength(1) != table.Vars.Count)
if (tuples.GetLength(1) != table.Exprs.Count)
{
throw new ArgumentException("addTuples", "tuples does not have the same length as the variables");
}
Expand Down Expand Up @@ -247,7 +247,7 @@ public TableConstraint AddTuples(long[,] tuples)
{
TableConstraintProto table = Proto.Table;

if (tuples.GetLength(1) != table.Vars.Count)
if (tuples.GetLength(1) != table.Exprs.Count)
{
throw new ArgumentException("addTuples", "tuples does not have the same length as the variables");
}
Expand Down

0 comments on commit 7ee3925

Please sign in to comment.