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

Check whether constraint is possible

parent d296ff7b
No related branches found
No related tags found
No related merge requests found
......@@ -32,7 +32,7 @@ function ADC(nsamples; dwell_time=nothing, time_to_center=nothing, center_halfwa
)
@constraint global_model() res.dwell_time >= 0
if center_halfway
@constraint global_model() 2 * res.time_to_center == duration(res)
apply_simple_constraint!(duration(res), 2 * res.time_to_center)
else
@constraint global_model() res.time_to_center >= 0
@constraint global_model() res.time_to_center <= duration(res)
......
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