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

Unpractical type casting for Vector Constraints #118

Closed
PierreTsr opened this issue May 6, 2021 · 2 comments · Fixed by #120
Closed

Unpractical type casting for Vector Constraints #118

PierreTsr opened this issue May 6, 2021 · 2 comments · Fixed by #120
Assignees
Labels
enhancement New feature or request

Comments

@PierreTsr
Copy link
Contributor

Currently all the constraints that take a vector of variables as input are casted as Vector{AbstractIntVar}. This is useful in order to define constraints on IntVar but also on IntVarView.
However, by doing it that way, the user is forced to cast its vector as AbstractIntVar eventhough the vector contains only a more specific variable type, which is quite unpractical.

This could be fixed easily by casting the input of these constraints as Vector{<:AbstractIntVar}, and it would even allow a more specific dispatch in the constraints if needed.

@PierreTsr PierreTsr added the enhancement New feature or request label May 6, 2021
@PierreTsr PierreTsr self-assigned this May 6, 2021
@qcappart
Copy link
Collaborator

I agree , it seems to be a suited improvement. @ilancoulon and @felixchalumeau do you see any issue with this ?

@ilancoulon
Copy link
Contributor

I think it is a a great idea!

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

Successfully merging a pull request may close this issue.

3 participants