I would like to know how can I implement a SUM operation in C# using OR-Tools. In my problem, I have the following constraint:
NOTE: My problem is a Linear Programming Problem.
You can use arithmetic operators:
model.Add(4 * r + 2 * p == 56);
or
model.Add(LinearExpr.Sum(new IntVar[] {r, p}) == 20);
See: https://github.com/google/or-tools/blob/master/ortools/sat/docs/integer_arithmetic.md