Ask Your Question

tom123's profile - activity

2016-01-12 19:52:46 +0200 received badge  Student (source)
2016-01-09 14:31:24 +0200 received badge  Scholar (source)
2016-01-09 13:45:43 +0200 asked a question Get index of a set constraint

Using SageMath I'm trying to implement a method for the solution of a problem where I in an iterative way add a set of constraints, try to solve the problem to check if exist a solution, if not i remove the constraints and restart.

 try:
    p.solve()           
 except RuntimeError:
    p.remove_constraint(index)

Given a set of constraint that I add, how to get their indexes so that I can remove them?