vrpRouting  0.3
anonymous_namespace{pickDeliver_driver.cpp} Namespace Reference

Functions

vrprouting::problem::Solution get_initial_solution (vrprouting::problem::PickDeliver *problem_ptr, int m_initial_id)
 

Function Documentation

◆ get_initial_solution()

vrprouting::problem::Solution anonymous_namespace{pickDeliver_driver.cpp}::get_initial_solution ( vrprouting::problem::PickDeliver problem_ptr,
int  m_initial_id 
)

Definition at line 52 of file pgr_pickDeliver/pickDeliver_driver.cpp.

52  {
53  using Solution = vrprouting::problem::Solution;
54  using Initial_solution = vrprouting::initialsol::simple::Initial_solution;
56  Solution m_solutions(problem_ptr);
57  if (m_initial_id == 0) {
58  for (int i = 1; i < 7; ++i) {
59  if (i == 1) {
60  m_solutions = Initial_solution((Initials_code)i, problem_ptr);
61  } else {
62  auto new_sol = Initial_solution((Initials_code)i, problem_ptr);
63  m_solutions = (new_sol < m_solutions)? new_sol : m_solutions;
64  }
65  }
66  } else {
67  m_solutions = Initial_solution((Initials_code)m_initial_id, problem_ptr);
68  }
69 
70  return m_solutions;
71 }

Referenced by do_pgr_pickDeliver().

vrprouting::problem::Solution
Definition: solution.h:50
vrprouting::initialsol::simple::Initials_code
Initials_code
Different kinds to insert an order into the vehicle.
Definition: initialsol/initials_code.h:37
vrprouting::initialsol::simple::Initial_solution
Definition: initialsol/simple.h:45