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

Set constraint if qval is not a number

parent 9357b54a
No related branches found
No related tags found
No related merge requests found
...@@ -25,7 +25,7 @@ function (::Type{InstantGradient})(; orientation=nothing, group=nothing, qval=no ...@@ -25,7 +25,7 @@ function (::Type{InstantGradient})(; orientation=nothing, group=nothing, qval=no
res = InstantGradient3D(get_free_variable.(qval), group) res = InstantGradient3D(get_free_variable.(qval), group)
else else
res = InstantGradient1D(get_free_variable(qval), orientation, group) res = InstantGradient1D(get_free_variable(qval), orientation, group)
if res.qval isa Number if !(res.qval isa Number)
@constraint global_model() res.qval >= 0 @constraint global_model() res.qval >= 0
end end
end end
......
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