Skip to content

Clearer error message with constrained variables in VectorOfVariables - #3061

Merged
odow merged 2 commits into
masterfrom
bl/subs_vov
Aug 20, 2026
Merged

Clearer error message with constrained variables in VectorOfVariables#3061
odow merged 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.

@odow
odow merged commit 9abcbea into master Aug 20, 2026
30 checks passed
@odow
odow deleted the bl/subs_vov branch August 20, 2026 22:59
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