You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When constructing a command line for CBC executable, CBCSHELL plugin adds -stat=1 option to it. This option tells CBC to gather additional stats about the MIP problem and write these stats to logs.
Rationale
I faced a situation when gathering information requested by -stat=1 option takes significantly more time then the actual solve. The MIP problem I'm working with is quite large but easy. I suppose this is when the slowdown due to -stat=1 is most noticeable.
I'm not interested in these stats but in current CBCSHELL interface I can't prevent it from passing -stat=1 option to CBC.
Description
CBCSHELL lets user to pass options to CBC via .options attribute. The -stat option is no different. Then why not let user decide whether to gather more stats or no. I suggest to not pass -stat=1 option during command line construction. The user can do it themselves via .options attribute just like any other option.
The alternative would be for the user to subclass CBCSHELL and override the create_command_line method to exclude this option. To me this looks more like a hack. But I don't see other options without editing Pyomo code.
The text was updated successfully, but these errors were encountered:
AlexeyNikonorov
changed the title
Pyomo passes -stat=1 option to CBC which causes slowdown
Don't pass -stat=1 option to CBC to avoid slowdown
Mar 12, 2024
@AlexeyNikonorov - This is a good suggestion. We have just taken a first pass at redesigning the solver interfaces, and I'm going to track this as part of that redesign effort.
Summary
When constructing a command line for CBC executable, CBCSHELL plugin adds -stat=1 option to it. This option tells CBC to gather additional stats about the MIP problem and write these stats to logs.
Rationale
I faced a situation when gathering information requested by -stat=1 option takes significantly more time then the actual solve. The MIP problem I'm working with is quite large but easy. I suppose this is when the slowdown due to -stat=1 is most noticeable.
I'm not interested in these stats but in current CBCSHELL interface I can't prevent it from passing -stat=1 option to CBC.
Description
CBCSHELL lets user to pass options to CBC via .options attribute. The -stat option is no different. Then why not let user decide whether to gather more stats or no. I suggest to not pass -stat=1 option during command line construction. The user can do it themselves via .options attribute just like any other option.
The alternative would be for the user to subclass CBCSHELL and override the create_command_line method to exclude this option. To me this looks more like a hack. But I don't see other options without editing Pyomo code.
The text was updated successfully, but these errors were encountered: