Skip to main content

Is it possible to use pool map parallelization to speed up construction of MVars and constraints

Answered

Comments

1 comment

  • Lennart Lahrs
    • Gurobi Staff Gurobi Staff

    Hi Hancheng,

    The Gurobi API is intentionally designed to be used from a single thread per environment. That is by design to make model construction and data access as fast as possible without storing model data in data structures of the API. Parallelized model building is therefore not supported by our API.

    In your case, the type of matrix object that you pass to the addMVar() and addConstr() functions could make a difference. We recommend using sparse matrix object types. You can see a scipy sparse matrix object being used in this example.

    Best regards,
    Lennart

    0

Please sign in to leave a comment.