Skip to main content

How to solve different objective function at the same time (with the same set of constraints)?

Answered

Comments

1 comment

  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Hi,

    Each process has to hold its own Gurobi model. What you could try is constructing the constraints on each process or construct the model in one process together with a given objective and then use the GRBcopymodel method to construct a model copy and pass it to another process.

    Since constraints have to be added to the model sequentially anyway, I would recommend constructing the model in each independent process. You can write a method which adds the constraints to the model and call it in each independent process to have a clean code.

    You could also consider using the Multiple Scenarios feature provided by Gurobi.

    Best regards,
    Jaromił

    0

Please sign in to leave a comment.