Skip to content
Snippets Groups Projects
Verified Commit 18a6f4c7 authored by Michiel Cottaar's avatar Michiel Cottaar
Browse files

apply constraints to vector variables

parent c6642808
No related branches found
No related tags found
No related merge requests found
Pipeline #22721 failed
......@@ -282,6 +282,7 @@ apply_simple_constraint!(model::Model, variable, value::Symbol) = apply_simple_c
apply_simple_constraint!(model::Model, variable, ::Val{:min}) = @objective model Min objective_function(model) + variable
apply_simple_constraint!(model::Model, variable, ::Val{:max}) = @objective model Min objective_function(model) - variable
apply_simple_constraint!(model::Model, variable, value::VariableType) = @constraint model variable == value
apply_simple_constraint!(model::Model, variable::AbstractVector, value::AbstractVector) = [apply_simple_constraint!(model, v1, v2) for (v1, v2) in zip(variable, value)]
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment