Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Can't remove unsatisfiable constraint #12

Closed
romannep opened this issue Mar 15, 2022 · 1 comment
Closed

[BUG] Can't remove unsatisfiable constraint #12

romannep opened this issue Mar 15, 2022 · 1 comment

Comments

@romannep
Copy link
Contributor

Reproducible example

    final a = Param();
    final b = Param();
    final c1 = a >= cm(10);
    final c2 = b <= cm(5);
    final c3 = b >= a;

    final solver = Solver();
    print('add c1 ${solver.addConstraint(c1).message}');
    print('add c2 ${solver.addConstraint(c2).message}');
    print('add c3 ${solver.addConstraint(c3).message}');
    print('remove c3 ${solver.removeConstraint(c3).message}');
    solver1.flushUpdates();
    print('vars a=${a.value} b=${b.value}');

Output

add c1 Success
add c2 Success
add c3 Unsatisfiable constraint
remove c3 Unknown constraint
vars a=10 b=10

Solver says "Unknown constraint" on removing c3 constraint, but c3 constraint has an impact on the solution.

romannep added a commit to romannep/cassowary.dart that referenced this issue Mar 16, 2022
@romannep romannep reopened this Mar 16, 2022
@domesticmouse
Copy link
Member

#13 has been published as 0.4.1 - https://pub.dev/packages/cassowary/changelog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants