You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to raise an un-intuitive behaviour when mistakenly leaving off an index of a variable in a constraint definition. The first value of the missing index's set is implicitly added, and the user is not warned that this has happened.
This has already been raised in first in #653 and again in #937, where it was referred to the upstream discussion at JuliaLang/julia#14770.
I wonder if the loop here has been closed back to JuMP?
Minimal reproducible example(s):
using JuMP
Arcs =1:2; Time =1:2;
m =Model(); @variable(m, flow[Arcs,Time]);
@constraint(m, FlowBound[a=Arcs,t=Time], flow[a] <=10);
The (easy enough to do) lapse was not adding t to the indexing of flow in the constraint to get the correct constraints for all combinations of Arcs and Time: FlowBound[1,1] : flow[1,1] ≤ 10.0 FlowBound[1,2] : flow[1,2] ≤ 10.0 FlowBound[2,1] : flow[2,1] ≤ 10.0 FlowBound[2,2] : flow[2,2] ≤ 10.0
This occurs regardless other the elements used in the sets e.g. Arcs = [("a","b"), ("a","c"), ("b","c")]; Time = [:x,:y,:z];
The text was updated successfully, but these errors were encountered:
I wanted to raise an un-intuitive behaviour when mistakenly leaving off an index of a variable in a constraint definition. The first value of the missing index's set is implicitly added, and the user is not warned that this has happened.
This has already been raised in first in #653 and again in #937, where it was referred to the upstream discussion at JuliaLang/julia#14770.
I wonder if the loop here has been closed back to JuMP?
Minimal reproducible example(s):
we create 6 constraints
The (easy enough to do) lapse was not adding
t
to the indexing offlow
in the constraint to get the correct constraints for all combinations ofArcs
andTime
:FlowBound[1,1] : flow[1,1] ≤ 10.0 FlowBound[1,2] : flow[1,2] ≤ 10.0
FlowBound[2,1] : flow[2,1] ≤ 10.0 FlowBound[2,2] : flow[2,2] ≤ 10.0
This occurs regardless other the elements used in the sets e.g.
Arcs = [("a","b"), ("a","c"), ("b","c")]; Time = [:x,:y,:z];
The text was updated successfully, but these errors were encountered: