Skip to content

ENH: Generalizing the branch and bound implementation #16

Open
@tuncbkose

Description

@tuncbkose

Hi, I wanted to visualize LPs and the simplex algorithm and discovered this package. It has been great so far so thanks for that.

I'd like to use it for MILPs as well, but I noticed that the provided branch and bound implementation assumes all decision variables are integers. It seems to me that the branch_and_bound_iteration and branch_and_bound functions could naively be extended, by having a mask to indicate which indices are integers. I hacked an implementation quickly and with very limited testing it seems to work fine, but I have two questions:

  1. What is happening in this if statement? I only have a high-level understanding of the algorithm so this may be silly/simple, but it is not clear to me why a new variable is added.
  2. The visualization code seems somewhat separate than the code in simplex.py and I wasn't immediately sure if a similar hack is feasible there. Do you have any thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions