vrpRouting  0.3
vrprouting::Vrp_vroom_problem Class Reference

#include "vrp_vroom_problem.hpp"

Inheritance diagram for vrprouting::Vrp_vroom_problem:
Collaboration diagram for vrprouting::Vrp_vroom_problem:

Public Member Functions

void add_matrix (vrprouting::base::Base_Matrix matrix)
 
void clear ()
 Clears all the messages. More...
 
void get_amount (vroom::Amount vroom_amount, Amount **amount)
 
std::string get_error () const
 gets the contents of error message More...
 
StepType get_job_step_type (vroom::JOB_TYPE vroom_job_type)
 
std::string get_log () const
 gets the contents of log message More...
 
std::string get_notice () const
 gets the contents of notice message More...
 
std::vector< Vroom_rtget_results (vroom::Solution solution)
 
StepType get_step_type (vroom::Step step)
 
bool has_error () const
 gets the contents of notice message More...
 
std::vector< vroom::Job > jobs () const
 
vrprouting::base::Base_Matrix matrix () const
 
std::vector< std::pair< vroom::Job, vroom::Job > > shipments () const
 
std::vector< Vroom_rtsolve (int32_t exploration_level, int32_t timeout, int32_t loading_time)
 
std::vector< vroom::Vehicle > vehicles () const
 
vroom time window wrapper
vroom::TimeWindow get_vroom_time_window (const Vroom_time_window_t &time_window) const
 Gets the vroom time window from the C-style struct. More...
 
vroom::TimeWindow get_vroom_time_window (Duration tw_open, Duration tw_close) const
 
std::vector< vroom::TimeWindow > get_vroom_time_windows (const std::vector< Vroom_time_window_t > &time_windows) const
 
vroom amounts wrapper
vroom::Amount get_vroom_amounts (const std::vector< Amount > &amounts) const
 Gets the vroom amounts from C-style array. More...
 
vroom::Amount get_vroom_amounts (const Amount *amounts, size_t count) const
 
vroom skills wrapper
vroom::Skills get_vroom_skills (const Skill *skills, size_t count) const
 Gets the vroom skills. More...
 
vroom jobs wrapper
vroom::Job get_vroom_job (const Vroom_job_t &job, const std::vector< Vroom_time_window_t > &job_tws) const
 Gets the vroom jobs. More...
 
void problem_add_job (const Vroom_job_t &job, const std::vector< Vroom_time_window_t > &job_tws)
 
void add_jobs (const std::vector< Vroom_job_t > &jobs, const std::vector< Vroom_time_window_t > &jobs_tws)
 
void add_jobs (const Vroom_job_t *jobs, size_t count, const Vroom_time_window_t *jobs_tws, size_t total_jobs_tws)
 
vroom shipments wrapper
std::pair< vroom::Job, vroom::Job > get_vroom_shipment (const Vroom_shipment_t &shipment, const std::vector< Vroom_time_window_t > &pickup_tws, const std::vector< Vroom_time_window_t > &delivery_tws) const
 Gets the vroom shipments. More...
 
void problem_add_shipment (const Vroom_shipment_t &shipment, const std::vector< Vroom_time_window_t > &pickup_tws, const std::vector< Vroom_time_window_t > &delivery_tws)
 
void add_shipments (const std::vector< Vroom_shipment_t > &shipments, const std::vector< Vroom_time_window_t > &shipments_tws)
 
void add_shipments (const Vroom_shipment_t *shipments, size_t count, const Vroom_time_window_t *shipment_tws, size_t total_shipment_tws)
 
vroom breaks wrapper
vroom::Break get_vroom_break (const Vroom_break_t &v_break, const std::vector< Vroom_time_window_t > &break_tws) const
 Gets the vehicle breaks from C-style breaks struct. More...
 
std::vector< vroom::Break > get_vroom_breaks (const std::vector< Vroom_break_t > &breaks, const std::vector< Vroom_time_window_t > &breaks_tws) const
 
vroom vehicles wrapper
vroom::Vehicle get_vroom_vehicle (const Vroom_vehicle_t &vehicle, const std::vector< Vroom_break_t > &breaks, const std::vector< Vroom_time_window_t > &breaks_tws) const
 Gets the vroom vehicles. More...
 
void problem_add_vehicle (const Vroom_vehicle_t &vehicle, const std::vector< Vroom_break_t > &breaks, const std::vector< Vroom_time_window_t > &breaks_tws)
 
void add_vehicles (const std::vector< Vroom_vehicle_t > &vehicles, const std::vector< Vroom_break_t > &breaks, const std::vector< Vroom_time_window_t > &breaks_tws)
 
void add_vehicles (const Vroom_vehicle_t *vehicles, size_t count, const Vroom_break_t *breaks, size_t total_breaks, const Vroom_time_window_t *breaks_tws, size_t total_breaks_tws)
 

Public Attributes

std::ostringstream error
 Stores the error information. More...
 
std::ostringstream log
 Stores the hint information. More...
 
std::ostringstream notice
 Stores the notice information. More...
 

Private Attributes

std::vector< vroom::Job > m_jobs
 
vrprouting::base::Base_Matrix m_matrix
 
std::vector< std::pair< vroom::Job, vroom::Job > > m_shipments
 
std::vector< vroom::Vehicle > m_vehicles
 

Detailed Description

Definition at line 54 of file vrp_vroom_problem.hpp.

Member Function Documentation

◆ add_jobs() [1/2]

void vrprouting::Vrp_vroom_problem::add_jobs ( const std::vector< Vroom_job_t > &  jobs,
const std::vector< Vroom_time_window_t > &  jobs_tws 
)
inline

Definition at line 190 of file vrp_vroom_problem.hpp.

191  {
192  std::map<Idx, std::vector<Vroom_time_window_t>> job_tws_map;
193  for (auto job_tw : jobs_tws) {
194  Idx id = job_tw.id;
195  if (job_tws_map.find(id) == job_tws_map.end()) {
196  job_tws_map[id] = std::vector<Vroom_time_window_t>();
197  }
198  job_tws_map[id].push_back(job_tw);
199  }
200  for (auto job : jobs) {
201  problem_add_job(job, job_tws_map[job.id]);
202  }
203  }

References jobs(), and problem_add_job().

Referenced by add_jobs(), and do_vrp_vroom().

◆ add_jobs() [2/2]

void vrprouting::Vrp_vroom_problem::add_jobs ( const Vroom_job_t jobs,
size_t  count,
const Vroom_time_window_t jobs_tws,
size_t  total_jobs_tws 
)
inline

Definition at line 205 of file vrp_vroom_problem.hpp.

206  {
207  add_jobs(
208  std::vector<Vroom_job_t>(jobs, jobs + count),
209  std::vector<Vroom_time_window_t>(jobs_tws, jobs_tws + total_jobs_tws));
210  }

References add_jobs(), and jobs().

◆ add_matrix()

void vrprouting::Vrp_vroom_problem::add_matrix ( vrprouting::base::Base_Matrix  matrix)
inline

Definition at line 424 of file vrp_vroom_problem.hpp.

424  {
425  m_matrix = matrix;
426  }

References m_matrix, and matrix().

Referenced by do_vrp_vroom().

◆ add_shipments() [1/2]

void vrprouting::Vrp_vroom_problem::add_shipments ( const std::vector< Vroom_shipment_t > &  shipments,
const std::vector< Vroom_time_window_t > &  shipments_tws 
)
inline

Definition at line 262 of file vrp_vroom_problem.hpp.

263  {
264  std::map<Idx, std::vector<Vroom_time_window_t>> pickup_tws_map;
265  std::map<Idx, std::vector<Vroom_time_window_t>> delivery_tws_map;
266  for (auto shipment_tw : shipments_tws) {
267  Idx id = shipment_tw.id;
268  if (shipment_tw.kind == 'p') {
269  if (pickup_tws_map.find(id) == pickup_tws_map.end()) {
270  pickup_tws_map[id] = std::vector<Vroom_time_window_t>();
271  }
272  pickup_tws_map[id].push_back(shipment_tw);
273  } else if (shipment_tw.kind == 'd') {
274  if (delivery_tws_map.find(id) == delivery_tws_map.end()) {
275  delivery_tws_map[id] = std::vector<Vroom_time_window_t>();
276  }
277  delivery_tws_map[id].push_back(shipment_tw);
278  }
279  }
280  for (auto shipment : shipments) {
281  problem_add_shipment(shipment, pickup_tws_map[shipment.id],
282  delivery_tws_map[shipment.id]);
283  }
284  }

References problem_add_shipment(), and shipments().

Referenced by add_shipments(), and do_vrp_vroom().

◆ add_shipments() [2/2]

void vrprouting::Vrp_vroom_problem::add_shipments ( const Vroom_shipment_t shipments,
size_t  count,
const Vroom_time_window_t shipment_tws,
size_t  total_shipment_tws 
)
inline

Definition at line 286 of file vrp_vroom_problem.hpp.

287  {
289  std::vector<Vroom_shipment_t>(shipments, shipments + count),
290  std::vector<Vroom_time_window_t>(shipment_tws, shipment_tws + total_shipment_tws));
291  }

References add_shipments(), and shipments().

◆ add_vehicles() [1/2]

void vrprouting::Vrp_vroom_problem::add_vehicles ( const std::vector< Vroom_vehicle_t > &  vehicles,
const std::vector< Vroom_break_t > &  breaks,
const std::vector< Vroom_time_window_t > &  breaks_tws 
)
inline

Definition at line 382 of file vrp_vroom_problem.hpp.

384  {
385  std::map<Idx, std::vector<Vroom_time_window_t>> breaks_tws_map;
386  for (auto break_tw : breaks_tws) {
387  Idx id = break_tw.id;
388  if (breaks_tws_map.find(id) == breaks_tws_map.end()) {
389  breaks_tws_map[id] = std::vector<Vroom_time_window_t>();
390  }
391  breaks_tws_map[id].push_back(break_tw);
392  }
393 
394  std::map<Idx, std::vector<Vroom_break_t>> v_breaks_map;
395  for (auto v_break : breaks) {
396  Idx v_id = v_break.vehicle_id;
397  if (v_breaks_map.find(v_id) == v_breaks_map.end()) {
398  v_breaks_map[v_id] = std::vector<Vroom_break_t>();
399  }
400  v_breaks_map[v_id].push_back(v_break);
401  }
402 
403  for (auto vehicle : vehicles) {
404  std::vector<Vroom_break_t> v_breaks = v_breaks_map[vehicle.id];
405  std::vector<Vroom_time_window_t> v_breaks_tws;
406  for (auto v_break : v_breaks) {
407  std::vector<Vroom_time_window_t> tws = breaks_tws_map[v_break.id];
408  v_breaks_tws.insert(v_breaks_tws.end(), tws.begin(), tws.end());
409  }
410  problem_add_vehicle(vehicle, v_breaks, v_breaks_tws);
411  }
412  }

References problem_add_vehicle(), and vehicles().

Referenced by add_vehicles(), and do_vrp_vroom().

◆ add_vehicles() [2/2]

void vrprouting::Vrp_vroom_problem::add_vehicles ( const Vroom_vehicle_t vehicles,
size_t  count,
const Vroom_break_t breaks,
size_t  total_breaks,
const Vroom_time_window_t breaks_tws,
size_t  total_breaks_tws 
)
inline

Definition at line 414 of file vrp_vroom_problem.hpp.

416  {
417  add_vehicles(std::vector<Vroom_vehicle_t>(vehicles, vehicles + count),
418  std::vector<Vroom_break_t>(breaks, breaks + total_breaks),
419  std::vector<Vroom_time_window_t>(breaks_tws, breaks_tws + total_breaks_tws));
420  }

References add_vehicles(), and vehicles().

◆ clear()

void vrprouting::Pgr_messages::clear ( )
inherited

Clears all the messages.

Definition at line 59 of file pgr_messages.cpp.

59  {
60  log.str("");
61  log.clear();
62 
63  notice.str("");
64  notice.clear();
65 
66  error.str("");
67  error.clear();
68 }

References vrprouting::Pgr_messages::error, vrprouting::Pgr_messages::log, and vrprouting::Pgr_messages::notice.

Referenced by do_compatibleVehicles(), do_pgr_pickDeliver(), and do_pickDeliver().

◆ get_amount()

void vrprouting::Vrp_vroom_problem::get_amount ( vroom::Amount  vroom_amount,
Amount **  amount 
)
inline

Definition at line 428 of file vrp_vroom_problem.hpp.

428  {
429  size_t amount_size = vroom_amount.size();
430  for (size_t i = 0; i < amount_size; i++) {
431  *((*amount) + i) = vroom_amount[i];
432  }
433  }

Referenced by get_results().

◆ get_error()

std::string vrprouting::Pgr_messages::get_error ( ) const
inherited

◆ get_job_step_type()

StepType vrprouting::Vrp_vroom_problem::get_job_step_type ( vroom::JOB_TYPE  vroom_job_type)
inline

Definition at line 435 of file vrp_vroom_problem.hpp.

435  {
436  StepType step_type;
437  switch (vroom_job_type) {
438  case vroom::JOB_TYPE::SINGLE:
439  step_type = 2;
440  break;
441  case vroom::JOB_TYPE::PICKUP:
442  step_type = 3;
443  break;
444  case vroom::JOB_TYPE::DELIVERY:
445  step_type = 4;
446  break;
447  }
448  return step_type;
449  }

Referenced by get_results(), and get_step_type().

◆ get_log()

std::string vrprouting::Pgr_messages::get_log ( ) const
inherited

gets the contents of log message

Returns
the current contents of log

Definition at line 36 of file pgr_messages.cpp.

36  {
37  auto str = log.str();
38  return str;
39 }

References vrprouting::Pgr_messages::log.

Referenced by do_compatibleVehicles(), do_pgr_pickDeliver(), do_pgr_pickDeliverEuclidean(), do_pickDeliver(), vrprouting::problem::Fleet::get_unused_trucks(), vrprouting::problem::Fleet::invariant(), and anonymous_namespace{optimize_driver.cpp}::one_processing().

◆ get_notice()

std::string vrprouting::Pgr_messages::get_notice ( ) const
inherited

gets the contents of notice message

Returns
the current contents of notice

Definition at line 42 of file pgr_messages.cpp.

42  {
43  auto str = notice.str();
44  return str;
45 }

References vrprouting::Pgr_messages::notice.

◆ get_results()

std::vector< Vroom_rt > vrprouting::Vrp_vroom_problem::get_results ( vroom::Solution  solution)
inline

Definition at line 470 of file vrp_vroom_problem.hpp.

470  {
471  std::vector < Vroom_rt > results;
472  std::vector<vroom::Route> routes = solution.routes;
473  Idx vehicle_seq = 1;
474  char *empty_desc = strdup("{}");
475  for (auto route : routes) {
476  Idx step_seq = 1;
477  Duration prev_duration = 0;
478  char *vehicle_data = strdup(route.description.c_str());
479  for (auto step : route.steps) {
480  Idx task_id = step.id;
481  MatrixIndex location_id = m_matrix.get_original_id(step.location.index());
482  char *task_data = strdup(step.description.c_str());
483  StepType step_type = get_step_type(step);
484  if (step_type == 1 || step_type == 6) {
485  task_id = static_cast<Idx>(-1);
486  task_data = empty_desc;
487  }
488 
489  size_t load_size = step.load.size();
490  Amount *load = reinterpret_cast<Amount*>(malloc(load_size * sizeof(Amount)));
491  get_amount(step.load, &load);
492 
493  Duration travel_time = step.duration - prev_duration;
494  prev_duration = step.duration;
495  Duration departure = step.arrival + step.setup + step.service + step.waiting_time;
496  results.push_back({
497  vehicle_seq, // vehicles_seq
498  route.vehicle, // vehicles_id
499  vehicle_data, // vehicle_data
500  step_seq, // step_seq
501  step_type, // step_type
502  task_id, // task_id
503  location_id, // location_id
504  task_data, // task_data
505  step.arrival, // arrival
506  travel_time, // travel_time
507  step.setup, // setup_time
508  step.service, // service_time
509  step.waiting_time, // waiting_time
510  departure, // departure
511  load, // load
512  load_size // load size
513  });
514  step_seq++;
515  }
516  // The summary of this route
517  Idx task_id = 0;
518  results.push_back({
519  vehicle_seq, // vehicles_seq
520  route.vehicle, // vehicles_id
521  vehicle_data, // vehicle_data
522  0, // step_seq = 0 for route summary
523  0, // step_type = 0 for route summary
524  task_id, // task_id = 0 for route summary
525  0, // location_id = 0 for route summary
526  empty_desc, // task_data
527  0, // No arrival time
528  route.duration, // Total travel time
529  route.setup, // Total setup time
530  route.service, // Total service time
531  route.waiting_time, // Total waiting time
532  0, // No departure time
533  {}, // load
534  0 // load size
535  });
536  vehicle_seq++;
537  }
538 
539  std::vector<vroom::Job> unassigned = solution.unassigned;
540  Idx step_seq = 1;
541  for (auto job : unassigned) {
542  StepType job_step = get_job_step_type(job.type);
543  Idx vehicle_id = static_cast<Idx>(-1);
544  Idx job_id = job.id;
545  MatrixIndex location_id = m_matrix.get_original_id(job.location.index());
546  char *task_data = strdup(job.description.c_str());
547  results.push_back({
548  vehicle_seq, // vehicles_seq
549  vehicle_id, // vehicles_id = -1 for unassigned jobs
550  empty_desc, // vehicle_data
551  step_seq, // step_seq
552  job_step, // step_type
553  job_id, // task_id
554  location_id, // location_id
555  task_data, // task_data
556  0, // No arrival time
557  0, // No travel_time
558  0, // No setup_time
559  0, // No service_time
560  0, // No waiting_time
561  0, // No departure time
562  {}, // load
563  0 // load size
564  });
565  step_seq++;
566  }
567 
568  // The summary of the entire problem
569  vroom::Summary summary = solution.summary;
570  Idx vehicle_id = 0;
571  Idx job_id = 0;
572  results.push_back({
573  0, // vehicles_seq = 0 for problem summary
574  vehicle_id, // vehicles_id = 0 for problem summary
575  empty_desc, // vehicle_data
576  0, // step_seq = 0 for problem summary
577  0, // step_type = 0 for problem summary
578  job_id, // task_id = 0 for problem summary
579  0, // location_id = 0 for problem summary
580  empty_desc, // task_data
581  0, // No arrival time
582  summary.duration, // Total travel time
583  summary.setup, // Total setup time
584  summary.service, // Total service time
585  summary.waiting_time, // Total waiting time
586  0, // No departure time
587  {}, // load
588  0 // load size
589  });
590  return results;
591  }

References get_amount(), get_job_step_type(), vrprouting::base::Base_Matrix::get_original_id(), get_step_type(), and m_matrix.

Referenced by solve().

◆ get_step_type()

StepType vrprouting::Vrp_vroom_problem::get_step_type ( vroom::Step  step)
inline

Definition at line 451 of file vrp_vroom_problem.hpp.

