Skip to content

Commit 7f3c756

Browse files
committed
implement time limit setting
Thanks @mihai-sysbio for the suggestion. Refs #807.
1 parent 6affbb7 commit 7f3c756

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/misc/settings.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,11 @@ Modification that disable all output from the JuMP optimizer (shortcut for
5656
"""
5757
silence(opt_model) = J.set_silent(opt_model)
5858

59+
"""
60+
$(TYPEDSIGNATURES)
61+
62+
Portable way to set a time limit in seconds for the optimizer computation.
63+
"""
64+
set_time_limit_sec(limit) = opt_model -> J.set_time_limit_sec(opt_model, limit)
65+
5966
export silence

0 commit comments

Comments
 (0)