File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed
Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -1217,15 +1217,27 @@ impl<T> Model<T> {
12171217 self . scip . print_version ( )
12181218 }
12191219
1220- /// Hides the output of the optimization model by setting the `display/verblevel` parameter to 0 .
1220+ /// Sets the `display/verblevel` parameter to the provided value .
12211221 #[ allow( unused_mut) ]
1222- pub fn hide_output ( mut self ) -> Self {
1222+ pub fn set_display_verbosity ( mut self , level : i32 ) -> Self {
12231223 self . scip
1224- . set_int_param ( "display/verblevel" , 0 )
1225- . expect ( "Failed to set display/verblevel to 0" ) ;
1224+ . set_int_param ( "display/verblevel" , level )
1225+ . unwrap_or_else ( |_| panic ! ( "Failed to set display/verblevel to {level}" ) ) ;
12261226 self
12271227 }
12281228
1229+ /// Shows the output of the optimization model by setting the `display/verblevel` parameter to its default value 4.
1230+ #[ allow( unused_mut) ]
1231+ pub fn show_output ( mut self ) -> Self {
1232+ self . set_display_verbosity ( 4 )
1233+ }
1234+
1235+ /// Hides the output of the optimization model by setting the `display/verblevel` parameter to 0.
1236+ #[ allow( unused_mut) ]
1237+ pub fn hide_output ( mut self ) -> Self {
1238+ self . set_display_verbosity ( 0 )
1239+ }
1240+
12291241 /// Sets the time limit for the optimization model.
12301242 ///
12311243 /// # Arguments
You can’t perform that action at this time.
0 commit comments