メインコンテンツへスキップ

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

回答済み

コメント

1件のコメント

  • 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

サインインしてコメントを残してください。