How would I find the constraint value of a variable using SAT_INTEGER_PROGRAMMING given a feasible solution. Essentially solution_value() but for constraint.
Looked through documentation and nothing that helps with that above
How would I find the constraint value of a variable using SAT_INTEGER_PROGRAMMING given a feasible solution. Essentially solution_value() but for constraint.
Looked through documentation and nothing that helps with that above
Assuming you are using pywraplp
, there is ComputeConstraintActivities
which computes the sum of the linear terms of each constraint. Have a look at linear_programming.py for usage.
If you are using model_builder
, then this should be followed.