Skip to main content

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

Answered

Comments

2 comments

  • Official comment
    Simranjit Kaur
    • Gurobi Staff
    This post is more than two years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support.
  • Lennart Lahrs
    • 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

Post is closed for comments.