Index: src/solver/sync.rs ================================================================== --- src/solver/sync.rs +++ src/solver/sync.rs @@ -396,10 +396,16 @@ /// Time when the solution process started. /// /// This is actually the time of the last call to `Solver::init`. start_time: Instant, + + /// Time when the last master problem evaluation started. + start_master_time: Instant, + + /// Time when the last subproblem evaluation started. + start_eval_time: Instant, } impl
Solver
where
P: FirstOrderProblem,
@@ -435,10 +441,12 @@
cnt_descent: 0,
cnt_null: 0,
cnt_evals: 0,
start_time: Instant::now(),
+ start_master_time: Instant::now(),
+ start_eval_time: Instant::now(),
}
}
/// Return the underlying threadpool.
///
@@ -614,10 +622,11 @@
if let Some(ref mut master_proc) = self.master_proc {
// Continue the solution process, start with a new master
// problem evaluation.
if !self.data.cur_val.is_infinite() {
+ self.start_master_time = Instant::now();
master_proc.solve(self.data.cur_val)?;
}
} else {
// No master problem, initialize solver.
self.init()?;
@@ -633,11 +642,14 @@
return Ok(false);
}
}
Message::Update(_) => warn!("Ignore unexpected problem update message from client"),
Message::Master(mresponse) => {
- debug!("Receive master response");
+ debug!(
+ "Receive master response (time: {})",
+ self.start_master_time.elapsed().as_millis() as f64 / 1000.0
+ );
// Receive result (new candidate) from the master
if self.handle_master_response(mresponse)? {
return Ok(true);
}
}
@@ -685,11 +697,14 @@
let descent_bnd = Self::get_descent_bound(self.params.acceptance_factor, &self.data);
self.data.nxt_val = nxt_ub;
self.data.new_cutval = self.data.nxt_cutvals.iter().sum::