Skip to content

Commit f6ee218

Browse files
authored
Merge pull request #39 from kit-ty-kate/fix-glpk-verbosity
Allow to set the verbosity level in GLPK
2 parents 898c9f5 + 74de7fe commit f6ee218

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/mccs.ml

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,13 @@ let problem_of_cudf cudf =
7575
pb
7676

7777
let resolve_cudf
78-
?(verbose=false) ?timeout ?(solver=default_solver)
78+
?(verbosity=0) ?timeout ?(solver=default_solver)
7979
criteria (preamble, _, _ as cudf) =
8080
let timeout = match timeout with
8181
| None -> 0
8282
| Some f -> int_of_float (1000. *. f)
8383
in
84-
set_verbosity (if verbose then 1 else 0);
84+
set_verbosity (max 0 verbosity);
8585
let pb = problem_of_cudf cudf in
8686
match call_solver solver criteria timeout pb with
8787
| None -> None

src/mccs.mli

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ type solver_backend = [ `GLPK | `LP of string | `COIN_CLP | `COIN_CBC | `COIN_SY
1919
(** Resolve the given problem. The timeout is in seconds, default is to never
2020
time out. *)
2121
val resolve_cudf:
22-
?verbose:bool -> ?timeout:float -> ?solver:solver_backend ->
22+
?verbosity:int -> ?timeout:float -> ?solver:solver_backend ->
2323
string -> Cudf.cudf -> Cudf.solution option
2424

2525
(** Deprecated, corresponds to the default solver backend selection only *)

0 commit comments

Comments
 (0)