Skip to content

[RFC] Element: limit to two elements? #3

@dourouc05

Description

@dourouc05

For now, Element is used to retrieve as many elements from an array as the user wants: https://github.com/dourouc05/ConstraintProgrammingExtensions.jl/blob/master/src/ConstraintProgrammingExtensions.jl#L143-L168. Some solvers implement this form, but for instance CPLEX does not.

The problem comes from the error messages: I don't think it's possible to show an error to the user before reaching CPLEXCP.add_constraint (JuliaConstraints/CPLEXCP.jl@af0ee48).

Would it be better to limit Element to exactly two dimension (an index into the array and the destination variable)? Solvers could implement an optimisation if several Element sets are used, while having good user interface.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions