0

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

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Am using pywraplp. What i was wondering if I can get the variable value given a constraint. Not the sum of all constraint variables
Makes no sense. Variables have one solution value independently of constraints

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.