Skip to content

Conversation

@IgnaceBleukx
Copy link
Collaborator

Update the function headers of solve and solveAll with type hints for the time_limit argument.

Something weird was the def solve() function of the superclass, it has some weird model argument which did not make any sense to me; according to git blame it has been there since 2021.

Also fixes #745 (new version of gcs)

@IgnaceBleukx IgnaceBleukx requested a review from ThomSerg October 19, 2025 12:46
@IgnaceBleukx IgnaceBleukx changed the title Update .solve() functions with type arguments Update .solve() functions with typed arguments Oct 19, 2025
@tias tias added the for stable label Nov 3, 2025
@tias tias added this to the v.0.10.0 milestone Nov 3, 2025
@Dimosts Dimosts self-requested a review November 3, 2025 12:58
Copy link
Collaborator

@ThomSerg ThomSerg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Maybe change the pull request's title to reflect that this is only for the time_limit argument, and for the others (for example not for solution_limit).

@IgnaceBleukx IgnaceBleukx changed the title Update .solve() functions with typed arguments Update .solve() functions with typed time_limit argument Nov 17, 2025
Copy link
Collaborator

@Dimosts Dimosts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why only time_limit and not e.g. also solution_limit? I suggest that we should do all that w can in the PR.

@IgnaceBleukx
Copy link
Collaborator Author

I updated the other common arguments to the solve/solveall functions, as well as the solution hint function.
For PySAT, I noticed we actually only support solution hinting for Boolean variables, even tho we have int2bool now.

It's out of scope for this PR to fix it, but maybe @hbierlee could have a look at this in the future?

This one should be ready for a re-review.

Copy link
Collaborator

@ThomSerg ThomSerg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small comments

Copy link
Collaborator

@tias tias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, please keep the ball rolling

@IgnaceBleukx IgnaceBleukx changed the title Update .solve() functions with typed time_limit argument Update solve and solveAll with typehints Dec 18, 2025
@IgnaceBleukx
Copy link
Collaborator Author

Assuming the tests pass, I think this can be merged now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GCS float time limit

6 participants