451  {
452  StepType step_type = 0;
453  switch (step.step_type) {
454  case vroom::STEP_TYPE::START:
455  step_type = 1;
456  break;
457  case vroom::STEP_TYPE::END:
458  step_type = 6;
459  break;
460  case vroom::STEP_TYPE::BREAK:
461  step_type = 5;
462  break;
463  case vroom::STEP_TYPE::JOB:
464  step_type = get_job_step_type(step.job_type);
465  break;
466  }
467  return step_type;
468  }

References get_job_step_type().

Referenced by get_results().

◆ get_vroom_amounts() [1/2]

vroom::Amount vrprouting::Vrp_vroom_problem::get_vroom_amounts ( const Amount amounts,
size_t  count 
) const
inline

Definition at line 131 of file vrp_vroom_problem.hpp.

131  {
132  return get_vroom_amounts(std::vector <Amount>(amounts, amounts + count));
133  }

References get_vroom_amounts().

◆ get_vroom_amounts() [2/2]

vroom::Amount vrprouting::Vrp_vroom_problem::get_vroom_amounts ( const std::vector< Amount > &  amounts) const
inline

Gets the vroom amounts from C-style array.

Parameters
[in]amountsThe amounts array (pickup or delivery)
Returns
The vroom amounts.

Definition at line 112 of file vrp_vroom_problem.hpp.

112  {
113  vroom::Amount amt;
114  if (amounts.size()) {
115  for (auto amount : amounts) {
116  amt.push_back(amount);
117  }
118  } else {
119  const unsigned int amount_size =
120  m_vehicles.size() ? static_cast<unsigned int>(m_vehicles[0].capacity.size()) : 0;
121  // Default to zero amount with provided size.
122  amt = vroom::Amount(amount_size);
123  for (size_t i = 0; i < amounts.size(); i++) {
124  amt[i] = amounts[i];
125  }
126  }
127  return amt;
128  }

References m_vehicles.

Referenced by get_vroom_amounts(), get_vroom_job(), get_vroom_shipment(), and get_vroom_vehicle().

◆ get_vroom_break()

vroom::Break vrprouting::Vrp_vroom_problem::get_vroom_break ( const Vroom_break_t v_break,
const std::vector< Vroom_time_window_t > &  break_tws 
) const
inline

Gets the vehicle breaks from C-style breaks struct.

Parameters
[in]v_breakThe vehicle break struct
Returns
The vroom vehicle break.

Definition at line 307 of file vrp_vroom_problem.hpp.

309  {
310  std::vector <vroom::TimeWindow> tws = get_vroom_time_windows(break_tws);
311  return vroom::Break(v_break.id, tws, v_break.service, v_break.data);
312  }

References Vroom_break_t::data, get_vroom_time_windows(), Vroom_break_t::id, and Vroom_break_t::service.

Referenced by get_vroom_breaks().

◆ get_vroom_breaks()

std::vector< vroom::Break > vrprouting::Vrp_vroom_problem::get_vroom_breaks ( const std::vector< Vroom_break_t > &  breaks,
const std::vector< Vroom_time_window_t > &  breaks_tws 
) const
inline

Definition at line 315 of file vrp_vroom_problem.hpp.

317  {
318  std::map<Idx, std::vector<Vroom_time_window_t>> breaks_tws_map;
319  for (auto break_tw : breaks_tws) {
320  Idx id = break_tw.id;
321  if (breaks_tws_map.find(id) == breaks_tws_map.end()) {
322  breaks_tws_map[id] = std::vector<Vroom_time_window_t>();
323  }
324  breaks_tws_map[id].push_back(break_tw);
325  }
326  std::vector < vroom::Break > v_breaks;
327  for (auto v_break : breaks) {
328  v_breaks.push_back(get_vroom_break(v_break, breaks_tws_map[v_break.id]));
329  }
330  return v_breaks;
331  }

References get_vroom_break().

Referenced by get_vroom_vehicle().

◆ get_vroom_job()

vroom::Job vrprouting::Vrp_vroom_problem::get_vroom_job ( const Vroom_job_t job,
const std::vector< Vroom_time_window_t > &  job_tws 
) const
inline

Gets the vroom jobs.

Parameters
[in]jobThe job C-style struct
[in]job_twsThe job time windows
Returns
The vroom job.

Definition at line 169 of file vrp_vroom_problem.hpp.

170  {
171  vroom::Amount delivery =
173  vroom::Amount pickup =
175  vroom::Skills skills =
177  std::vector<vroom::TimeWindow> time_windows =
178  get_vroom_time_windows(job_tws);
179  vroom::Index location_id =
180  static_cast<vroom::Index>(m_matrix.get_index(job.location_id));
181  return vroom::Job(job.id, location_id, job.setup, job.service, delivery, pickup,
182  skills, job.priority, time_windows, job.data);
183  }

References Vroom_job_t::data, Vroom_job_t::delivery, Vroom_job_t::delivery_size, vrprouting::base::Base_Matrix::get_index(), get_vroom_amounts(), get_vroom_skills(), get_vroom_time_windows(), Vroom_job_t::id, Vroom_job_t::location_id, m_matrix, Vroom_job_t::pickup, Vroom_job_t::pickup_size, Vroom_job_t::priority, Vroom_job_t::service, Vroom_job_t::setup, Vroom_job_t::skills, and Vroom_job_t::skills_size.

Referenced by problem_add_job().

◆ get_vroom_shipment()

std::pair<vroom::Job, vroom::Job> vrprouting::Vrp_vroom_problem::get_vroom_shipment ( const Vroom_shipment_t shipment,
const std::vector< Vroom_time_window_t > &  pickup_tws,
const std::vector< Vroom_time_window_t > &  delivery_tws 
) const
inline

Gets the vroom shipments.

Parameters
[in]shipmentThe shipment C-style struct
[in]pickup_twsThe pickup time windows
[in]delivery_twsThe delivery time windows
Returns
The vroom shipment.

Definition at line 227 of file vrp_vroom_problem.hpp.

