In many situations, instances can be solved in parallel to accelerate the training process. MIPLearn.jl provides the method `parallel_solve!(solver, instances)` to easily achieve this.
In many situations, instances can be solved in parallel to accelerate the training process. MIPLearn.jl provides the method `parallel_solve!(solver, instances)` to easily achieve this.
First, launch Julia in multi-process mode:
First, launch Julia in multi-process mode:
```
```
julia --procs 4
julia --procs 4
```
```
Then run the following script:
Then call `parallel_solve!` as follows:
```julia
```julia
@everywhere using MIPLearn
@everywhere using MIPLearn
@ -195,7 +197,7 @@ test_instances = [...]
solver = LearningSolver(Cbc.Optimizer)
solver = LearningSolver(Cbc.Optimizer)
# Solve training instances in parallel. The number of instances solved
# Solve training instances in parallel. The number of instances solved
# simultaneously is the same as the `--procs`specified when running Julia.
# simultaneously is the same as the `--procs`argument provided to Julia.