Skip to content

Conversation

@Dimosts
Copy link
Contributor

@Dimosts Dimosts commented Oct 12, 2024

An issue appeared in get_scope, when the argument of a (sub)expression was a list, e.g. in sum constraints. It just ignored it and returned an empty list of vars. This PR fixes it, taking this case into account.

This PR is to be merged after the (coming) tests PR. Will also add a test for this case.

@Dimosts Dimosts requested a review from senneberden October 21, 2024 07:48
@Dimosts Dimosts marked this pull request as ready for review October 21, 2024 07:48
Copy link
Collaborator

@senneberden senneberden 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, except that I think that function get_variables_from_constraints(constraints)should use get_scope(constraint), instead of CPMpy's get_variables, even though get_scope in turn just calls get_variables.

@Dimosts Dimosts merged commit 2fa14c8 into main Nov 27, 2024
1 check failed
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

Successfully merging this pull request may close these issues.

3 participants