Closed hsa-online closed 7 years ago
I will look into this, thx for report ^_^
good catch! I think i find the issue: when add a unsatisfied constraint, I needn't remove the constraint, because it doesn't add into solver yet! I have pushed the solution, you can try it out.
Thanks for reporting this :)
I'm not sure this change is correct, I will look it again tomorrow, and add some test case to confirm it.
Ok, good! Thank you.
I made another changes and added back the assert(). fallback am_add() changes should just remove error variables in objective, without other operations.
you can close this issue now :)
Yes, it now returns AM_UNSATISFIED as I expected. Thank you!
I made a quite simple test of the constraint solver which tries to distribute nodes of the binary tree on the plane (like mentioned at the section 3.2 of the article written Cassowary authors).
And on adding "Unsatisfied" constraint the library causes "Assertion failed at amoeba.h line 935"
I created a gist with the test code: https://gist.github.com/hsa-online/bd69ddb7147eb20d55ce7fc95faa80d5
P.S. When all constraints are "correct" solver seems to be working properly