230  {
231  vroom::Amount amount =
232  get_vroom_amounts(shipment.amount, shipment.amount_size);
233  vroom::Skills skills =
234  get_vroom_skills(shipment.skills, shipment.skills_size);
235  std::vector<vroom::TimeWindow> p_time_windows =
236  get_vroom_time_windows(pickup_tws);
237  std::vector<vroom::TimeWindow> d_time_windows =
238  get_vroom_time_windows(delivery_tws);
239  vroom::Index p_location_id = static_cast<vroom::Index>(
240  m_matrix.get_index(shipment.p_location_id));
241  vroom::Index d_location_id = static_cast<vroom::Index>(
242  m_matrix.get_index(shipment.d_location_id));
243  vroom::Job pickup = vroom::Job(
244  shipment.id, vroom::JOB_TYPE::PICKUP, p_location_id,
245  shipment.p_setup, shipment.p_service, amount,
246  skills, shipment.priority, p_time_windows, shipment.p_data);
247  vroom::Job delivery = vroom::Job(
248  shipment.id, vroom::JOB_TYPE::DELIVERY, d_location_id,
249  shipment.d_setup, shipment.d_service, amount,
250  skills, shipment.priority, d_time_windows, shipment.d_data);
251  return std::make_pair(pickup, delivery);
252  }

References Vroom_shipment_t::amount, Vroom_shipment_t::amount_size, Vroom_shipment_t::d_data, Vroom_shipment_t::d_location_id, Vroom_shipment_t::d_service, Vroom_shipment_t::d_setup, vrprouting::base::Base_Matrix::get_index(), get_vroom_amounts(), get_vroom_skills(), get_vroom_time_windows(), Vroom_shipment_t::id, m_matrix, Vroom_shipment_t::p_data, Vroom_shipment_t::p_location_id, Vroom_shipment_t::p_service, Vroom_shipment_t::p_setup, Vroom_shipment_t::priority, Vroom_shipment_t::skills, and Vroom_shipment_t::skills_size.

Referenced by problem_add_shipment().

◆ get_vroom_skills()

vroom::Skills vrprouting::Vrp_vroom_problem::get_vroom_skills ( const Skill skills,
size_t  count 
) const
inline

Gets the vroom skills.

Parameters
[in]skillsThe skills array
[in]countThe size of skills array
Returns
The vroom skills.

Definition at line 150 of file vrp_vroom_problem.hpp.

150  {
151  return std::unordered_set <Skill>(skills, skills + count);
152  }

Referenced by get_vroom_job(), get_vroom_shipment(), and get_vroom_vehicle().

◆ get_vroom_time_window() [1/2]

vroom::TimeWindow vrprouting::Vrp_vroom_problem::get_vroom_time_window ( const Vroom_time_window_t time_window) const
inline

Gets the vroom time window from the C-style struct.

Parameters
[in]time_windowThe C-style time window struct
Returns
The vroom time window.

Definition at line 73 of file vrp_vroom_problem.hpp.

73  {
74  return
75  vroom::TimeWindow(time_window.tw_open,
76  time_window.tw_close);
77  }

References Vroom_time_window_t::tw_close, and Vroom_time_window_t::tw_open.

Referenced by get_vroom_time_windows(), and get_vroom_vehicle().

◆ get_vroom_time_window() [2/2]

vroom::TimeWindow vrprouting::Vrp_vroom_problem::get_vroom_time_window ( Duration  tw_open,
Duration  tw_close 
) const
inline

Definition at line 80 of file vrp_vroom_problem.hpp.

80  {
81  return vroom::TimeWindow(tw_open, tw_close);
82  }

◆ get_vroom_time_windows()

std::vector<vroom::TimeWindow> vrprouting::Vrp_vroom_problem::get_vroom_time_windows ( const std::vector< Vroom_time_window_t > &  time_windows) const
inline

Definition at line 85 of file vrp_vroom_problem.hpp.

86  {
87  std::vector < vroom::TimeWindow > tws;
88  for (auto time_window : time_windows) {
89  tws.push_back(get_vroom_time_window(time_window));
90  }
91  if (tws.size()) {
92  return tws;
93  } else {
94  return std::vector<vroom::TimeWindow>(1, vroom::TimeWindow());
95  }
96  }

References get_vroom_time_window().

Referenced by get_vroom_break(), get_vroom_job(), and get_vroom_shipment().

◆ get_vroom_vehicle()

vroom::Vehicle vrprouting::Vrp_vroom_problem::get_vroom_vehicle ( const Vroom_vehicle_t vehicle,
const std::vector< Vroom_break_t > &  breaks,
const std::vector< Vroom_time_window_t > &  breaks_tws 
) const
inline

Gets the vroom vehicles.

Parameters
[in]vehicleThe vehicle C-style struct
[in]breaks_twsThe breaks time windows
Returns
The vroom vehicle.

Definition at line 347 of file vrp_vroom_problem.hpp.

350  {
351  vroom::Amount capacity =
352  get_vroom_amounts(vehicle.capacity, vehicle.capacity_size);
353  vroom::Skills skills =
354  get_vroom_skills(vehicle.skills, vehicle.skills_size);
355  vroom::TimeWindow time_window =
357  vehicle.tw_close);
358  std::vector<vroom::Break> v_breaks = get_vroom_breaks(breaks, breaks_tws);
359 
360  std::optional<vroom::Location> start_id;
361  std::optional<vroom::Location> end_id;
362  // Set the value of start or end index only if they are present
363  if (vehicle.start_id != -1) {
364  start_id = static_cast<vroom::Index>(m_matrix.get_index(vehicle.start_id));
365  }
366  if (vehicle.end_id != -1) {
367  end_id = static_cast<vroom::Index>(m_matrix.get_index(vehicle.end_id));
368  }
369  return vroom::Vehicle(vehicle.id, start_id, end_id,
370  vroom::DEFAULT_PROFILE, capacity, skills, time_window,
371  v_breaks, vehicle.data, vehicle.speed_factor,
372  static_cast<size_t>(vehicle.max_tasks));
373  }

References Vroom_vehicle_t::capacity, Vroom_vehicle_t::capacity_size, Vroom_vehicle_t::data, Vroom_vehicle_t::end_id, vrprouting::base::Base_Matrix::get_index(), get_vroom_amounts(), get_vroom_breaks(), get_vroom_skills(), get_vroom_time_window(), Vroom_vehicle_t::id, m_matrix, Vroom_vehicle_t::max_tasks, Vroom_vehicle_t::skills, Vroom_vehicle_t::skills_size, Vroom_vehicle_t::speed_factor, Vroom_vehicle_t::start_id, Vroom_vehicle_t::tw_close, and Vroom_vehicle_t::tw_open.

Referenced by problem_add_vehicle().

◆ has_error()

bool vrprouting::Pgr_messages::has_error ( ) const
inherited

gets the contents of notice message

Returns
true when error message is not empty

Definition at line 48 of file pgr_messages.cpp.

48  {
49  return !error.str().empty();
50 }

References vrprouting::Pgr_messages::error.

◆ jobs()

