Hi all,
I’ve noticed a large difference in solving time when using SCIP through JuMP in Julia versus using the russcip
crate in Rust, and I’m hoping someone can help explain why.
Context
I’m solving a MIQP problem from an .mps
file using SCIP. Here’s the Julia function I wrote using JuMP:
using JuMP
using SCIP
function run_model(modelpath)
model = read_from_file(modelpath)
set_optimizer(model, SCIP.Optimizer)
optimize!(model)
end
Using this, the problem solves in around 120 seconds, according to the “Solving Time (sec)” reported by SCIP.
To compare, I reimplemented the same workflow in Rust using russcip
:
fn read_and_solve_model(filepath: &str) -> Model<Solved> {
let model = Model::new()
.include_default_plugins()
.read_prob(filepath)
.expect("Failed to read model file");
model.solve()
}
Model
andModel<Solved>
come from therusscip
crate.
With this Rust version, the same problem solves in less than 10 seconds, again using SCIP’s own “Solving Time” metric.
Question
That’s a dramatic difference—over 10× faster in Rust—so I’m wondering what could explain it.
My first guess was include_default_plugins()
might add some useful features, but I assumed JuMP would also initialize SCIP with a reasonable default set of plugins (though perhaps not exactly the same ones?).
Are there known differences between how SCIP is initialized/configured in JuMP vs russcip
? Is it possible that JuMP disables certain presolvers, heuristics, or plugin features by default?
Notes
- The
.mps
file is identical in both runs. - The hardware and OS are the same.
- Both runs use the “Solving Time (sec)” from SCIP output, so the measurement should be consistent.
- I’m using the latest stable versions of
JuMP
,SCIP.jl
, andrusscip
.
Thanks in advance for any insights!