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

Fix creation of wait_block

parent 4bf78666
No related branches found
No related tags found
No related merge requests found
......@@ -20,20 +20,18 @@ Duration can be set to one of:
struct WaitBlock <: BuildingBlock
model :: Model
duration :: VariableType
function WaitBlock(model::Model, duration=nothing)
res = new(
model,
get_free_variable(model, duration),
)
@constraint model res.duration >= 0
return res
end
end
@global_model_constructor WaitBlock
function WaitBlock(model::Model, duration=nothing)
res = WaitBlock(
model,
get_free_variable(model, duration),
VariableType[]
)
@constraint model duration(res) >= 0
return res
end
"""
to_block(JuMP variable/:min or :max/nothing/number)
......
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