std::vector<vroom::Job> vrprouting::Vrp_vroom_problem::jobs ( ) const
inline

Definition at line 56 of file vrp_vroom_problem.hpp.

56 { return m_jobs; }

References m_jobs.

Referenced by add_jobs().

◆ matrix()

vrprouting::base::Base_Matrix vrprouting::Vrp_vroom_problem::matrix ( ) const
inline

Definition at line 59 of file vrp_vroom_problem.hpp.

59 { return m_matrix; }

References m_matrix.

Referenced by add_matrix().

◆ problem_add_job()

void vrprouting::Vrp_vroom_problem::problem_add_job ( const Vroom_job_t job,
const std::vector< Vroom_time_window_t > &  job_tws 
)
inline

Definition at line 185 of file vrp_vroom_problem.hpp.

186  {
187  m_jobs.push_back(get_vroom_job(job, job_tws));
188  }

References get_vroom_job(), and m_jobs.

Referenced by add_jobs().

◆ problem_add_shipment()

void vrprouting::Vrp_vroom_problem::problem_add_shipment ( const Vroom_shipment_t shipment,
const std::vector< Vroom_time_window_t > &  pickup_tws,
const std::vector< Vroom_time_window_t > &  delivery_tws 
)
inline

Definition at line 254 of file vrp_vroom_problem.hpp.

257  {
258  m_shipments.push_back(
259  get_vroom_shipment(shipment, pickup_tws, delivery_tws));
260  }

References get_vroom_shipment(), and m_shipments.

Referenced by add_shipments().

◆ problem_add_vehicle()

void vrprouting::Vrp_vroom_problem::problem_add_vehicle ( const Vroom_vehicle_t vehicle,
const std::vector< Vroom_break_t > &  breaks,
const std::vector< Vroom_time_window_t > &  breaks_tws 
)
inline

Definition at line 375 of file vrp_vroom_problem.hpp.

378  {
379  m_vehicles.push_back(get_vroom_vehicle(vehicle, breaks, breaks_tws));
380  }

References get_vroom_vehicle(), and m_vehicles.

Referenced by add_vehicles().

◆ shipments()

std::vector<std::pair<vroom::Job, vroom::Job> > vrprouting::Vrp_vroom_problem::shipments ( ) const
inline

Definition at line 57 of file vrp_vroom_problem.hpp.

57 { return m_shipments; }

References m_shipments.

Referenced by add_shipments().

◆ solve()

std::vector<Vroom_rt> vrprouting::Vrp_vroom_problem::solve ( int32_t  exploration_level,
int32_t  timeout,
int32_t  loading_time 
)
inline

Definition at line 593 of file vrp_vroom_problem.hpp.

594  {
595  std::vector <Vroom_rt> results;
596 
597  /* abort in case an interruption occurs (e.g. the query is being cancelled) */
599  try {
600  const unsigned int amount_size =
601  m_vehicles.size()
602  ? static_cast<unsigned int>(m_vehicles[0].capacity.size())
603  : 0;
604  vroom::Input problem_instance(amount_size);
605 
606  for (const auto &vehicle : m_vehicles) {
607  problem_instance.add_vehicle(vehicle);
608  }
609  for (const auto &job : m_jobs) {
610  problem_instance.add_job(job);
611  }
612  for (const auto &shipment : m_shipments) {
613  problem_instance.add_shipment(shipment.first, shipment.second);
614  }
615  vroom::Matrix<vroom::Duration> duration_matrix = m_matrix.get_vroom_duration_matrix();
616  vroom::Matrix<vroom::Cost> cost_matrix = m_matrix.get_vroom_cost_matrix();
617  problem_instance.set_durations_matrix(vroom::DEFAULT_PROFILE, std::move(duration_matrix));
618  problem_instance.set_costs_matrix(vroom::DEFAULT_PROFILE, std::move(cost_matrix));
619 
620  unsigned threads = 4;
621  if (timeout < 0) {
622  auto solution = problem_instance.solve(
623  static_cast<unsigned>(exploration_level), threads);
624  results = get_results(solution);
625  } else {
626  int timeout_ms = (loading_time <= timeout * 1000) ? (timeout * 1000 - loading_time) : 0;
627  auto solution = problem_instance.solve(
628  static_cast<unsigned>(exploration_level), threads, timeout_ms);
629  results = get_results(solution);
630  }
631  } catch (const vroom::Exception &ex) {
632  throw;
633  } catch (const std::exception &ex) {
634  throw;
635  } catch (...) {
636  throw;
637  }
638  return results;
639  }

References CHECK_FOR_INTERRUPTS, get_results(), vrprouting::base::Base_Matrix::get_vroom_cost_matrix(), vrprouting::base::Base_Matrix::get_vroom_duration_matrix(), m_jobs, m_matrix, m_shipments, and m_vehicles.

Referenced by do_vrp_vroom().

◆ vehicles()

std::vector<vroom::Vehicle> vrprouting::Vrp_vroom_problem::vehicles ( ) const
inline

Definition at line 58 of file vrp_vroom_problem.hpp.

58 { return m_vehicles; }

References m_vehicles.

Referenced by add_vehicles().

Member Data Documentation

◆ error

◆ log

◆ m_jobs

std::vector<vroom::Job> vrprouting::Vrp_vroom_problem::m_jobs
private

Definition at line 642 of file vrp_vroom_problem.hpp.

Referenced by jobs(), problem_add_job(), and solve().

◆ m_matrix

vrprouting::base::Base_Matrix vrprouting::Vrp_vroom_problem::m_matrix
private

◆ m_shipments

std::vector<std::pair<vroom::Job, vroom::Job> > vrprouting::Vrp_vroom_problem::m_shipments
private

Definition at line 643 of file vrp_vroom_problem.hpp.

Referenced by problem_add_shipment(), shipments(), and solve().

◆ m_vehicles

std::vector<vroom::Vehicle> vrprouting::Vrp_vroom_problem::m_vehicles
private

Definition at line 644 of file vrp_vroom_problem.hpp.

Referenced by get_vroom_amounts(), problem_add_vehicle(), solve(), and vehicles().

◆ notice

std::ostringstream vrprouting::Pgr_messages::notice
mutableinherited

Stores the notice information.

Definition at line 93 of file pgr_messages.h.

Referenced by vrprouting::Pgr_messages::clear(), and vrprouting::Pgr_messages::get_notice().


The documentation for this class was generated from the following file:
vrprouting::base::Base_Matrix::get_original_id
Id get_original_id(Idx) const
original id -> idx
Definition: base_matrix.cpp:202
vrprouting::Vrp_vroom_problem::m_matrix
vrprouting::base::Base_Matrix m_matrix
Definition: vrp_vroom_problem.hpp:645
vrprouting::Vrp_vroom_problem::m_vehicles
std::vector< vroom::Vehicle > m_vehicles
Definition: vrp_vroom_problem.hpp:644
Vroom_shipment_t::priority
Priority priority
Number of skills.
Definition: vroom_shipment_t.h:75
Vroom_shipment_t::p_service
Duration p_service
Pickup setup time.
Definition: vroom_shipment_t.h:62
vrprouting::Vrp_vroom_problem::get_results
std::vector< Vroom_rt > get_results(vroom::Solution solution)
Definition: vrp_vroom_problem.hpp:470
Vroom_vehicle_t::end_id
MatrixIndex end_id
Start location index in matrix.
Definition: vroom_vehicle_t.h:57
Vroom_job_t::pickup_size
size_t pickup_size
Quantities for pickup.
Definition: vroom_job_t.h:65
Vroom_shipment_t::d_setup
Duration d_setup
Delivery location index in matrix.
Definition: vroom_shipment_t.h:66
vrprouting::Pgr_messages::log
std::ostringstream log
Stores the hint information.
Definition: pgr_messages.h:91
vrprouting::Vrp_vroom_problem::matrix
vrprouting::base::Base_Matrix matrix() const
Definition: vrp_vroom_problem.hpp:59
Vroom_shipment_t::amount_size
size_t amount_size
Quantities for shipment.
Definition: vroom_shipment_t.h:70
Vroom_vehicle_t::tw_open
Duration tw_open
Number of vehicle's skills.
Definition: vroom_vehicle_t.h:65
vrprouting::base::Base_Matrix::get_index
Idx get_index(Id) const
original id -> idx
Definition: base_matrix.cpp:161
vrprouting::Vrp_vroom_problem::add_vehicles
void add_vehicles(const std::vector< Vroom_vehicle_t > &vehicles, const std::vector< Vroom_break_t > &breaks, const std::vector< Vroom_time_window_t > &breaks_tws)
Definition: vrp_vroom_problem.hpp:382
vrprouting::Vrp_vroom_problem::get_vroom_skills
vroom::Skills get_vroom_skills(const Skill *skills, size_t count) const
Gets the vroom skills.
Definition: vrp_vroom_problem.hpp:150
vrprouting::Vrp_vroom_problem::vehicles
std::vector< vroom::Vehicle > vehicles() const
Definition: vrp_vroom_problem.hpp:58
vrprouting::Vrp_vroom_problem::get_vroom_break
vroom::Break get_vroom_break(const Vroom_break_t &v_break, const std::vector< Vroom_time_window_t > &break_tws) const
Gets the vehicle breaks from C-style breaks struct.
Definition: vrp_vroom_problem.hpp:307
vrprouting::Vrp_vroom_problem::get_vroom_shipment
std::pair< vroom::Job, vroom::Job > get_vroom_shipment(const Vroom_shipment_t &shipment, const std::vector< Vroom_time_window_t > &pickup_tws, const std::vector< Vroom_time_window_t > &delivery_tws) const
Gets the vroom shipments.
Definition: vrp_vroom_problem.hpp:227
vrprouting::Vrp_vroom_problem::get_vroom_time_window
vroom::TimeWindow get_vroom_time_window(const Vroom_time_window_t &time_window) const
Gets the vroom time window from the C-style struct.
Definition: vrp_vroom_problem.hpp:73
vrprouting::Vrp_vroom_problem::problem_add_vehicle
void problem_add_vehicle(const Vroom_vehicle_t &vehicle, const std::vector< Vroom_break_t > &breaks, const std::vector< Vroom_time_window_t > &breaks_tws)
Definition: vrp_vroom_problem.hpp:375
Vroom_break_t::id
Idx id
Definition: vroom_break_t.h:47
Vroom_job_t::delivery
Amount * delivery
Job service duration.
Definition: vroom_job_t.h:61
vrprouting::base::Base_Matrix::get_vroom_duration_matrix
vroom::Matrix< vroom::Duration > get_vroom_duration_matrix() const
Get VROOM duration matrix from vrprouting Base Matrix.
Definition: base_matrix.cpp:404
Vroom_vehicle_t::capacity_size
size_t capacity_size
Vehicle's capacity array.
Definition: vroom_vehicle_t.h:60
Vroom_vehicle_t::speed_factor
double speed_factor
Time window end time.
Definition: vroom_vehicle_t.h:68
vrprouting::Pgr_messages::error
std::ostringstream error
Stores the error information.
Definition: pgr_messages.h:95
Vroom_job_t::priority
Priority priority
Number of mandatory skills.
Definition: vroom_job_t.h:70
Vroom_vehicle_t::skills
Skill * skills
Vehicle's capacity array size.
Definition: vroom_vehicle_t.h:62
Vroom_shipment_t::d_data
char * d_data
Metadata information of pickup shipment.
Definition: vroom_shipment_t.h:78
vrprouting::Vrp_vroom_problem::get_vroom_time_windows
std::vector< vroom::TimeWindow > get_vroom_time_windows(const std::vector< Vroom_time_window_t > &time_windows) const
Definition: vrp_vroom_problem.hpp:85
Vroom_shipment_t::p_location_id
MatrixIndex p_location_id
Shipment identifier.
Definition: vroom_shipment_t.h:60
vrprouting::Vrp_vroom_problem::jobs
std::vector< vroom::Job > jobs() const
Definition: vrp_vroom_problem.hpp:56
vrprouting::Vrp_vroom_problem::add_jobs
void add_jobs(const std::vector< Vroom_job_t > &jobs, const std::vector< Vroom_time_window_t > &jobs_tws)
Definition: vrp_vroom_problem.hpp:190
Vroom_break_t::service
Duration service
Identifier of vehicle.
Definition: vroom_break_t.h:49
Vroom_shipment_t::skills
Skill * skills
Number of quantities.
Definition: vroom_shipment_t.h:72
Vroom_vehicle_t::max_tasks
int32_t max_tasks
Vehicle travel time multiplier.
Definition: vroom_vehicle_t.h:70
vrprouting::Vrp_vroom_problem::get_vroom_amounts
vroom::Amount get_vroom_amounts(const std::vector< Amount > &amounts) const
Gets the vroom amounts from C-style array.
Definition: vrp_vroom_problem.hpp:112
Vroom_break_t::data
char * data
Duration of break.
Definition: vroom_break_t.h:50
vrprouting::Vrp_vroom_problem::get_vroom_job
vroom::Job get_vroom_job(const Vroom_job_t &job, const std::vector< Vroom_time_window_t > &job_tws) const
Gets the vroom jobs.
Definition: vrp_vroom_problem.hpp:169
Vroom_shipment_t::d_service
Duration d_service
Delivery setup time.
Definition: vroom_shipment_t.h:67
Vroom_job_t::service
Duration service
Job setup duration.
Definition: vroom_job_t.h:59
Vroom_shipment_t::p_setup
Duration p_setup
Pickup location index in matrix.
Definition: vroom_shipment_t.h:61
Vroom_job_t::skills
Skill * skills
Number of pickup quantities.
Definition: vroom_job_t.h:67
Vroom_job_t::location_id
MatrixIndex location_id
The job's identifier.
Definition: vroom_job_t.h:56
vrprouting::Vrp_vroom_problem::get_vroom_breaks
std::vector< vroom::Break > get_vroom_breaks(const std::vector< Vroom_break_t > &breaks, const std::vector< Vroom_time_window_t > &breaks_tws) const
Definition: vrp_vroom_problem.hpp:315
Vroom_time_window_t::tw_close
Duration tw_close
Definition: vroom_time_window_t.h:50
Vroom_job_t::pickup
Amount * pickup
Number of delivery quantities.
Definition: vroom_job_t.h:64
vrprouting::Vrp_vroom_problem::get_vroom_vehicle
vroom::Vehicle get_vroom_vehicle(const Vroom_vehicle_t &vehicle, const std::vector< Vroom_break_t > &breaks, const std::vector< Vroom_time_window_t > &breaks_tws) const
Gets the vroom vehicles.
Definition: vrp_vroom_problem.hpp:347
Vroom_shipment_t::p_data
char * p_data
Priority level of shipment.
Definition: vroom_shipment_t.h:77
Vroom_job_t::setup
Duration setup
Location index of job in matrix.
Definition: vroom_job_t.h:58
Vroom_time_window_t::tw_open
Duration tw_open
Definition: vroom_time_window_t.h:49
Amount
int64_t Amount
Definition: typedefs.h:74
Vroom_job_t::data
char * data
Priority level of job.
Definition: vroom_job_t.h:72
Idx
uint64_t Idx
Definition: typedefs.h:79
vrprouting::Vrp_vroom_problem::get_amount
void get_amount(vroom::Amount vroom_amount, Amount **amount)
Definition: vrp_vroom_problem.hpp:428
vrprouting::Vrp_vroom_problem::problem_add_job
void problem_add_job(const Vroom_job_t &job, const std::vector< Vroom_time_window_t > &job_tws)
Definition: vrp_vroom_problem.hpp:185
vrprouting::Vrp_vroom_problem::add_shipments
void add_shipments(const std::vector< Vroom_shipment_t > &shipments, const std::vector< Vroom_time_window_t > &shipments_tws)
Definition: vrp_vroom_problem.hpp:262
MatrixIndex
int64_t MatrixIndex
Definition: typedefs.h:80
Vroom_shipment_t::amount
Amount * amount
Delivery service time.
Definition: vroom_shipment_t.h:69
CHECK_FOR_INTERRUPTS
#define CHECK_FOR_INTERRUPTS()
Definition: interruption.h:79
Duration
uint32_t Duration
Definition: typedefs.h:81
Vroom_vehicle_t::data
char * data
Max number of tasks in a route for the vehicle.
Definition: vroom_vehicle_t.h:72
Vroom_shipment_t::skills_size
size_t skills_size
Mandatory skills.
Definition: vroom_shipment_t.h:73
Vroom_vehicle_t::id
Idx id
Definition: vroom_vehicle_t.h:55
vrprouting::Vrp_vroom_problem::get_step_type
StepType get_step_type(vroom::Step step)
Definition: vrp_vroom_problem.hpp:451
Vroom_shipment_t::d_location_id
MatrixIndex d_location_id
Pickup service time.
Definition: vroom_shipment_t.h:65
vrprouting::Vrp_vroom_problem::shipments
std::vector< std::pair< vroom::Job, vroom::Job > > shipments() const
Definition: vrp_vroom_problem.hpp:57
Vroom_vehicle_t::tw_close
Duration tw_close
Time window start time.
Definition: vroom_vehicle_t.h:66
Vroom_vehicle_t::skills_size
size_t skills_size
Vehicle's skills.
Definition: vroom_vehicle_t.h:63
vrprouting::Vrp_vroom_problem::m_shipments
std::vector< std::pair< vroom::Job, vroom::Job > > m_shipments
Definition: vrp_vroom_problem.hpp:643
Vroom_shipment_t::id
Idx id
Definition: vroom_shipment_t.h:57
Vroom_vehicle_t::start_id
MatrixIndex start_id
The vehicle's identifier.
Definition: vroom_vehicle_t.h:56
Vroom_vehicle_t::capacity
Amount * capacity
End location index in matrix.
Definition: vroom_vehicle_t.h:59
vrprouting::Vrp_vroom_problem::get_job_step_type
StepType get_job_step_type(vroom::JOB_TYPE vroom_job_type)
Definition: vrp_vroom_problem.hpp:435
Vroom_job_t::delivery_size
size_t delivery_size
Quantities for delivery.
Definition: vroom_job_t.h:62
vrprouting::Vrp_vroom_problem::problem_add_shipment
void problem_add_shipment(const Vroom_shipment_t &shipment, const std::vector< Vroom_time_window_t > &pickup_tws, const std::vector< Vroom_time_window_t > &delivery_tws)
Definition: vrp_vroom_problem.hpp:254
vrprouting::base::Base_Matrix::get_vroom_cost_matrix
vroom::Matrix< vroom::Cost > get_vroom_cost_matrix() const
Get VROOM cost matrix from vrprouting Base Matrix.
Definition: base_matrix.cpp:421
StepType
int32_t StepType
Definition: typedefs.h:86
Vroom_job_t::skills_size
size_t skills_size
Mandatory skills.
Definition: vroom_job_t.h:68
vrprouting::Pgr_messages::notice
std::ostringstream notice
Stores the notice information.
Definition: pgr_messages.h:93
Vroom_job_t::id
Idx id
Definition: vroom_job_t.h:55
vrprouting::Vrp_vroom_problem::m_jobs
std::vector< vroom::Job > m_jobs
Definition: vrp_vroom_problem.hpp:642