Add constraints in parallel

Hi all,

I am wondering can I add constraints to one model in parallel? The constraints is added via a for-loop.

Thanks!

can I add constraints to one model in parallel?

No. Adding a constraint is not threadsafe because it mutates a lot of internal state of the model.

This StackOverflow answer is a good summary of how you can use JuMP in parallel:

1 Like

Thanks!

1 Like