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

Support for optimize #1

Closed
domoritz opened this issue Nov 9, 2017 · 2 comments
Closed

Support for optimize #1

domoritz opened this issue Nov 9, 2017 · 2 comments

Comments

@domoritz
Copy link
Contributor

domoritz commented Nov 9, 2017

If I have soft constraints, this library gives me multiple results and also does not return the penalty for the different optimizations.

I saw yield_stats but it's not passed through from clyngor.solve.

@Aluriak Aluriak mentioned this issue Nov 9, 2017
@Aluriak
Copy link
Owner

Aluriak commented Nov 9, 2017

I just updated clyngor to 0.1.0, that now handle access to stats and optimizations.

solver = clyngor.solve(...)
solver.stats  # it's a dict

for answer, opt in solver.with_optimization:
    # opt is the optimization score

Note that the stats are copy pasted raw into a dict, without any consideration for the eventual doublons or hierarchy.

@Aluriak Aluriak closed this as completed Nov 9, 2017
@Aluriak
Copy link
Owner

Aluriak commented Jan 30, 2018

In case you update : the optimization score is now a list of integers, enable support of multiple optimization scores.

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