Skip to content

Clearer error message with constrained variables in VectorOfVariables - #3061

Open
blegat wants to merge 2 commits into
masterfrom
bl/subs_vov
Open

Clearer error message with constrained variables in VectorOfVariables#3061
blegat wants to merge 2 commits into
masterfrom
bl/subs_vov

Conversation

@blegat

@blegat blegat commented Aug 20, 2026

Copy link
Copy Markdown
Member

When there was a variable constrained at creation in a VectorOfVariables constraint, it was just throwing a MethodError. Now we have a clearer error.
The reason we error is that we want to keep the VectorOfVariables type. If a variable is mapped to a variable, we can actually make it work. It is useful for https://github.com/NexOR-Optimization/MathOptVRP.jl/blob/0fc70cc2176767472aad8643c2e2c8f66e5cd00e/src/Bridges/PermutationToPartitionBridge.jl#L17 which mapped variables to other variables without transformation.
Also for

mutable struct VectorizeBridge{T,S} <: AbstractBridge
if the constant is zero.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants