Skip to content

Commit

Permalink
add_constrained_variable with 2 sets
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat authored and odow committed Nov 5, 2024
1 parent d066d0d commit 955bbb7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/variables.jl
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ function add_constrained_variable(model::ModelLike, set::AbstractScalarSet)
return variable, constraint
end

function add_constrained_variable(model::ModelLike, set1::AbstractScalarSet, set2::AbstractScalarSet)
variable, constraint1 = add_constrained_variable(model, set1)
constraint2 = add_constraint(model, variable, set2)
return variable, constraint1, constraint2
end

"""
supports_add_constrained_variables(
model::ModelLike,
Expand Down

0 comments on commit 955bbb7

Please sign in to comment.