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

opt.solution_prefix & opt-dump_models not working #7402

Closed
bruderj15 opened this issue Sep 26, 2024 · 1 comment
Closed

opt.solution_prefix & opt-dump_models not working #7402

bruderj15 opened this issue Sep 26, 2024 · 1 comment

Comments

@bruderj15
Copy link

bruderj15 commented Sep 26, 2024

Hello.

When playing around with the optimizer I stumbled on similar issues as in #1463 .
On Ctrl-C responding with unknown and the best known intermediate solution unfortunately does not yield any value.
Why can't it be sat instead?
Although not optimal, the model clearly is supposed to satisfy the constraints.

When trying to write intermediate solutions or dumping intermediate models nothing happens.
Should be reproducible with this: foo.txt

Version: 4.13.0

NikolajBjorner added a commit that referenced this issue Oct 1, 2024
Signed-off-by: Nikolaj Bjorner <[email protected]>
@NikolajBjorner
Copy link
Contributor

The option :opt.solution_prefix had been bit-rotting. It wasn't enabled.
I have re-enabled it and put it in a place where the models get dumped to files.
There are some other ways to retrieve models:

  • :opt.dump_models = true - prints the models to the console
  • Using the programmatic API you can attach a callback when the solver has a model.

I would prefer to return unknown even if there is a model in this case to distinguish optimality from feasibility in the optimization scenario. The optimal remains "unknown".

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