How to execute for-loop iterations in parallels in MATLAB using Gurobi as a solver?

2 views (last 30 days)
Hello,
I have a MIP problem, which I decomposed into subproblems, and I want to solve these subproblems using Gurobi in MATLAB. The only thing that changes in each subproblem is the objective function, and all the constraints are the same for all the subproblems.
When I try the "parfor," I get an error that it can not run due to the way variable "modela" used (I attached the loop). Can anyone help me with it?
Thanks

Answers (0)

Categories

Find more on Parallel for-Loops (parfor) in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!