Skip to content

Don't pass -stat=1 option to CBC to avoid slowdown #3191

Open
@AlexeyNikonorov

Description

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.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions