From 15a7af46ccdbdcc9871113a927104e596638dfc5 Mon Sep 17 00:00:00 2001 From: Bjoern Brandenburg Date: Fri, 10 Aug 2012 13:13:57 +0200 Subject: Set CPLEX options to improve solving speed With CPLEX 12, we are seeing the following solving speeds. single + Primal + PreDuall=-1: lp_dpcp_bounds::cpu_costs: total=23692.1ms last=403.739ms average=401.561ms count=59 lp_dflp_bounds::cpu_costs: total=27054.6ms last=459.518ms average=458.553ms count=59 single + Primal + PreDual=1: lp_dpcp_bounds::cpu_costs: total=33478.5ms last=404.556ms average=403.355ms count=83 lp_dflp_bounds::cpu_costs: total=38773.8ms last=467.097ms average=467.154ms count=83 single + Primal + DepInd=3: lp_dpcp_bounds::cpu_costs: total=18319.7ms last=419.785ms average=416.356ms count=44 lp_dflp_bounds::cpu_costs: total=21017.1ms last=477.474ms average=477.661ms count=44 single + Primal + DepInd=1: lp_dpcp_bounds::cpu_costs: total=12046.9ms last=419.514ms average=415.411ms count=29 lp_dflp_bounds::cpu_costs: total=13843.3ms last=477.015ms average=477.356ms count=29 single + Primal + PreInd=0: lp_dpcp_bounds::cpu_costs: total=17678.5ms last=445.003ms average=441.964ms count=40 lp_dflp_bounds::cpu_costs: total=17841.8ms last=446.056ms average=446.044ms count=40 single + Sifting: lp_dpcp_bounds::cpu_costs: total=42553.6ms last=657.655ms average=709.227ms count=60 lp_dflp_bounds::cpu_costs: total=50444.8ms last=728.922ms average=840.746ms count=60 single + Barrier: lp_dpcp_bounds::cpu_costs: total=28709.2ms last=453.862ms average=455.701ms count=63 lp_dflp_bounds::cpu_costs: total=43688.5ms last=625.312ms average=693.468ms count=63 single + Barrier + DepInd=1: lp_dpcp_bounds::cpu_costs: total=5358.42ms last=452.804ms average=446.535ms count=12 lp_dflp_bounds::cpu_costs: total=9561.53ms last=808.225ms average=796.794ms count=12 single + Dual: lp_dpcp_bounds::cpu_costs: total=63654.2ms last=419.534ms average=418.778ms count=152 lp_dflp_bounds::cpu_costs: total=72434.2ms last=476.049ms average=476.541ms count=152 single + Dual + PreDual: lp_dpcp_bounds::cpu_costs: total=24125.4ms last=403.458ms average=402.089ms count=60 lp_dflp_bounds::cpu_costs: total=27963.9ms last=465.245ms average=466.065ms count=60 single + Dual + PreDual + DepInd=3: lp_dpcp_bounds::cpu_costs: total=28022.3ms last=419.838ms average=418.243ms count=67 lp_dflp_bounds::cpu_costs: total=32532.4ms last=485.097ms average=485.558ms count=67 single + Dual + DepInd=3: lp_dpcp_bounds::cpu_costs: total=123606ms last=419.05ms average=419.002ms count=295 lp_dflp_bounds::cpu_costs: total=140686ms last=477.03ms average=476.903ms count=295 --- native/src/linprog/cplex.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'native/src/linprog/cplex.cpp') diff --git a/native/src/linprog/cplex.cpp b/native/src/linprog/cplex.cpp index 9be1e74..3706379 100644 --- a/native/src/linprog/cplex.cpp +++ b/native/src/linprog/cplex.cpp @@ -96,6 +96,9 @@ void CPLEXSolution::solve_model(unsigned int max_num_vars, solver_costs.start(); #endif + // The primal solver seems to be slightly faster. + cplex.setParam(IloCplex::RootAlg, IloCplex::Primal); + cplex.setParam(IloCplex::PreDual, -1); cplex.solve(); #if DEBUG_LP_OVERHEADS >= 3 -- cgit v1.2.2